Listing/listed

70 views
Skip to first unread message

Hubert

unread,
Dec 3, 2018, 9:29:10 AM12/3/18
to TiddlyWiki
Hello,

I've noticed that when the title of a tiddler being listed in another tiddler is changed, the list of the listing tiddler is also adjusted to reflect the modified title of the listed tiddler.

However, this automatic adjustment only seems to happen if the parameter for the listed filter is set to none; if the parameter is set to an arbitrary value matching a field whose name is other than 'list; the automatic adjustment is not taking place. Is this by design? If so, can we extend this functionality to fields not named 'list'?

Many thanks,
Hubert

Eric Shulman

unread,
Dec 3, 2018, 11:30:05 AM12/3/18
to TiddlyWiki
On Monday, December 3, 2018 at 6:29:10 AM UTC-8, Hubert wrote:
I've noticed that when the title of a tiddler being listed in another tiddler is changed, the list of the listing tiddler is also adjusted to reflect the modified title of the listed tiddler.  However, this automatic adjustment only seems to happen if the parameter for the listed filter is set to none; if the parameter is set to an arbitrary value matching a field whose name is other than 'list; the automatic adjustment is not taking place. Is this by design? If so, can we extend this functionality to fields not named 'list'?

As you've noted, the "list" field has special handling that allows for automatic substitution when a title is changed.  This is possible because the "list" field is always treated as a *space-separated list of tiddler titles*.  Thus, it can be parsed for individual title matches to recognize when a title has been changed and replace only that title text within the field value.

The problem with doing this for other fields is that they can contain spaces that are just normal text not intended to be treated as separators between titles.

Consider two fields where
   list = "foo bar baz" (a list of three tiddler titles)
and
   otherfield = "this ice cream bar is tasty" (some normal text)

If you change the title of the tiddler named "bar" to "mumble", then the value of "list" is updated to "foo mumble baz"

However, the value of "otherfield" should remain unchanged even though it contains "bar", because that is just normal text.

Currently, ALL field content except for the "list" field are treated as normal text (see note below).  To achieve what you want, we would need to be able to explicitly specify which fields are to have the special list handling to differentiate them from regular fields containing text with spaces.

note: standard tiddler date fields ("created" and "modified") are *stored* as normal text using format "YYYY0MM0DD0hh0mm0ss0XXX" (e.g. "20150117190213631" for January 17, 2015 at 19:02:13.631).  These fields can be formatted for date/time *display* using the <$view ... format="date"...> widget.

-e

TonyM

unread,
Dec 3, 2018, 10:12:29 PM12/3/18
to TiddlyWiki
Eric,

If it were posible to nominate other fields to behave and update titles it would be helpful, after all tiddlywiki is all about tiddlers and lists.

Actualy, Mario s gentags macro does this.

Regards
Tony

Reply all
Reply to author
Forward
0 new messages