[pmwiki-users] Permissions conundrum, section behaviour
Patrick R. Michaud
pmichaud at pobox.com
Fri Oct 6 01:13:03 CDT 2006
I'll have to read/digest the overall concept a bit further, but
just to answer a couple of quick points...
On Fri, Oct 06, 2006 at 01:22:23AM -0400, Henrik Bechmann wrote:
> 1. The comment.
>
> The directive (the name and parameters for which I choose arbitrarily --
> it's another discussion) is placed on the page, say (:comments:),
> causing comments to be added:
>
> First comment on a page:
>
> [[#comment]]
> first comment text
> [[#commentend]]
>
> Second comment on a page:
>
> [[#comment]]
> second comment text
> [[#commentend]]
>
> Right away we have broken the HTML rule to have unique anchor names. So...
...Only because you keep insisting that [[#comment]] is exactly the
same as an "HTML anchor". It is not. Only the *first* such marker in
a page generates an HTML anchor -- subsequent repeated instances
of the same marker do not generate an HTML anchor, and thus do
not break the "HTML rule to have unique anchor names."
> [[#comment2]]
> second comment text
> [[#commentend2]]
>
> Where does the ordinal suffix come from? Surely not from the user (it is
> logically arbitrary and unnecessary -- an imposition on the user).
Please hold on to that thought for a moment... I have an answer --
but first:
> With a delimiter:
>
> First comment on a page:
>
> [!textblock comment!]
> first comment text
> [!textblockend!]
>
> Second comment on a page:
>
> [!textblock comment!]
> second comment text
> [!textblockend!]
>
> No problems! And simple! And clear!
And exactly what we can do with [[#comment]]/[[#end]] now!
> If an identifier is required (say by some recipe):
>
> (:comments numbered:)
>
> First comment on a page:
>
> [!textblock comment 1!]
> first comment text
> [!textblockend!]
>
> Second comment on a page:
>
> [!textblock comment 2!]
> second comment text
> [!textblockend!]
And to return to the earlier comment:
"Where does that ordinal index come from? Surely not from the user...."
Whatever is inserting the ordinal indexes in the [!textblock ...!]
scheme above can just as easily be generating unique
[[#comment_nnn]] markers instead. (Actually, it's slightly easier
to use [[#comment_nnn]] instead.)
> If further information was required by a recipe:
>
> (:comments customcomment:)
>
> [!textblock customcomment 1 time=10/5/06-12:46a author="Henrik Bechmann"
> pwd="132kljqdfpoasf21324;lkaf"!]
> first comment text
> [!textblockend!]
[[#customcomment_1 time=20061005T0046 author="Henrik Bechman" ...]]
first comment text
[[#end]]
> Lastly, a couple of personal remarks: First, my apologies for the length
> of this email. I felt some duty to make this case while you were still
> in beta. Second, I hope you understand that I make this submission with
> the greatest of respect for you, and the greatest admiration and
> affection for your product, PmWiki.
Thanks, I definitely take your comments in the spirit intended,
and mine are intended in the same vein. Your comments are very
helpful and valuable and I hope that the terseness of my responses
above won't be taken as a sign of disrespect or unappreciativeness,
because they aren't at all intended that way. I really will need a
bit of time to absorb what you've written before I can make more
reasoned responses, but I did want to get some quick observations
about how I see [!textblock comment!] and [[#comment]] as really
being equivalent.
In fact, I think I can _prove_ that they're equivalent by noting
that a simple pattern replacement is completely sufficient to turn
one scheme into the other (and vice-versa):
## [!textblock comment args!] --> [[#comment args]]
$y = preg_replace('/\\[!textblock (.*?)!\\]/', '[[#$1]]', $x);
## [[#comment args]] --> [!textblock comment args!]
$x = preg_replace('/\\[\\[#(.*?)\\]\\]/', '[!textblock $1!]', $y);
In other words, I'm saying that '[[#' is simply another
(much shorter) way of writing what you have for '[!textblock',
and that also has the mnemonic advantage of associating
sections of text with url fragments.
Pm
More information about the pmwiki-users
mailing list