[Pmwiki-users] Free link questions

John Rankin john.rankin at affinity.co.nz
Mon Mar 17 23:33:40 CST 2003

I was quite happy with the original $Title and $Titlespaced. I used $Title =
if it was a WikiWord pagename and {{$Titlespaced}} if it was a {{free link}=
} pagename. I used $Group/$Title when I wanted to refer to a full pagename.=
 PmWiki 0.4 caused a lot of little things to stop working for me when $=
Title replaced _ with a space.

I *think* it can be simple and needs 4 variables. I'll use the underscore =
for clarity, but '' is equally valid.

1. The physical filename that goes onto the disk. For a WikiWord, it's =
WikiWord; for a {{free-link word}} it's Free-link_Word.

2. The logical title that displays on the page title. For a WikiWord, it's =
WikiWord; for a {{free-link word}} it's Free-link Word.

3. The reference markup that if entered produces the physical filename. =
For a WikiWord, it's WikiWord; for a {{free-link word}} it's {{Free-link =

4. The spacewikiwords variant. For a WikiWord, it's Wiki Word; for a {{=
free-link word}} it's Free-link Word.

This gives me the following table:

              WikiWord      {{free-link word}}  or  {{free-link word}}

$Physical     WikiWord      Free-link_Word          Free-linkWord

$Logical      WikiWord      Free-link Word          Free-link Word

$Reference    WikiWord      {{Free-link Word}}      {{Free-link Word}}

$Spaced       Wiki Word     Free-link Word          Free-link Word

> At the moment, the free link pattern doesn't allow '_' as part of the =

Oops, you're right.  I forgot that I set the free link pattern=20
to not allow '_' in free links.  My thinking at the time was that
a wiki administrator who sets $PageNameSpace to '_' would probably
also modify the $FreeLinkPattern to allow underscores, so that
an author seeing "Free_Link" as a page name (e.g. in a URL)=20
would be able to write {{Free_Link}} in the wiki markup.

I also forgot that the default $PageTitlePattern doesn't allow
underscores in pagenames, either, so the concerns I listed about
"Wiki_Word" not functioning properly in PmWiki's default
configuration doesn't apply either.

I addressed this by treating authors' references to Group/Page_Title as =
valid LinkPatterns that call FmtWikiLink. So in my case, {{Page_Title}} is =
not allowed, but Group/Page_Title is, on the basis that it's more readable =
in edit mode.

Of course I really prefer to deprecate '_' altogether (i.e., get
rid of $PageNameSpace entirely), but it's probably true that I=20
need to make it possible for someone to have underscores in titles=20
if they want them.

On the other hand, it is perversely possible to deprecate WikiWords and do =
everything with {{free link}}s, in which case the underscore is a useful =
device for creating file names and to ensure that WikiWords never appear =
anywhere. But perhaps a WikiWord-less PmWiki is too much like '=
Christianity without Christ' (a book by a New Zealand theologian called =
Lloyd Geering, if anybody is interested).


More information about the pmwiki-users mailing list