[Pmwiki-users] AsSpaced function (was pmwiki-2.0.devel9 released)

John Rankin john.rankin
Thu Sep 30 22:47:09 CDT 2004

On Friday, 1 October 2004 2:19 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Fri, Oct 01, 2004 at 10:00:58AM +1200, John Rankin wrote:
>> 1. Make spacing the default and in particular make $Name in
>>    the template $SpacedName (change Wiki Help and Search Wiki
>This is definitely worth considering, since the documentation now
>tends to emphasize "[[page links]]" over "PageLinks".  OTOH, I think
>we violate the principle of least surprise a bit when CamelCase words
>automatically get spaces in them.  I'll have to think about
>this a bit more.

On the third hand, CamelCase is a form of markup, and nobody is
surprised how other markups are rendered. My experience has been
that general audiences are happy with entering simple markup and 
expect displayed pages to look like normal text; CamelCase words 
stand out as at best quirky, definitely strange and at worst wrong.

Displaying CamelCase words is definitely a barrier for some types
of audience.

>I haven't figured out what to do with spacing of the group name in the
>default template. 

FWIW, I'd leave it as is. 
>> 2. One directive ([:joinwikiwords:] perhaps) changes body text and 
>>    the pagename display (ie $SpacedName is not spaced if the
>>    [:joinwikiwords:] directive is set)
>I've been considering [:wikiwords:], [:nowikiwords:], and [:spacedwikiwords:],
>which could be entered multiple times on a page to allow different sections
>to follow different rules.  Or, instead of separately named directives we 
>could parameterize a single directive, as in [:wikiwords on:], 
>[:wikiwords off:], and [:wikiwords spaced:].  (I welcome any suggestions
>for better directive names here.)

On the 'use a verb if possible' principle:

    [:spacewikiwords:] [:joinwikiwords:] [:ignorewikiwords:]

It's a bit longer, but presumably won't be used that often.

>> 6. Alternatively, provide a mechanism for:
>>    naming pages according to the creator's directions
>> -- if I write [[iTunes]] or [[TEOs]] or [[A Place to Stand]]
>>    that becomes the $Name of the page
>> -- I imagine this being done by changing to space to a
>>    (forgive me) '_' to name the file and translating the
>>    (forgive me) '_' back to a space for display purposes
>I've been thinking of perhaps another approach -- namely, to make 
>pagenames case insensitive everywhere (as they often end up being in 
>Windows/Mac environments anyway).  If this happens, then a page's name 
>for display purposes would come from a field held inside the pagefile
>itself; the field would be initialized with the case+spacing that was
>used by whatever/whoever created the page initially.

That would work. What happens when somebody does ?action=rename --
I assume the text entered in the rename box would go into
this new field. Or does changing the contents of this field rename
the page?

And is this field used as the default link text for links to the
page? For example:

    I write [[wiki word]] to create a new page
        this displays as a link to wiki word

    I later refer to it by writing [[WikiWord]]s and
        I *think* the answer is to use the new field's spacing
        and the reference's capitalisation (one needs to be able
        to start a sentence with a capital letter)

        But a case could also be made that the first produces
        WikiWords and the second produces Wiki Word, on the
        basis that an author who wants Wiki Words will write
        [[Wiki Word]]s

John Rankin

More information about the pmwiki-users mailing list