A weird request

234 views
Skip to first unread message

David Gifford

unread,
Jul 1, 2021, 7:39:27 PM7/1/21
to TiddlyWiki
Hi everyone

I managed to create a macro where I would add <<mapline "Ice cream is delicious">> and in view mode it would show the equivalent of

<span class='map1'><$view tiddler="$tiddler$" field="title"/></span> &nbsp;&nbsp;<<showModal "$tiddler$">> <<icon {{$:/core/images/link}} "$tiddler$">>

It was a super fast  workflow and kept my tiddler pretty clean. I was so happy to have figured that out on my own. But I quickly realized that the links do not create backlinks, and te relink plugin doesn't rename them. And searching won't show the tiddler where the macro is.

Now I am wondering: Is there a better way? I am thinking an editortoolbar button that

1) grabs the text of another tiddler where I paste that line of text (let's say the tiddler is titled "Clipboard" and I have written in the text field, Ice cream is delicious
2) stamps the following:
@@.map1 Ice cream is delicious. @@<<showModal 'Ice cream is delicious'>> <$link to=' Ice cream is delicious'>{{$:/core/images/link}}</$link>

That way, I can write a line in Clipboard, then stamp the line as indicated above in the tiddler I am working on, and have it show up as simple text, modal and link. And backlinks will show in a view template tiddler. I recognize that renaming would only update the link, not the modal or simple text. But for what I am doing, I don't foresee needing to rename links.

Any ideas?

TW Tones

unread,
Jul 1, 2021, 8:21:16 PM7/1/21
to TiddlyWiki
David,

I think I have a possible answer, but can not yet repeat your code and see what is actually does as a start. Can you share the showModal macro and any other dependencies please?.

Also when you say "I can write a line in Clipboard", could you share more, because I think there may be further automation and simplification possible.

Thanks
Tones

David Gifford

unread,
Jul 1, 2021, 9:22:49 PM7/1/21
to tiddl...@googlegroups.com
Hi Tones thanks for the response. See replies below

On Thu, Jul 1, 2021 at 7:21 PM TW Tones <anthony...@gmail.com> wrote:
David,

I think I have a possible answer, but can not yet repeat your code and see what is actually does as a start. Can you share the showModal macro and any other dependencies please?.

This isn't the file I am referring to, but it is the same showmodal code: https://giffmex.org/wiki/nt1.a.html#%24%3A%2F.giffmex%2FEric%2FShowModal, a gift from Eric, slightly modified by me.

Also when you say "I can write a line in Clipboard", could you share more, because I think there may be further automation and simplification possible.

What I mean is, I will have an edit-text window for the tiddler Clipboard, to have open in any tiddler, as an editTemlate tiddler. My hope is to be able to type a phrase in the Clipboard tiddler, and click an editortoolbar button to stamp the following: @@.map1 XX @@<<showModal 'XX'>> <$link to='XX'>{{$:/core/images/link}}</$link>

Where XX = the present text of the Clipboard tiddler.

Then I would clear Clipboard and add new text, and hit the editor toolbar button again.

Thanks
Tones

On Friday, 2 July 2021 at 09:39:27 UTC+10 David Gifford wrote:
Hi everyone

I managed to create a macro where I would add <<mapline "Ice cream is delicious">> and in view mode it would show the equivalent of

<span class='map1'><$view tiddler="$tiddler$" field="title"/></span> &nbsp;&nbsp;<<showModal "$tiddler$">> <<icon {{$:/core/images/link}} "$tiddler$">>

It was a super fast  workflow and kept my tiddler pretty clean. I was so happy to have figured that out on my own. But I quickly realized that the links do not create backlinks, and te relink plugin doesn't rename them. And searching won't show the tiddler where the macro is.

Now I am wondering: Is there a better way? I am thinking an editortoolbar button that

1) grabs the text of another tiddler where I paste that line of text (let's say the tiddler is titled "Clipboard" and I have written in the text field, Ice cream is delicious
2) stamps the following:
@@.map1 Ice cream is delicious. @@<<showModal 'Ice cream is delicious'>> <$link to=' Ice cream is delicious'>{{$:/core/images/link}}</$link>

That way, I can write a line in Clipboard, then stamp the line as indicated above in the tiddler I am working on, and have it show up as simple text, modal and link. And backlinks will show in a view template tiddler. I recognize that renaming would only update the link, not the modal or simple text. But for what I am doing, I don't foresee needing to rename links.

Any ideas?

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/LPOIaGiXiPY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/cce8881f-fd64-4a7b-9b05-f523ae960024n%40googlegroups.com.

Flibbles

unread,
Jul 2, 2021, 11:09:30 PM7/2/21
to TiddlyWiki
Hey. I'm unsure why Relink isn't able to address this. It should be able to rename, AND it should be able to show you all references where that macro is used.

Are you saying that the macro argument to mapline isn't getting relinked?

I'm looking at your showModal(tid) that you posted. That would easily be able to relink "tid" if you include a relink declaration

\relink showModal tid
\define showModel(tid)
blah blah blah
\end

Am I misunderstanding your problem?

David Gifford

unread,
Jul 3, 2021, 10:24:56 AM7/3/21
to TiddlyWiki
Hi Tones and Flibbles, thanks again for coming to the rescue.

1. Flibbles, thanks for that snippet. It works great! Now when I rename a tiddler, the macro gets renamed too.

2. Also, I was wrong about searching, or at least it works now. If I search for "Subtiddler", which is referenced in my mapline macro in "Host tiddler", the search results in clude "Host tiddler". So I am all set in terms of searching.

3. The only thing lacking is that this be bi-directional. When I go to tiddler B that is referenced in a mapline macro in tiddler A, my view template that lists backlinks does not show a link to tiddler A. So, links in the macro are not being recognized as backlinks.

Here is an example: Open  Acts exegesis. If you click the link in that tiddler to go to Acts 17 general , you will see there is no link back to Acts exegesis at the bottom of the tiddler.

The macro can be found here: $:/.giffmex/Macro/mapline

The viewtemplate tiddler can be found here:
$:/.giffmex/ViewTemplate/Backlinks

4. This would basically be a new form of footnoting and/or transcluding: I paste the macro, add a title in the single quote marks, and voila, readers have a modal to view the additional text without losing their place, and the link is there in case they want to open to print it, or if I want to open to edit it. It is also a new form of writing/reading. The basic text would be concise lines, the skeleton of the argument, as simple or as elaborate as I wish. And the meat (lists, tables, quotes, evidence, etc) would be in the modals. Readers only need to open the modals they want to. Much easier than plodding through a long stream of dense paragraphs.

Charlie Veniot

unread,
Jul 3, 2021, 10:33:29 AM7/3/21
to TiddlyWiki
On Saturday, July 3, 2021 at 11:24:56 AM UTC-3 David Gifford wrote:
 
Here is an example: Open  Acts exegesis. If you click the link in that tiddler to go to Acts 17 general , you will see there is no link back to Acts exegesis at the bottom of the tiddler.


Looking at Acts 17 general, click on info, and click on Relink references tab.  Relink gives a backlink to Acts exegesis.  Just a matter of including Relink references to the standard TiddlyWiki backlinks.

Charlie Veniot

unread,
Jul 3, 2021, 10:36:32 AM7/3/21
to TiddlyWiki
Arg, forgot to include link to related conversation:  Get backlinks from fields

Flibbles

unread,
Jul 3, 2021, 10:36:45 AM7/3/21
to TiddlyWiki
I was just about to remark to the same effect. Backreferences only includes links with string values, nothing else. But Relink has something a little more powerful.

You have a tiddler "$:/.giffmex/ViewTemplate/Backlinks", If you change its contents to:

<<list-links filter:"[!is[system]all[current]relink:backreferences[]!title[$:/StoryList]sort[title]]">>

Then it will include all the references to a given tiddler at the bottom of that tiddler. Downside: It will include them ALL. So tags, lists, macros, references, transclusions. All will get listed there.

David Gifford

unread,
Jul 3, 2021, 11:52:15 AM7/3/21
to tiddl...@googlegroups.com
Hey everyone, thanks!!! That works great. World domination is in reach! I may never need to bother anyone at the Google forum again. Thanks again!




--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/LPOIaGiXiPY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

Charlie Veniot

unread,
Jul 3, 2021, 12:11:12 PM7/3/21
to TiddlyWiki
With some fancy footwork, maybe a little extra filtering can whittle down the results to the sweet spot, so that all are not included.  Something to figure out on a case-by-case basis?

David Gifford

unread,
Jul 3, 2021, 1:10:05 PM7/3/21
to tiddl...@googlegroups.com
No whittling needed. My actual view template is a list-search, so I can search and filter results. I will put up a sample file in a moment.




--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/LPOIaGiXiPY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

David Gifford

unread,
Jul 3, 2021, 2:21:18 PM7/3/21
to TiddlyWiki
Okay, here you go, an empty template with basic instructions and examples and a way to download. Mileage may vary on the CSS. https://giffmex.org/experiments/topicmaps.template.html. Try it and tell me what you think.

ludwa6

unread,
Jul 4, 2021, 8:07:23 AM7/4/21
to TiddlyWiki
Pretty nifty, @Dave; have installed, so i can discover how best to use this thing (1st test: a page of notes on "Dave's HideMe thingy" :-) 

In fact: as i am considering this an experimental feature -tho it does look like a nice way to implement footnotes, source references & comments, etc., i'll only know for sure with more experience- i would appreciate if all tiddlers created via this feature could be tagged automatically (as hidden, HideMe, HM, something like that), to enable post-processing of the lot in some way after the fact.  Does that make sense to you, anyone?

/walt

David Gifford

unread,
Jul 4, 2021, 8:26:06 AM7/4/21
to tiddl...@googlegroups.com
I have updated this:

1) I reinstated the double quotes in the macro, because single quotes are often used such as apostrophe-s in tiddler titles, and this will break the macro
2) I reinserted the 'edit' button to modals, so users can open the tiddler from the modal. And also because links in tiddlers aren't openable when seen in a modal.

Walt, and anyone else who tried it: just go back to https://giffmex.org/experiments/topicmaps.template.html , refresh your browser, and drag the hideme tag into your file again.

Also Walt: the macro does not in itself create tiddlers, so there is nothing special about the tiddlers accessed from it. You can do a simple search for hideme and that will call up any tiddlers in which you have used the macro.

Blessings!




ludwa6

unread,
Jul 4, 2021, 8:31:51 AM7/4/21
to TiddlyWiki
OOPS: i have just noticed that the filter feature (that came with "hidemebacklinks" pill, i guess?), when used on tiddlers that have Streams attached, presents a list (sometimes quite long!) of all the node-tiddlers attached.  This is the case even on tiddlers where i have not invoke the macro.
Is there any way to hide this filter feature? 

David Gifford

unread,
Jul 4, 2021, 9:47:27 AM7/4/21
to tiddl...@googlegroups.com
Hi Walt

I don't intend to support integration to Streams. And you don't need to use the hidebebacklinks tiddlers. But if you find it helpful but also want to hide it, edit  $:/.giffmex/ViewTemplate/Backlinks and wrap it with a details element:

<details><summary>References</summary><span>

<<list-search
"[!is[system]all[current]relink:backreferences[]!title[$:/StoryList]sort[title]] -[is[current]] -[[$:/DefaultTiddlers]] -[tag[meta]]"
"search:title"
"$:/temp/list-search-example"
"$:/core/ui/ListItemTemplate"
placeholder:"" >>

</span></details>

David Gifford
Mexico team leader, Mexico City

Resonate Global Mission
Engaging People. Embracing Christ.
A Ministry of the Christian Reformed Church
resonateglobalmission.org



ludwa6

unread,
Jul 4, 2021, 10:36:25 AM7/4/21
to TiddlyWiki
Understood, Dave, about Streams integration being out-of-scope.  Am just hoping that Streams and Topic maps (is that what you call it? [1]) can play nicely side-by-side. 

To that end: have edited $:/.giffmex/ViewTemplate/Backlinks per your instruction, and that works nicely -thanks!

NOTE [1]:  Besides wanting a canonical name for this thing, i have to ask (total n00b question, but one that has haunted me for some time): what do we call a thing like this that installs via tag pill, but is not a plugin?  
I noticed on importing those two tag pills that there were more than two tiddlers that got installed/ updated, but since it does not appear in list of plugins, i have no way to turn the feature on/off, or even traceback to the tiddlers that make it work.  
If i run advanced search on string "giffmex", i get a list of some 20 System tiddlers, and another list considerably longer of Shadow tiddlers (having installed so many giffmex doo-dads, including Stroll, Toggle!, Customizer, Sidebar plugin, BookTools, etc... Think there might be some house-cleaning in order here?  <8-)



On Sunday, July 4, 2021 at 2:47:27 PM UTC+1 David Gifford wrote:
Hi Walt

I don't intend to support integration to Streams. And you don't need to use the hidebebacklinks tiddlers. But if you find it helpful but also want to hide it, edit  $:/.giffmex/ViewTemplate/Backlinks and wrap it with a details element:

<details><summary>References</summary><span>

<<list-search
"[!is[system]all[current]relink:backreferences[]!title[$:/StoryList]sort[title]] -[is[current]] -[[$:/DefaultTiddlers]] -[tag[meta]]"
"search:title"
"$:/temp/list-search-example"
"$:/core/ui/ListItemTemplate"
placeholder:"" >>

</span></details>

David Gifford
Mexico team leader, Mexico City

Resonate Global Mission
Engaging People. Embracing Christ.
A Ministry of the Christian Reformed Church
resonateglobalmission.org
...

David Gifford

unread,
Jul 4, 2021, 2:07:25 PM7/4/21
to tiddl...@googlegroups.com


On Sun, Jul 4, 2021, 9:36 AM ludwa6 <wlud...@gmail.com> wrote:
Understood, Dave, about Streams integration being out-of-scope.  Am just hoping that Streams and Topic maps (is that what you call it? [1]) can play nicely side-by-side. 

That would be great!

To that end: have edited $:/.giffmex/ViewTemplate/Backlinks per your instruction, and that works nicely -thanks!

Phew! Glad it works!

NOTE [1]:  Besides wanting a canonical name for this thing, i have to ask (total n00b question, but one that has haunted me for some time): what do we call a thing like this that installs via tag pill, but is not a plugin?

No official name, just an easy way to transfer multiple tiddlers 
  
I noticed on importing those two tag pills that there were more than two tiddlers that got installed/ updated, but since it does not appear in list of plugins, i have no way to turn the feature on/off, or even traceback to the tiddlers that make it work.  

Yes, I should package Stroll and this hideme thing as plugins as I did for customizer. 

Tracing back to the tiddlers is easy since they all have the same tag.

If i run advanced search on string "giffmex", i get a list of some 20 System tiddlers, and another list considerably longer of Shadow tiddlers (having installed so many giffmex doo-dads, including Stroll, Toggle!, Customizer, Sidebar plugin, BookTools, etc... Think there might be some house-cleaning in order here?  <8-)

If I had charged for these, you would have made me rich! :-)

Think of my things as individual tools, and mix and match accordingly.

Hmmm later today l will need to add relink plugin as a dependency since the hideme v.t. uses that...

The good news is that I should be done tweaking for a while! So no more giffmex doodads for the moment. I have a six month project and these fixes to hideme were the last remaining hurdles. Now I will be reading and writing and doing all I can to avoid tweaking TW.



On Sunday, July 4, 2021 at 2:47:27 PM UTC+1 David Gifford wrote:
Hi Walt

I don't intend to support integration to Streams. And you don't need to use the hidebebacklinks tiddlers. But if you find it helpful but also want to hide it, edit  $:/.giffmex/ViewTemplate/Backlinks and wrap it with a details element:

<details><summary>References</summary><span>

<<list-search
"[!is[system]all[current]relink:backreferences[]!title[$:/StoryList]sort[title]] -[is[current]] -[[$:/DefaultTiddlers]] -[tag[meta]]"
"search:title"
"$:/temp/list-search-example"
"$:/core/ui/ListItemTemplate"
placeholder:"" >>

</span></details>

David Gifford
Mexico team leader, Mexico City

Resonate Global Mission
Engaging People. Embracing Christ.
A Ministry of the Christian Reformed Church
resonateglobalmission.org
...

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/LPOIaGiXiPY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages