[Pmwiki-users] Re: [[include: ... ]] part of a page
Nathan Jones
nathanj
Wed May 5 18:33:14 CDT 2004
Pm wrote:
> [[include:SomePage#soup]] -- everything after #soup (cf. HTML)
> [[include:SomePage#soup#nuts]] -- from #soup to #nuts
> [[include:SomePage#1#soup]] -- everything before #soup
> [[include:SomePage#soup#]] -- from #soup to the next anchor
> [[include:SomePage#1#]] -- everything up to the first anchor
> [[include:SomePage#10]] -- line 10 through end of SomePage
> [[include:SomePage#10#]] -- line 10 through the next anchor
>
> [[include:SomePage#1#10]] -- first ten lines
> [[include:SomePage#5#10]] -- lines 5 through 14
> [[include:SomePage#soup#1]] -- one line starting with #soup
> [[include:SomePage#soup#5]] -- five lines starting with #soup
I like these a lot. Nice and clear and flexible enough to cover most
situations. The only bit I didn't guess intuitively is that #5#10 means
"10 lines starting with line 5". I read it as "lines 5 through to 10".
Now, I could add yet another suggestion and say:
[[include:SomePage#5+10]] -- lines 5 through 14
[[include:SomePage#soup+5]] -- five lines starting with #soup
[[include:SomePage#soup#5]] -- from #soup to line 5 (nothing
included if #soup is after line 5)
...but that would be annoying, so I won't. :-)
One more comment: most of the uses you've shown are inclusive (as they
should be), such as "from #soup to #nuts", but the first line says
"everything after #soup" - shouldn't that be "everything starting with
#soup"?
Jonathan Scott Duff wrote:
>I'm still mildly bothered by end point inclusion for
>[[include:SomePage#soup#nuts]] (don't know why...
I don't know why either. An anchor is just an anchor - it is not
displayed, so there should be no major harm in including it.
>As a feature suggestion, perhaps [[include:SomePage#soup##nuts]]
>could include the #nuts line
I don't think I'd ever remember that. I'd think "from #soup to the next
anchor and... then #nuts too? or...? what on Earth does this do?"
--
Nathan Jones
More information about the pmwiki-users
mailing list