Prevent the need to type link names twice to make them look clean.

I find myself constantly creating links where I have to type the core part of the link name twice so that it looks nice.

|| '''How I want it to look'''                       || '''How it looks naturally''' ||
|| [:/SubPage:SubPage]                               || /SubPage ||
|| [#anchor anchor]                                  || [#anchor] ||
|| [http://domain.com/dir/document.pdf document.pdf] || [http://domain.com/dir/document.pdf] ||
|| [:SomePage/SubPage:Subpage]                       || [:SomePage/SubPage] ||
|| Learn more about [:Apple:Apples]                  || Learn more about [:Apple]s ||

How I want it to look

How it looks naturally

SubPage

/SubPage

anchor

#anchor

document.pdf

http://domain.com/dir/document.pdf

Subpage

SomePage/SubPage

Learn more about Apples

Learn more about Apples

There are times when it makes sense for a link's text to show as-is, but most of the time I'd rather hide the details and make it look clean. Generally it's a relatively simple operation to figure out what the core link name should be, simply by removing the extra decoration. For URLs that have parameters, these could be removed too. MoinMoin could do this automatically, saving a lot of typing.

The only missing piece is how to communicate whether you want the "smart" replacement text or the link as shown in the markup. I suggest that supplying blank alternate text should activate the smart text:

suggested markup

would produce

[:/SubPage:]

SubPage

[http://yahoo.com ]

yahoo.com

[#Category ]

Category

[:..:] (parent page)

FeatureRequests (parent page)

[:FeatureRequests/MyFeature:]

MyFeature

About [:Apple:]s

About Apples

(!) This is a feature of DokuWiki.

too much magic, and the new link markup makes things easier (copied from comment)


CategoryFeatureRejected

MoinMoin: FeatureRequests/ProvideAutomaticLinkText (last edited 2008-03-19 08:11:47 by ReimarBauer)