Create a "New Tiddler" on tiddlywiki.com

Paste this content

<$list filter="[[test]] [[New Tiddler]]">

</$list>

---

<$list filter="[[test]] [[New Tiddler]] +[each[]]">

</$list>

---

<$list filter="[[test]] [[New Tiddler]] +[each[title]]">

</$list>

You will get

test <https://tiddlywiki.com/#test>
New Tiddler <https://tiddlywiki.com/#New%20Tiddler>
------------------------------
New Tiddler <https://tiddlywiki.com/#New%20Tiddler>
<https://tiddlywiki.com/#New%20Tiddler>
------------------------------
New Tiddler <https://tiddlywiki.com/#New%20Tiddler>

that's because "test" does not exist as a tiddler and thus has no fields.

While this matches the definition of "each" (If a tiddler does not contain 
field F, it is treated as if the value of the field were empty.), I think 
this confusing and a bug.

1. A non existing tiddler - to my understanding - has exactly one field. 
This is the "title" field.
2. It's not possible (with "each") to filter a list for duplicates.

I came across this when testin my new "pick" filter. I wanted to remove 
duplicates from the list of picked texts. The result was nil - no hit at 
all because none of the hits is an existing tiddler.

So either we require a unique (or uniq) filter which just cares for the 
names in the list and not for existance of fields, or we should fix the bug.

What do you think?

Maybe treat "each[]" as just caring for the tiddlers listed and ignoring 
fields and "each[SOMETHING]" handle like it does now.


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/0715b596-0620-49e0-8ab6-ec84fe54202e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to