[Pmwiki-users] Re: Re: include part of a page syntax, revisited

Christian Ridderström chr
Wed Jun 16 14:09:42 CDT 2004


On Wed, 16 Jun 2004, Patrick R. Michaud wrote:

> On Wed, Jun 16, 2004 at 10:43:42AM +0200, Christian Ridderstr?m wrote:
> > I think it'd look pretty and *very* intuitive if
> >         [[include:PageName#1-20]]
> > included lines 1-20. Is there anything bad with using this?
> 
> No, not in itself, but it seems to me that whatever is used should
> match the syntax used to include the text between two anchors 
> (i.e., #start#end).

Oh well... and it looked so nice. Btw, you don't think people might be 
confused into thinking that in
	[[include:#PageName#from#123]]
the '123' is an anchor? (Assuming that is a valid example though)

In that case it'd be *easier* with a slight difference in the syntax -- 
although using '-' won't help here.

> > See my other mail for an example of how it could be useful.
> 
> Umm, my original line about usefulness was about being able to say
> something like "the three paragraphs *before* #someanchor" -- I didn't
> see anything in your other mail that addressed this.  Sorry if I missed it.

My fault, I missed "before".

> > I like the above, but... [...]
> > * I think 'SomePage#from' should be equivalent to 'Somepage#from+1p', i.e
> >   the default is to include the entire paragraph. That's something I'd 
> >   need a lot more often.
> 
> So far my reading of comments from others, as well as my own experience,
> is that 'SomePage#from' implies including a section (up to the next
> anchor) more than it does a paragraph.  This is likely because the
> markup naturally references anchors (#), not paragraphs.

Could you point me to an example of where it's used? (I've never seen the 
need for using it like that).

> > > The only item I'm unsure of is "include everything after #from", but I'm
> > > sure we can come up with something appropriate for that (e.g., a
> > > pseudo-anchor such as #end).
> > 
> > How about one of these:

[suggestions I on second thought didn't really like have been removed
below]

>  	[[include:Page#from+]]            looks good to me
>  	[[include:Page#from#]]            looks okay to me

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list