[Pmwiki-users] pmwiki-2.0.devel13 released
John Rankin
john.rankin
Wed Oct 13 16:27:04 CDT 2004
On Thursday, 14 October 2004 3:26 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Wed, Oct 13, 2004 at 11:34:02AM +1300, John Rankin wrote:
>> The current script (dev 11) turns WikiWords into [[WikiWords]] before
>> scanning the trail.
>>
>> If wikiwords are spaced, it perhaps should turn WikiWords into
>> [[Wiki Words]].
>
>Good point. Either that or it should just scan the $WikiWord directly
>and not convert to a [[...]] syntax. And perhaps trails should not
>treat WikiWords as links if $LinkWikiWords==0.
>
>I'll have to think about this a bit more.
>
>Pm
>
There are several places where it uses [[...]] markup (or equivalent)
- Describe [[PageName]] here.
- RecentChanges entries
- search results
Currently, none of these spaces wikiwords.
I would like to try an experiment, if possible. This recaps and
(I hope) improves an earlier proposal around spacing. It hangs
together in my head as a workable alternative to the current scheme,
but needs a proper test.
- take what the author enters inside [[...]] and make a name
by changing ' ' to '_' (eg [[War and Peace]] becomes
War_and_Peace
- take WikiWords and make the page name as Wiki_Words; this
avoids the serious problem of WikiWords and Wiki_Words
becoming different pages
- for backwards compatibility, if authors write [[War and Peace]]
and it doesn't exist, look for a page called WarAndPeace; this is
analogous to WikiWord looking for WikiWord.WikiWord and
WikiWord.HomePage
- if an author enters Group.WikiWord in the browser address bar,
it needs to look for Group.Wiki_Word; if neither Group.WikiWord
nor Group.Wiki_Word exists, display 'Describe [[Wiki Word]] here'
and on save create Wiki_Word
- all link displays change '_' back into ' '
What benefits might this bring:
- closer to the author's intentions: War and Peace stays as
War and Peace everywhere; it doesn't become War And Peace
- by spacing WikiWords on input instead of output, it makes
link display more straightforward: in all cases turn '_'
into ' '
- it lets authors join words that shouldn't be spaced, by
writing [[McGillycuddy Serious Party]], thereby avoiding
a whole class of pathalogical, but fairly common, cases
where the AsSpaced function doesn't cope
- it avoids adding complexity to the system to handle
exceptions (eg I have a list of words to be downshifted
and another list of words to be joined -- don't need
either of these if pmwiki remembers spacing and
capitalisation)
- reduces the need for a [:title ... :] directive
So my hypothesis is that this scheme might do a better job
of spacing, for those sites that want spacing. It feels to
me that getting spacing right is adding complexity and
what feel like slightly gratuitous features. So maybe it's
time to review the fundamental assumptions. I haven't been
able to think of any show-stoppers that make this scheme
unworkable. It would only apply to page names, not groups.
I am happy to test this as a local customisation, but at
the moment the page name maker function hard-wires the
'upshift and remove spaces' algorithm. Is there any
chance we might be able to give an alternative a trial?
I think all we need is a user-modifiable AsJoined function.
I see this as an alternative, not a replacement, for the
current scheme. If done right, an administrator can switch
schemes and everything will continue to work. IIRC, others
have suggested something similar in the past. Now would
be a good time to try it.
What do you think?
PS apologies for a long post; it's easier to demonstrate
than describe.
--
JR
--
John Rankin
More information about the pmwiki-users
mailing list