Unintended links - does the prefix Mac have special significance?

74 views
Skip to first unread message

Jon Light

unread,
Sep 28, 2020, 10:42:34 AM9/28/20
to TiddlyWiki

Hi
It is not a big deal but I have noticed that when I enter Scottish surnames - MacInnes for instance Tiddlywiki sets up a link automatically which leads to a requestor asking me if I want to create a new tiddler of that name.

I just wondered if anyone else sees this behaviour and if so then whether Mac is a reserved word?

I will live with it - just curiosity really.

Jon

TiddlyTweeter

unread,
Sep 28, 2020, 11:12:43 AM9/28/20
to TiddlyWiki
See ...


and 


to either selectively of globally switch off CamelCase.

Best wishes
TT

TW Tones

unread,
Sep 29, 2020, 7:11:05 PM9/29/20
to TiddlyWiki
Jon,

Erics references will help you but in Text you can use ~ to stop camel case becoming a link ~MacInnes (it the I that causes camel case) it.

If it were Permitted "Mac Innes" is fine which is a clue to a little trick, because space separates the two words its no longer camel case.


Mac​Innes  Is not camel case either. However it may need to be included in searches, or search Mac + Innes

You could just allow it to become a link and create a "Surname Tiddler", this will provide references to list all MacInnes related or otherwise.

Regards
Tony

Eric Shulman

unread,
Sep 29, 2020, 7:42:02 PM9/29/20
to TiddlyWiki
On Monday, September 28, 2020 at 7:42:34 AM UTC-7, Jon Light wrote:
It is not a big deal but I have noticed that when I enter Scottish surnames - MacInnes for instance Tiddlywiki sets up a link automatically which leads to a requestor asking me if I want to create a new tiddler of that name.

Any text that starts with a capital letter, and contains another capital letter within it is called "CamelCase", and is treated as an automatic "WikiLink" reference to a tiddler (even if that tiddler doesn't exist yet).

You can disable this handling in several ways:

1) For single occurrences, just precede the text with "~", as in "~MacInnes"
2) Disable automatic WikiLinks in an entire tiddler, by putting "\define tv-wikilinks() no" at the start of the tiddler (see https://tiddlywiki.com/#tv-wikilinks%20Variable)
3) Disable automatic WikiLinks in the whole file, by clearing the "Enable automatic CamelCase linking" checkbox in $:/ControlPanel, Settings tab or by directly setting the text content of $:/config/WikiParserRules/Inline/wikilink to "disable".

enjoy,
-e

Jon Light

unread,
Sep 30, 2020, 6:05:22 AM9/30/20
to TiddlyWiki
Brilliant! - thanks to Eric, TiddlyTweeter and Tony, its nice to simply know what the cause was and even better for the suggestions on how to disable - I think the blanket disable given by Eric in point 3 will be the one for me, the area I am documenting involves a number of folks with Scottish surnames and at times I do actually want a link to something specific so I think auto-off is the best way for me. Again thanks to one of nicest and most helpful communities :-) I only came across TiddlyWiki a few months ago and it is a revolution for me - third knowledge base I tried but the only one I feel works the way I do, loving it !!!!
Reply all
Reply to author
Forward
0 new messages