[Pmwiki-users] Re: [[include: ... ]] part of a page
John Rankin
john.rankin
Wed May 5 19:30:21 CDT 2004
On Thursday, 6 May 2004 1:57 AM, Jonathan Scott Duff <duff at pobox.com> wrote:
>On Tue, May 04, 2004 at 11:31:43PM -0600, Patrick R. Michaud wrote:
>> the result might be something like:
>>
>> [[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 it! Though there is a bit of broken symmetry between the solely
>numeric and solely non-numeric anchors. (i.e. #start#end for non-numeric
>versus #start#length for the numeric) But making it symmetrical sounds
>like a foolish consistency to me. :-)
OTOH I find
>> [[include:SomePage#soup]] -- everything after #soup
>> [[include:SomePage#1#soup]] -- everything before #soup
>> [[include:SomePage#soup#1]] -- one line starting with #soup
bafflingly inconsistent and unintuitive. #3 means line 3 if it comes
first and 3 lines if it comes second, as Scott says.
I think the problem is the lack of an intuitive way to designate the
start and the end of a page. Christian's proposal was a '#' character
before or after the anchor. J.Meijer's proposal is #1 for the start
and '' (null character) for the end, with '#' meaning the next anchor.
Suppose we accept '#' to mean 'next anchor'. Options for 'before'
and 'after' could be:
* meaning 'everything'
so *#soup is everything before soup
and #soup* is everything after soup
@ meaning 'everything' (all)
| meaning start and end
so |#soup and #soup|
|< meaning 'start' and >| meaning 'end'
<- meaning 'start' and -> meaning 'end'
(I considered and rejected plain < and >)
#1 meaning line 1 (and 1 line) and ## meaning 'all lines'
On the whole, I think I like * meaning everything
or ## meaning all lines, and lean to the latter.
Could I suggest that ## be introduced and made optional?
Interestingly, I could then write:
[[include:PageName##]]
and it ought to return the last line.
[snip]
>
>-Scott
>--
>Jonathan Scott Duff
>duff at pobox.com
>
>--
>Pmwiki-users mailing list
>Pmwiki-users at pmichaud.com
>http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com
>
--
JR
--
John Rankin
More information about the pmwiki-users
mailing list