Why RedirectMacro was the best thing ever, and a TW5 solution would be amazing

558 views
Skip to first unread message

springer

unread,
Dec 30, 2019, 12:31:07 PM12/30/19
to TiddlyWiki
Tony asked about RedirectMacro, and I realized that my answer was going to hijack his thread about transclusion. 


In TW Classic, this plugin made for entirely seamless internal linking, no need for double-brackets nor CamelCase. Anytime a tiddler contained a string (one or more words) that matched an existing tiddler title (or an alias of it, given AliasPlugin), the tiddler would render in view mode just as if a link had been specified, though the tiddler text itself could remain without any kind of link markup. On my old ethics site, you can open a tiddler in edit mode and see the links are "not there" except in this virtual way: http://ethics.tiddlyspot.com/#happiness

Here's the kind of use case that made it fabulous: During class (there's a 5-minute warmup problem students do while I hand papers back, unpack and plug in my laptop), I could paste in a bit of from a student's written work (submitted via moodle the night before, with an excerpt from our primary texts and then a paragraph of commentary). As soon as we go from edit to view mode, EVERY technical concept in the excerpt, and every key word and red flag word in the student's commentary, is lit up as a link. I now have all the resources of my wiki available (definitions, pointers) to help structure the discussion as I correct misunderstandings, pull up more details, etc. (Here's a real example of student writing that I pasted in, and got to render with all the links with no fuss.)

If someone asks "How much trouble is it to go through and put brackets around all the key terms after you paste?" that person is probably not working in front of a live audience (where that audience is not there to get TiddlyWiki lessons).

Now, suppose that today I add three terms (with definitions, perhaps some aliases) to my wiki. With RedirectMacro, a single reload of the site was sufficient to update the display of every tiddler that already contained that word or phrase (or its aliases). 

How much trouble is it to pause, after each time I add a term, to use TiddlerCommander or another advanced search function to find tiddlers with that term and replace appearances of the term with double-bracketed reference? Someone who asks this has not been adding wiki content at the last minute while running late toward a classroom full of students. ;)

If an equivalent could be generated for TW5, I would be beyond delighted.

-Springer

On Sunday, December 29, 2019 at 12:15:40 AM UTC-5, TonyM wrote:
Springer,

Please describe "Clint Checkett's Redirect macro" because I have no idea what it does, so I can't give an indicator if there is a method to replace it. I am sure I know more than I used to with TW5.

Regards
Tony

Jeremy Ruston

unread,
Dec 30, 2019, 12:51:11 PM12/30/19
to tiddl...@googlegroups.com
Hi Springer

Welcome back! There has been some discussion about freelinking in TW5 a few years ago:


The following comment gives the outline of a solution that I still think is viable: to make the text widget apply the autolinking at render time.


I'll try to give it some time over the next couple of days,

Best wishes

Jeremy


On 30 Dec 2019, at 17:31, springer <springer...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ece02188-7b35-4a80-a82e-46cdb270548a%40googlegroups.com.

Mat

unread,
Dec 30, 2019, 12:57:14 PM12/30/19
to TiddlyWiki
For TWC(!) I believe Tobias' made a much improved version but which name I've now forgotten. AutoLink or some such. It was in deed really cool but I found that it would only be practical if the wiki was dedicated to quite narrow topics. Many of my wikis are pretty broad in scope (e.g "family wiki", "my notes", "workwiki" etc).

I'm not quite sure why/if this exact solution is not possible in TW5 but I can see how something similar could be made by having words exchanged for linked words, i.e foo becomes [[foo]] upon saving. I believe there are methods for this in TW5.

<:-)

springer

unread,
Dec 30, 2019, 12:58:51 PM12/30/19
to TiddlyWiki
Jeremy,

Thanks for the quick reply! As I mentioned last week, I'm really thrilled with so many aspects of TW5, and love your dedication in seeing this baby to maturity.

I had seen the thread you mentioned, and interpreted it as cause for despair, at least in the near-term...

I'm guessing that there are some reasons that RedirectMacro was able to work on Classic, but not on TW5. But yes, if it becomes possible to find a way forward, I'll be super-eager to hear about it. 

-Springer

springer

unread,
Dec 30, 2019, 1:15:48 PM12/30/19
to TiddlyWiki
Mat,

Yes, it matters that my subject-matter is dense with cross-references among technical terms (that are still ordinary-language-like in their presentation). 

Yes, having foo throughout the text field converted to [[foo]] on save (for all of a specified class of tiddler titles, and their aliases) would accomplish *most* of what I need.

When I add a new term, though, that kind of simple conversion still wouldn't retrofit existing tiddlers to show links to the new one,... unless there were a wide search-replace operation, across all relevant tiddlers, every time a tiddler title or alias is edited. That strikes me as too burdensome on the system. 

Assuming a "virtual" solution like Checkett's RedirectMacro is not possible, the ideal plugin (or update to core, to be really ambitious) might allow two things:

(1) on save tiddler (or tiddler within some class): scan titles and alias names of existing tiddlers (non-system tidddlers, in my case), and substitute so as to render links as available.

(2) as needed: offer a single macro/button function that scans a subset of tiddlers (by default, all non-system tiddlers) for unmarked potential-link text (unbracketed strings that match tiddler titles and aliases), and furnish appropriate links throughout.

-Springer

-Springer

Mohammad

unread,
Dec 30, 2019, 2:24:45 PM12/30/19
to TiddlyWiki


On Monday, December 30, 2019 at 9:45:48 PM UTC+3:30, springer wrote:
Mat,

Yes, it matters that my subject-matter is dense with cross-references among technical terms (that are still ordinary-language-like in their presentation). 

Yes, having foo throughout the text field converted to [[foo]] on save (for all of a specified class of tiddler titles, and their aliases) would accomplish *most* of what I need.

When I add a new term, though, that kind of simple conversion still wouldn't retrofit existing tiddlers to show links to the new one,... unless there were a wide search-replace operation, across all relevant tiddlers, every time a tiddler title or alias is edited. That strikes me as too burdensome on the system. 

Assuming a "virtual" solution like Checkett's RedirectMacro is not possible, the ideal plugin (or update to core, to be really ambitious) might allow two things:

(1) on save tiddler (or tiddler within some class): scan titles and alias names of existing tiddlers (non-system tidddlers, in my case), and substitute so as to render links as available.

(2) as needed: offer a single macro/button function that scans a subset of tiddlers (by default, all non-system tiddlers) for unmarked potential-link text (unbracketed strings that match tiddler titles and aliases), and furnish appropriate links throughout.

This (2) seems is not difficult, if the performance is not a matter! If you clearly state (in a new thread) what you like to have, I think there are some good programmers here to implement it! I may help with pure wikitext!
Do you know in advance which word refer to a title or no? Is it possible to add a marker like + sign to them? For example instead of springer, write +springer?

springer

unread,
Dec 30, 2019, 10:29:12 PM12/30/19
to tiddl...@googlegroups.com
...


(2) as needed: offer a single macro/button function that scans a subset of tiddlers (by default, all non-system tiddlers) for unmarked potential-link text (unbracketed strings that match tiddler titles and aliases), and furnish appropriate links throughout.

This (2) seems is not difficult, if the performance is not a matter! If you clearly state (in a new thread) what you like to have, I think there are some good programmers here to implement it! I may help with pure wikitext!
Do you know in advance which word refer to a title or no? Is it possible to add a marker like + sign to them? For example instead of springer, write +springer?

Mohammad,

I don't think there would be any such marker within the tiddler text being scanned for potential links. Part of the appeal of this plug-in, if it's possible, is to allow both tiddler text and tiddler titles to be written in natural language as much as possible. 

Also, sometimes I'm creating a tiddler just to paste in a whole paragraph that someone else has written, so it's not as easy as just typing +word rather than word, even if I could memorize exactly which tiddlers I currently have.

-Springer

TonyM

unread,
Dec 31, 2019, 1:28:47 AM12/31/19
to TiddlyWiki
Folks

Any tiddler could be parsed for any tiddler title but the performance requirements will grow with the number of tiddlers. What about an indicator on tiddlers who's title may be worth linking to if found in another tiddler (ignoring case). Then at render one would only need to search the current tiddler for a limited set of titles. A more pervasive mode to be set for exploration only and list tiddlers who are contained in other tiddlers and you optional flag them as worthy of autolibking?

Redards
Tony

Jeremy Ruston

unread,
Jan 3, 2020, 5:47:40 AM1/3/20
to TiddlyWiki
Hi Springer

I’ve had an initial stab at a freelinking plugin. As expected, it noticeably slows down large wikis with many tiddlers. But it works pretty well with smallish wikis. I’ve got some ideas for improving the speed, but it’s still worth trying out.

The plugin is available in the prerelease plugin library. That means you should download a copy of the prerelease from https://tiddlywiki.com/prerelease/empty.html or https://tiddlywiki.com/prerelease/index.html and then use the plugin library to install “freelinks”.

Because it’s a prerelease, please don’t rely on it for anything important, but do report how it works with your existing corpus.

By default, freelinking is only applied within the main view template and the preview panel, and not, for instance, in the sidebar. At this point, automatically generated links do not appear as backlinks.

Best wishes

Jeremy.


Eric Shulman

unread,
Jan 3, 2020, 9:50:14 AM1/3/20
to TiddlyWiki
On Monday, December 30, 2019 at 9:58:51 AM UTC-8, springer wrote:
I'm guessing that there are some reasons that RedirectMacro was able to work on Classic, but not on TW5. But yes, if it becomes possible to find a way forward, I'll be super-eager to hear about it. 

RedirectMacro for TWClassic worked by modifying the TWCore parser formatters[] array to add extra patterns that match each existing tiddler title and renders them using CreateTiddlyLink().

TW5 is designed to potentially handle many 1000's of tiddlers while trying to avoid significant degradation in performance.  To do this, TW5 more selectively refreshes dependent content when underlying tiddlers are changed and separates the action of "parsing" the tiddler content from "rendering" the parsed result, so it's not just a matter of adding to an array of formatters[] to use CreateTiddlyLink() code for each matching tiddler title.

Even so, as Jeremy has shown with his experimental "freelinking" plugin, it is *possible* to achieve the behavior you seek.  However, as Jeremy points out, "it noticeably slows down large wikis with many tiddlers. But it works pretty well with smallish wikis."  Nonetheless, I expect that "freelinking" will eventually be available as an *optional* plugin, so that the tradeoffs between ease-of-linking and performance degradation can be balanced on a case-by-case basis depending upon the size and complexity of the specific TiddlyWiki document needs.

-e

TiddlyTweeter

unread,
Jan 3, 2020, 11:24:59 AM1/3/20
to TiddlyWiki
Jeremy Ruston wrote:

The plugin is available in the prerelease plugin library. That means you should download a copy of the prerelease from https://tiddlywiki.com/prerelease/empty.html or https://tiddlywiki.com/prerelease/index.html and then use the plugin library to install “freelinks”.

Right now no plugins are not showing in the library for me on that version.

Best wishes
Josiah

springer

unread,
Jan 3, 2020, 11:37:21 AM1/3/20
to tiddl...@googlegroups.com
Josiah, I was just able to get it by going to the site at https://tiddlywiki.com/prerelease/index.html
and using the control panel plugins tab there (before downloading) to "get more plugins" (from there using the second of the two links, not the "local" one). After finding and adding the freelinks plugin, I used the save function to download to my computer. It's up and running now...

springer

unread,
Jan 3, 2020, 12:04:45 PM1/3/20
to TiddlyWiki
Jeremy, Thanks!!

Just for a quick check, I set up a new prerelease with the plugin and imported my old tiddler set (several hundred strong, from the Classic version, with minimal explicit internal links) and confirmed that it displays strings corresponding to all my tiddler titles as links in RedirectMacro fashion. (So far, it doesn't do anything with alias or aliases fields, I think, although I haven't yet installed any kind of alias-related plugin in this experimental file.)

As you say, it does slow down a large wiki, even for operations that I would not have thought to be related to the link-display process... I wonder whether it would be possible to confine the virtual internal links action to a specific tagged set of tiddlers or to some other list condition? Would that help?

I think it's a marvelous working proof-of-concept, and since the plugin can be disabled (restoring nimble speed to the whole engine), I suspect many people might be intrigued by the chance to show off a tightly-woven version of their file. I could imagine disabling the plugin during long editing sessions, and turning it on for certain demonstrations. But it sure would be ideal to have a variation that keeps the potential quicksand element confined to a tag-specific sandbox of tiddlers...

Thanks again Jeremy, and all, for being such an amazingly responsive community!

-Springer

Mohammad Rahmani

unread,
Jan 3, 2020, 1:11:13 PM1/3/20
to tiddl...@googlegroups.com

 Plugins Library Prerelease

Mohammad 25th November 2019 at 4:16pm

Some Tiddlywiki empty file (empty.html) does not have the plugin library so one cannot install the official plugin. If so do as below

  1. import https://tiddlywiki.com/prerelease/#%24%3A%2Fconfig%2FOfficialPluginLibrary
  2. save and relaod
  3. got to $:/ControlPanel , Plugins tab, and click on Get more plugins


Best wishes
Mohammad


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

TonyM

unread,
Jan 3, 2020, 7:46:24 PM1/3/20
to TiddlyWiki
Folks,

Rather than us running down the performance rabbit hole again can you please consider my suggestion of optional rule in or rule out of this  as I suggested previously.

Any tiddler could be parsed for any tiddler title but the performance requirements will grow with the number of tiddlers. What about an indicator on tiddlers who's title may be worth linking to if found in another tiddler (ignoring case). Then at render one would only need to search the current tiddler for a limited set of titles. A more pervasive mode to be set for exploration only and list tiddlers who are contained in other tiddlers and you optional flag them as worthy of autolinking?

Also once an "autolink" is established what about making it permanent with square brackets added to the text.

Sometimes going 10% further produces a result that can be deployed in a wider range of situations because it can be scaled to the use case.

Regards
Tony

TiddlyTweeter

unread,
Jan 4, 2020, 12:52:24 AM1/4/20
to TiddlyWiki
Ciao springer

Thanks for the detailed description and Classic implementation example!

It looks like a very, very useful tool for writers. 

The key functional take-away from your post for me was the evident argument for, and support it gives to, writers to "stay-in-flow".

I'll write more comments about this & potential functionality in a later reply to Jeremy.

Best wishes
TT

TiddlyTweeter

unread,
Jan 4, 2020, 2:49:51 AM1/4/20
to TiddlyWiki
Ciao Jeremy 

I’ve had an initial stab at a freelinking plugin. As expected, it noticeably slows down large wikis with many tiddlers. But it works pretty well with smallish wikis. I’ve got some ideas for improving the speed, but it’s still worth trying out.

From your new initial plugin and the example in TWC that springer gave I got very excited! 
I want to make a few points from my experience of editing in general that I hope might be relevant to informing the longer term design ...

The approach to "free-link" (auto soft-linking) I think could be very, very helpful to writers. It helps you keep in "flow" whilst writing.

In addition to springer's good example (linking to special terms he needs students to understand) ...

 ... I could well use the approach in writing to develop "drafts" much better before I'm ready to "hard-code" links. 
 An example would be writing about cinema where you want to cross-reference film-titles, director's, technical terms etc.
All the cross-referenced Tiddlers would exist already. Auto soft-linking would enable me to see where I need a hard-link in
the final version  and where I don't. In other words, its an aid to writing whilst it is "in process".

So, I have a couple of suggestions that I hope you might think about ...

 1 - Be able to apply (optional) specific CSS styling to auto soft-links
      For instance, in a draft, it would help me a lot if they were in a different color than hard-links.

  2 - Could there be a toggle in the editor to switch "freelinking" on and off?
       This would help a lot in that I could quickly compare a "hard-links" only mode with added "soft-links" mode

Very best wishes
Josiah

Mat

unread,
Jan 4, 2020, 9:22:57 AM1/4/20
to TiddlyWiki
Jeremy Ruston wrote:
...from https://tiddlywiki.com/prerelease/empty.html or https://tiddlywiki.com/prerelease/index.html and then use the plugin library to install “freelinks”.

@Jeremy:  Saving from that first link gives a TW that doesn't show any plugins in the plugin library.  The second link works.

BTW, one must not save any of these by doing "right click" and download as it gives a file that, when clicked on, opens the original https page. (Instead, you go to the link and click the circled tick to save a local copy.)

I'm on Win10home/chrome.

<:-)

Mat

unread,
Jan 4, 2020, 9:42:50 AM1/4/20
to tiddl...@googlegroups.com
@Jeremy

It seems the freelinking makes this not work:

~ExistingTid

i.e the tilde doesn't disable the CC link. The tilde does disappear tho, in view mode. For freelink the tilde remains visible. I was expecting both cases to "delink". 

<:-)

Jeremy Ruston

unread,
Jan 4, 2020, 12:02:44 PM1/4/20
to TiddlyWiki
Hi Springer

Just for a quick check, I set up a new prerelease with the plugin and imported my old tiddler set (several hundred strong, from the Classic version, with minimal explicit internal links) and confirmed that it displays strings corresponding to all my tiddler titles as links in RedirectMacro fashion. (So far, it doesn't do anything with alias or aliases fields, I think, although I haven't yet installed any kind of alias-related plugin in this experimental file.)

That’s right, the plugin only implements freelinks, not aliases.

As you say, it does slow down a large wiki, even for operations that I would not have thought to be related to the link-display process... I wonder whether it would be possible to confine the virtual internal links action to a specific tagged set of tiddlers or to some other list condition? Would that help?

That’s definitely one of the options to explore for improving performance.

I think it's a marvelous working proof-of-concept, and since the plugin can be disabled (restoring nimble speed to the whole engine), I suspect many people might be intrigued by the chance to show off a tightly-woven version of their file. I could imagine disabling the plugin during long editing sessions, and turning it on for certain demonstrations. But it sure would be ideal to have a variation that keeps the potential quicksand element confined to a tag-specific sandbox of tiddlers...

It’s possible to change which tiddlers are freelinked by customising the shadow tiddler $:/plugins/tiddlywiki/freelinks/macros/view. This tiddler is tagged $:/tags/Macro/View (a new system tag) which means that it will be included as a local macro in each view template. By default, it’s content is:

<$set name="tv-freelinks" value={{$:/config/Freelinks/Enable}}/>

That means that for each tiddler the variable tv-freelinks will be set to the tiddler $:/config/Freelinks/Enable, which is set to “yes” or “no” by the settings in control panel.

Instead, we can use a filter expression to, say, only freelink the tiddler with the title “HelloThere”:

<$set name="tv-freelinks" value={{{ [<currentTiddler>match[HelloThere]then[yes]else[no]] }}}/>

Or, we can make a filter that will only freelink tiddlers with the tag “MyTag”:

<$set name="tv-freelinks" value={{{ [<currentTiddler>tag[MyTags]then[yes]else[no]] }}}/>

Or we can combine both approaches:

<$set name="tv-freelinks" value={{{ [<currentTiddler>match[HelloThere]] ~[<currentTiddler>tag[MyTag]] +[then[yes]else[no]] }}}/>

(I’ll add the above notes to the docs).

Thanks again Jeremy, and all, for being such an amazingly responsive community!

It’s a pleasure. It’s an interesting problem and I am delighted to have been able to welcome you back to the community with it,

Best wishes

Jeremy


-Springer

On Friday, January 3, 2020 at 5:47:40 AM UTC-5, Jeremy Ruston wrote:
Hi Springer

I’ve had an initial stab at a freelinking plugin. As expected, it noticeably slows down large wikis with many tiddlers. But it works pretty well with smallish wikis. I’ve got some ideas for improving the speed, but it’s still worth trying out.

The plugin is available in the prerelease plugin library. That means you should download a copy of the prerelease from https://tiddlywiki.com/prerelease/empty.html or https://tiddlywiki.com/prerelease/index.html and then use the plugin library to install “freelinks”.

Because it’s a prerelease, please don’t rely on it for anything important, but do report how it works with your existing corpus.

By default, freelinking is only applied within the main view template and the preview panel, and not, for instance, in the sidebar. At this point, automatically generated links do not appear as backlinks.

Best wishes

Jeremy.



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Jeremy Ruston

unread,
Jan 4, 2020, 12:12:58 PM1/4/20
to TiddlyWiki
Hi Tony

Rather than us running down the performance rabbit hole again can you please consider my suggestion of optional rule in or rule out of this  as I suggested previously.

Just a very gentle note that the way you’ve expressed this paragraph makes it read as an implicit criticism of the approach taken by somebody else in the thread. That kind of thing gets in the way of the points you’re trying to raise, and I’d urge you to reread postings to make sure your meaning is clear without criticising others. If you feel that people aren’t listening to your ideas then the most constructive response is to focus on expressing them clearly and concisely.

Any tiddler could be parsed for any tiddler title but the performance requirements will grow with the number of tiddlers. What about an indicator on tiddlers who's title may be worth linking to if found in another tiddler (ignoring case). Then at render one would only need to search the current tiddler for a limited set of titles. A more pervasive mode to be set for exploration only and list tiddlers who are contained in other tiddlers and you optional flag them as worthy of autolinking?

I think you’re suggesting that we give users the ability to limit the tiddlers to which freelinks are created. That’s certainly a potential performance improvement under consideration.

Also once an "autolink" is established what about making it permanent with square brackets added to the text.

Do you mean that the square brackets would be inserted any time a freelink is created? Would they be removed if the target tiddler ceases to exist? It sounds like a hybrid between the two approaches we’ve discussed:

* The dynamic approach taken by the plugin where freelinks are ephemeral, and created as required
* The static approach of automatically creating explicit links when saving a tiddler

Best wishes

Jeremy



Sometimes going 10% further produces a result that can be deployed in a wider range of situations because it can be scaled to the use case.

Regards
Tony

On Tuesday, December 31, 2019 at 4:31:07 AM UTC+11, springer wrote:
Tony asked about RedirectMacro, and I realized that my answer was going to hijack his thread about transclusion. 


In TW Classic, this plugin made for entirely seamless internal linking, no need for double-brackets nor CamelCase. Anytime a tiddler contained a string (one or more words) that matched an existing tiddler title (or an alias of it, given AliasPlugin), the tiddler would render in view mode just as if a link had been specified, though the tiddler text itself could remain without any kind of link markup. On my old ethics site, you can open a tiddler in edit mode and see the links are "not there" except in this virtual way: http://ethics.tiddlyspot.com/#happiness

Here's the kind of use case that made it fabulous: During class (there's a 5-minute warmup problem students do while I hand papers back, unpack and plug in my laptop), I could paste in a bit of from a student's written work (submitted via moodle the night before, with an excerpt from our primary texts and then a paragraph of commentary). As soon as we go from edit to view mode, EVERY technical concept in the excerpt, and every key word and red flag word in the student's commentary, is lit up as a link. I now have all the resources of my wiki available (definitions, pointers) to help structure the discussion as I correct misunderstandings, pull up more details, etc. (Here's a real example of student writing that I pasted in, and got to render with all the links with no fuss.)

If someone asks "How much trouble is it to go through and put brackets around all the key terms after you paste?" that person is probably not working in front of a live audience (where that audience is not there to get TiddlyWiki lessons).

Now, suppose that today I add three terms (with definitions, perhaps some aliases) to my wiki. With RedirectMacro, a single reload of the site was sufficient to update the display of every tiddler that already contained that word or phrase (or its aliases). 

How much trouble is it to pause, after each time I add a term, to use TiddlerCommander or another advanced search function to find tiddlers with that term and replace appearances of the term with double-bracketed reference? Someone who asks this has not been adding wiki content at the last minute while running late toward a classroom full of students. ;)

If an equivalent could be generated for TW5, I would be beyond delighted.

-Springer

On Sunday, December 29, 2019 at 12:15:40 AM UTC-5, TonyM wrote:
Springer,

Please describe "Clint Checkett's Redirect macro" because I have no idea what it does, so I can't give an indicator if there is a method to replace it. I am sure I know more than I used to with TW5.

Regards
Tony


-- 
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Jeremy Ruston

unread,
Jan 4, 2020, 12:14:21 PM1/4/20
to TiddlyWiki
Hi Josiah

 1 - Be able to apply (optional) specific CSS styling to auto soft-links
      For instance, in a draft, it would help me a lot if they were in a different color than hard-links.

I’ve added a class tc-freelink, and given it a pale background colour by default.

  2 - Could there be a toggle in the editor to switch "freelinking" on and off?
       This would help a lot in that I could quickly compare a "hard-links" only mode with added "soft-links" mode

It’s a global option, so it doesn’t really belong in the editor toolbar, which contains operations specific to a tiddler. We could make a page control button for it (like the timestamp toggle), but we’d need some artwork…

Best wishes

Jeremy.


Very best wishes
Josiah

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Jeremy Ruston

unread,
Jan 4, 2020, 12:15:46 PM1/4/20
to TiddlyWiki
Hi Mat

The freelinks plugin currently ignores the tilde character. I’ve not managed to find a good way to implement it but I’ll keep thinking about it.

Best wishes

Jeremy

On 4 Jan 2020, at 14:42, Mat <matia...@gmail.com> wrote:

@Jeremy

Possibly it seems the freelinking makes this not work:

~ExistingTid

i.e the tilde doesn't disable the CC link. The tilde does disappear tho, in view mode. For freelink the tilde remains visible. I was expecting both cases to "delink". 

<:-)
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

TonyM

unread,
Jan 5, 2020, 2:42:16 AM1/5/20
to TiddlyWiki
Jeremy,

Please find response to each question/statement of yours. No offence intended.


I think you’re suggesting that we give users the ability to limit the tiddlers to which freelinks are created. That’s certainly a potential performance improvement under consideration.

Not only limit the "tiddlers to which freelinks are created" but also the tiddler limit those "on which we display freelinks".
 

Also once an "autolink" is established what about making it permanent with square brackets added to the text.

Do you mean that the square brackets would be inserted any time a freelink is created? Would they be removed if the target tiddler ceases to exist? It sounds like a hybrid between the two approaches we’ve discussed:

Not any/everytime time, just should we wish to, on demand. The alternative to hard code by hand could be fiddly, can we automate this?. I believe the relink plugin can now handle renames.
 

* The dynamic approach taken by the plugin where freelinks are ephemeral, and created as required

Best for research, development and investigations, slower.
 
* The static approach of automatically creating explicit links when saving a tiddler

Ideal for publishing and sharing, faster.


Finally, your concern about my language.
 

Just a very gentle note that the way you’ve expressed this paragraph makes it read as an implicit criticism of the approach taken by somebody else in the thread. That kind of thing gets in the way of the points you’re trying to raise, and I’d urge you to reread postings to make sure your meaning is clear without criticising others. If you feel that people aren’t listening to your ideas then the most constructive response is to focus on expressing them clearly and concisely.

With all due respect, I believe you read something into this, that is not there. There is nothing in my statement that is a criticism of any sort. It asks "please" and says "running down the performance rabbit hole again", AND not you, he or it named, But US (The collective "we"), it was raised in response to the key concern that "freelinking" raises - performance issues.

I almost always re-read my posts and always consider how others may feel when posting, so you can expect me to do as you ask. Yet like many other posters, I assume an egoless discussion, amongst peers, where brevity is permitted as long as the meaning is clear.

If you could point out how my sentence contains "implicit criticism" I would appreciate your view. 

Regards
Tony

Eric Shulman

unread,
Jan 5, 2020, 4:11:09 AM1/5/20
to TiddlyWiki
Finally, your concern about my language.
 

Just a very gentle note that the way you’ve expressed this paragraph makes it read as an implicit criticism of the approach taken by somebody else in the thread. That kind of thing gets in the way of the points you’re trying to raise, and I’d urge you to reread postings to make sure your meaning is clear without criticising others. If you feel that people aren’t listening to your ideas then the most constructive response is to focus on expressing them clearly and concisely.

With all due respect, I believe you read something into this, that is not there. There is nothing in my statement that is a criticism of any sort. It asks "please" and says "running down the performance rabbit hole again", AND not you, he or it named, But US (The collective "we"), it was raised in response to the key concern that "freelinking" raises - performance issues.

Language is a funny thing.  I'm reminded of a saying that I learned many years ago:

"Half of communicating with others is deciding what you want to say... the other half is avoiding them hearing what they think you said."

"Running down the rabbit hole" might seem to be merely a colorful expression; however, it DOES carry some distinctly negative connotations:


" ... strange, problematic, difficult, complex, or chaotic... "

Implicit in the use of that phrase is the idea that such discussions are a waste of time and effort and that those who choose to pursue those issues are somehow being foolish or misguided in their focus, especially in comparison to the approach that you are advocating.  While I'm certain that it was not your intent, this can come across as somewhat dismissive and disrespectful of other points of view.

Just a little food for thought...

-e



Jeremy Ruston

unread,
Jan 5, 2020, 5:41:01 AM1/5/20
to TiddlyWiki
Hi Tony

Eric’s explanation is correct. I understand that that is not the meaning that you intended to convey, hence bringing it to your attention. Apologies for derailing the discussion.

Best wishes

Jeremy.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

TiddlyTweeter

unread,
Jan 5, 2020, 6:15:30 AM1/5/20
to TiddlyWiki
Jeremy Ruston wrote:

I’ve added a class tc-freelink, and given it a pale background colour by default.

Thanks, very helpful!

 TT wrote: 2 - Could there be a toggle in the editor to switch "freelinking" on and off?
 
It’s a global option, so it doesn’t really belong in the editor toolbar, which contains operations specific to a tiddler. We could make a page control button for it (like the timestamp toggle), but we’d need some artwork…

My bad. Right, its a page control.

I'm looking at SVGs of various ways of presenting links for something visibly different than "hard" links--that suggests  "softer" links.
If I find anything that looks workable I'll let you know.

Best wishes
Josiah   

TiddlyTweeter

unread,
Jan 5, 2020, 6:57:14 AM1/5/20
to TiddlyWiki
Ciao Jeremy

Jeremy Ruston wrote:

 TT wrote: 2 - Could there be a toggle <snip> to switch "freelinking" on and off?
 
We could make a page control button for it (like the timestamp toggle), but we’d need some artwork…

Some ways of presenting links:  https://iconmonstr.com/link/ (square SVG).

I thought some of these suggestive of "softer" links, like: https://iconmonstr.com/link-8-svg/

And either of these suggestive of matching "softer" UNlinks: https://iconmonstr.com/link-10-svg/  or  https://iconmonstr.com/link-12-svg/

FYI, the License agreement (https://iconmonstr.com/license/) means one can freely use the icons in an app no problem. 
But you cannot, independently, present them. 
In other words in TW: fine for use, but you can't promote them seperate from an interface.

Let me know if you want me to look for another route!

Best wishes
Josiah

Jeremy Ruston

unread,
Jan 5, 2020, 7:57:43 AM1/5/20
to tiddl...@googlegroups.com
Hi Josiah

We actually already have a link icon in $:/core/images/link:


For the new icon, we need to adapt it so that it also conveys the concept of automatic/freelinking, and to represent the on/off status graphically.

But it may be better to rethink things and use a proper checkbox. For example, you could create a tiddler with the tag $:/tags/SideBarSegment and the content:

{{$:/plugins/tiddlywiki/freelinks/settings}}

And then add the field “list-after” set to $:/core/ui/SideBarSegments/page-controls. The end result is shown below.

Best wishes

Jeremy



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

springer

unread,
Jan 5, 2020, 3:51:09 PM1/5/20
to TiddlyWiki
Hello Jeremy!

I've just verified for myself that I can limit the freelinking so that it occurs only for the tiddler titles tagged "definition". Those (and only those) title strings appear as virtual links, even as I'm viewing tiddlers without the "definition" tag.

It seems plenty responsive enough, when limited in this way!

I love TiddlyTweeter's suggestion of a slightly different look for virtual links; that will really help authors recognize what the plugin is doing, and where hardlinks will be needed if/when we need to disable freelinks. I haven't yet tried the updated pre-release, but I'm confident it's moving in a good direction.

For my purposes, if only freelinking could handle aliases (to pick up on plurals, for example), this function would save me the work of manually editing to insert links on my many existing tiddlers, AND it would have the lovely effect of allowing me to drop text from the clipboard into a tiddler and have it show key internal connections with no work at all.

Of course, the rather different linkify-on-edit plugin path would also have that benefit, and a wiki built from the beginning on that approach (together with Relink) would have virtually no call for the virtual links view macro. So maybe mine is a rare case in virtue of my long history of relying on RedirectMacro in TW Classic.

One thought about the exchange with TonyM: I think because of prior exchanges with me on another thread, TonyM had already set himself up as positively invested in experimenting with whether and how TW5 could approximate the RedirectMacro capacity I had enjoyed in Classic. Indeed, it was Tony's interest in hearing more about it that inspired me to start this thread. With that background in mind, his worry about the "rabbit hole" didn't seem abrasive to me, though there may have been some wires crossed about whether limiting the scope of freelinking was already an option under development (as it clearly already was, by the time I caught up on the thread). 

Meanwhile, I'm going down a bit of a rabbit hole of my own, trying out way too many of the bells and whistles available in TW5. I know I'll have more questions, but I'll wait until my experimentation is less frenetic, so that I know which challenges are really essential in preparing for the semester. Once the site is finished (enough), I'll be sure to invite you all to a grand-opening visit. ;)

-Springer


On Saturday, January 4, 2020 at 12:02:44 PM UTC-5, Jeremy Ruston wrote:
Hi Springer

Just for a quick check, I set up a new prerelease with the plugin and imported my old tiddler set (several hundred strong, from the Classic version, with minimal explicit internal links) and confirmed that it displays strings corresponding to all my tiddler titles as links in RedirectMacro fashion. (So far, it doesn't do anything with alias or aliases fields, I think, although I haven't yet installed any kind of alias-related plugin in this experimental file.)
...

Mark S.

unread,
Jan 5, 2020, 4:01:05 PM1/5/20
to TiddlyWiki
 

If someone asks "How much trouble is it to go through and put brackets around all the key terms after you paste?" that person is probably not working in front of a live audience (where that audience is not there to get TiddlyWiki lessons).

Haven't you just moved from the problem of performing an actual link insert, to the problem of having to remember the exact wording or phrase that will "magically" create a link?

springer

unread,
Jan 5, 2020, 5:04:28 PM1/5/20
to TiddlyWiki
Mark,

Ah, remembering //exactly which string// to type is indeed a sub-problem of the attention and effort required to accomplish the task of furnishing internal links for pasted text. However, a good alias plugin should resolve at least //most// of that sub-problem... ;)

Diego Mesa

unread,
Jan 5, 2020, 5:23:16 PM1/5/20
to TiddlyWiki
All,

I don't want to hijack the thread, just wanted to share my idea on this problem:

On each tiddler save, parse only its contents to search for "linkable" targets, then actually perform text substitution to correctly link. 

This could happen:
  • automatically: after each tiddler save,
  • manually, either:
    • on each tiddler with an editor toolbar button
    • one button in the control panel to perform it on all tiddlers that have been edited by the user since the last time this operation was performed. 
Critically, these use the tiddler saving mechanism to actually change its content automatically for us. 

Diego

springer

unread,
Jan 5, 2020, 7:04:39 PM1/5/20
to TiddlyWiki
Diego, I think something quite like your idea here was behind this thread:
 
https://groups.google.com/d/topic/tiddlywiki/dgiD-PN9KX4/discussion

The virtual (view macro) solution (as Jeremy's pre-release demonstrates) is also useful -- at least for cases like mine, but I admit that most people aren't importing (and hence bypassing the one-by-one edit process) on hundreds of existing tiddlers that are lacking explicit links.

-Springer

TiddlyTweeter

unread,
Jan 6, 2020, 2:51:44 AM1/6/20
to TiddlyWiki
Jeremy Ruston wrote:
We actually already have a link icon in $:/core/images/link:


Ciao  Jeremy

Actually I knew for once something existed :-)

What I was thinking was a second way of depicting "on" and "off" linking differently. 
Maybe like ...

Annotation 2020-01-06 083651.jpg

Annotation 2020-01-06 083652.jpg

But I get your point ... 

For the new icon, we need to adapt it so that it also conveys the concept of automatic/freelinking, and to represent the on/off status graphically.

Right, I am not finding it easy to immediately come up with a visual concept that works . 
 
But it may be better to rethink things and use a proper checkbox.

 Right. I can see how that could work for my use cases. So I'd personally be happy either with icon toggle or checkbox.

Best wishes
Josiah

For example, you could create a tiddler with the tag $:/tags/SideBarSegment and the content:

{{$:/plugins/tiddlywiki/freelinks/settings}}

And then add the field “list-after” set to $:/core/ui/SideBarSegments/page-controls. The end result is shown below.

Best wishes

Jeremy

On 5 Jan 2020, at 11:57, TiddlyTweeter <Tiddly...@assays.tv> wrote:

Ciao Jeremy

Jeremy Ruston wrote:

 TT wrote: 2 - Could there be a toggle <snip> to switch "freelinking" on and off?
 
We could make a page control button for it (like the timestamp toggle), but we’d need some artwork…

Some ways of presenting links:  https://iconmonstr.com/link/ (square SVG).

I thought some of these suggestive of "softer" links, like: https://iconmonstr.com/link-8-svg/

And either of these suggestive of matching "softer" UNlinks: https://iconmonstr.com/link-10-svg/  or  https://iconmonstr.com/link-12-svg/

FYI, the License agreement (https://iconmonstr.com/license/) means one can freely use the icons in an app no problem. 
But you cannot, independently, present them. 
In other words in TW: fine for use, but you can't promote them seperate from an interface.

Let me know if you want me to look for another route!

Best wishes
Josiah

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

TiddlyTweeter

unread,
Jan 6, 2020, 3:04:09 AM1/6/20
to TiddlyWiki
springer: 
If someone asks "How much trouble is it to go through and put brackets around all the key terms after you paste?" that person is probably not working in front of a live audience (where that audience is not there to get TiddlyWiki lessons).
 
Mark S. wrote: 
Haven't you just moved from the problem of performing an actual link insert, to the problem of having to remember the exact wording or phrase that will "magically" create a link?

Actually, Mark & springer, I think this thread hints well at the role of "implicit knowledge" in writing. 
Both springer & I gave examples where (hopefully :-) we know our field and are keen not to have to segway into hard linking till its definitely needed.

The function of what we often already know in-mind in writing, and how we use that in practice in a software tool, is fascinating.
Rather than distract this thread I'll write separately about it later.

Thoughts
TT  

springer

unread,
Feb 12, 2021, 5:55:32 PM2/12/21
to TiddlyWiki
Resurrecting "selective freelinking" issue, after a whole year! 

I have a new project with freelinks, but want to minimize the risk of slowing the wiki way down. Jeremy had explained, in this thread, how to limit freelinks:

On Saturday, January 4, 2020 at 12:02:44 PM UTC-5 jeremy... @gmail.com wrote:
Hi Springer
I think it's a marvelous working proof-of-concept, ... it sure would be ideal to [limit freelinks] to a tag-specific sandbox of tiddlers...
...It’s possible to change which tiddlers are freelinked by customising the shadow tiddler $:/plugins/tiddlywiki/freelinks/macros/view. ... we can use a filter expression to, say, ... only freelink tiddlers with the tag “MyTag”:

<$set name="tv-freelinks" value={{{ [<currentTiddler>tag[MyTags]then[yes]else[no]] }}}/>

When I tried this recently, I thought it wasn't working... until I realized we were talking past each other a bit. 
  • ALICE: I do say what I mean; I always mean what I say. It's the same thing.
  • MAD HATTER: Not in the slightest. Is it the same thing to say you see what you eat and you eat what you see?
I envisioned EVERY tiddler being poised to display with outbound freelinks, but pointing ONLY to the tiddlers with MyTag (wherever those titles are mentioned in a text field).
Instead, the recipe above limits freelinks the other way: we don't see them EXCEPT when MyTag tiddlers are being viewed (but then we see outbound links to EVERY tiddler whose title is mentioned).

So..., is it possible to develop a filter that constrains which "targets" are eligible? (Use case: I've got defined technical terms; whenever pasted-in text happens to mention the term, the term "lights up")

-Springer

Jeremy Ruston

unread,
Feb 13, 2021, 7:05:30 AM2/13/21
to TiddlyWiki Group
Hi Elise


When I tried this recently, I thought it wasn't working... until I realized we were talking past each other a bit. 
  • ALICE: I do say what I mean; I always mean what I say. It's the same thing.
  • MAD HATTER: Not in the slightest. Is it the same thing to say you see what you eat and you eat what you see?
I envisioned EVERY tiddler being poised to display with outbound freelinks, but pointing ONLY to the tiddlers with MyTag (wherever those titles are mentioned in a text field).
Instead, the recipe above limits freelinks the other way: we don't see them EXCEPT when MyTag tiddlers are being viewed (but then we see outbound links to EVERY tiddler whose title is mentioned).

So..., is it possible to develop a filter that constrains which "targets" are eligible? (Use case: I've got defined technical terms; whenever pasted-in text happens to mention the term, the term "lights up")

Ah, that makes sense. Apologies for the confusion.

I’ve made a small tweak here that adds a filter to the “Settings” page of the plugin where you can specify which tiddlers will be the targets of freelinks:


The change should be available on the prerelease in 5 or 10 minutes,

Best wishes

Jeremy



-Springer

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

springer

unread,
Feb 14, 2021, 10:40:11 AM2/14/21
to TiddlyWiki
Jeremy, brilliant, and thanks! 

I downloaded the prerelease, set the freelinking filter to [tag[Concepts]] with case insensitive, and confirmed that a new tiddler with 
         "Tiddlywiki community develops plugins, macros, and filters" 
shows Tiddlywiki (even with case difference), plus those last three terms, lit up as links (but not community). Just as envisioned!

Of course, I'm not in a position to understand yet what the performance drag will be on larger projects, but at least I should be able to narrow the scope of freelinks, without losing them altogether, if things get too slow.

Meanwhile, I don't know whether anyone else actually might have preferred some variant of the behavior as you initially set it up. Would some wish to disable freelinks *except* on some limited set of tiddlers? For example, an author might have plot-brainstorming and character-sketching tiddlers where freelinks (or freelinks to all characters and events) are helpful, but want to ensure that tiddlers with a "clean-prose" tag provide a reading experience that suppresses all internal freelinks. That's not my use-case, but I'd hate to imagine that my own nudge (to filter-limit the targets for freelinks) breaks something that would be welcome to others!

Thanks again for the super-responsive coding!

-Springer

Jeremy Ruston

unread,
Feb 14, 2021, 10:42:07 AM2/14/21
to TiddlyWiki Group
Hi Elise,

Great, glad it’s working for you.


On 14 Feb 2021, at 15:40, springer <springer...@gmail.com> wrote:

Meanwhile, I don't know whether anyone else actually might have preferred some variant of the behavior as you initially set it up. Would some wish to disable freelinks *except* on some limited set of tiddlers? For example, an author might have plot-brainstorming and character-sketching tiddlers where freelinks (or freelinks to all characters and events) are helpful, but want to ensure that tiddlers with a "clean-prose" tag provide a reading experience that suppresses all internal freelinks. That's not my use-case, but I'd hate to imagine that my own nudge (to filter-limit the targets for freelinks) breaks something that would be welcome to others!

No problem at all. I documented the approach in the readme for the plugin, and we can polish it up a bit if anyone is interested.

Best wishes

Jeremy.

springer

unread,
Feb 14, 2021, 11:07:14 AM2/14/21
to TiddlyWiki
Jeremy and all, 

The last frontier, then, is aliases... while we're at it. ;)

In addition to finding case-insensitive matches, freelinks ought to be able to look for specified variants on a tiddler's title (alternate spellings, plurals, adjectival forms, synonyms, whatever is important enough to flag). In the TWC implementation, I think the field for such strings was aliases ... although both alias and aliases have apparently been put to other uses more recently... But whatever it's called, there ought to be some field that houses any name-variations that should serve as alternate "magnets" for freelinks.

This is a can of worms, perhaps. But if the worry was about slow-down, and filters can allow us to mitigate that effect as needed, then maybe it's time to put freelinks via aliases back on the table? 

(insert Cheshire grin emoji here)

-Springer
Reply all
Reply to author
Forward
0 new messages