wikiword spacing, was: Re: [Pmwiki-users] pmwiki-2.0.devel13 released

Knut Alboldt mailing
Thu Oct 14 03:24:53 CDT 2004


At 00:25 14.10.2004, John Rankin wrote:


>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

would be nice, if this behaviour (searching for Group.WikiWord as 
alternative) could be customizable (dis/enable). It's ok when migrating an 
old wiki, but I would prefer moving to a new policy and renaming old 
pagenames by a cli-tool.
So I would prefer the behaviour described abouve without looking for 
Group.WikiWord, but always translating WikiWord and [[Wiki Word]] to 
Wiki_Word for page naming and translating any "_" within names back to 
"space" when displaying.


>- 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

I would appreciate this ! It make text more readable or more exact to the 
language syntax. If you're running a wiki for IT-people it might be not 
that necessary, but if you running the wiki for people, who want's to write 
"normal" text it's important to write it in a right syntax. So the only 
possiblity now is using links with alternate text, which is rather much 
input to do. Your proposal would reduce this work.


>- 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?

I would appreciate this.

Knut 




More information about the pmwiki-users mailing list