Should store.setTiddlerTag set modified date?

4 views
Skip to first unread message

Simon Baird

unread,
Mar 26, 2008, 10:42:43 AM3/26/08
to TiddlyWikiDev
I am thinking perhaps it should. But is it a feature that it doesn't? It does call incChangeCount so that seems to indicate it that the tiddler has changed hence it would be appropriate to set the mod date. Any thoughts? It is worth a ticket?

--
simon...@gmail.com

FND

unread,
Mar 26, 2008, 11:31:55 AM3/26/08
to Tiddly...@googlegroups.com
> I am thinking perhaps it should. But is it a feature that it doesn't? It
> does call incChangeCount so that seems to indicate it that the tiddler
> has changed hence it would be appropriate to set the mod date. Any

I tend to agree - although maybe a fourth argument ("minorUpdate")
should be introduced to prevent that modification.

> It is worth a ticket?

Absolutely - if only to record that the issue has been raised before,
which is useful whether we decide to "fix" this or not.


-- F.

FND

unread,
Mar 26, 2008, 1:10:19 PM3/26/08
to Tiddly...@googlegroups.com
> It is worth a ticket?

Here we go:
http://trac.tiddlywiki.org/ticket/538


-- F.

Eric Shulman

unread,
Mar 26, 2008, 3:09:31 PM3/26/08
to TiddlyWikiDev
> I tend to agree - although maybe a fourth argument ("minorUpdate")
> should be introduced to prevent that modification.

I suggest that the new argument should be 'true' if the date should be
updated, and false (or omitted) to use the current behavior (i.e., not
updating the timestamp). That way, the new handling can be used where
appropriate, without breaking existing plugins (e.g., CheckboxPlugin).

-e

FND

unread,
Mar 26, 2008, 3:32:47 PM3/26/08
to Tiddly...@googlegroups.com
> I suggest that the new argument should be 'true' if the date should be
> updated, and false (or omitted) to use the current behavior

Indeed - I should have considered that in the first place, but I guess I
was eager to keep consistency with "minorUpdate".
So what shall we call this argument now (the obvious choice,
"majorUpdate", probably isn't a good idea)?


-- F.

Simon Baird

unread,
Mar 30, 2008, 8:21:54 AM3/30/08
to Tiddly...@googlegroups.com
Also I'd like it to (optionally) trigger an autosave.
--
simon...@gmail.com

Eric Shulman

unread,
Mar 30, 2008, 8:31:39 AM3/30/08
to TiddlyWikiDev


On Mar 30, 5:21 am, "Simon Baird" <simon.ba...@gmail.com> wrote:
> Also I'd like it to (optionally) trigger an autosave.

store.setTiddlerTag() is supposed to be a low-level internal
function. Auto-saving the file is currently triggered by using
store.saveTiddler(), which is hijacked by several plugins (and server-
side adaptations such as ccTiddly) so that save-related side-effects
can be triggered when the tiddler is saved.

If setTiddlerTag() were to save the file, these enhancements would be
bypassed (for example, ccTiddly would fail to save the changes)

-e

Simon Baird

unread,
Mar 30, 2008, 8:44:21 AM3/30/08
to Tiddly...@googlegroups.com
Hmm, then maybe what I need is to write a wrapper for saveTiddler that I can use to set a tag. I've noticed that setTiddlerTag does seem to trigger the "there are unsaved changes" message, so it is doing something at a higher level.
--
simon...@gmail.com

Saq Imtiaz

unread,
Mar 30, 2008, 8:47:51 AM3/30/08
to Tiddly...@googlegroups.com
A little off-topic, but did you guys realize that store.setValue can be used to set any field of a tiddler, extended or not? It tends to be my weapon of choice for changing tiddler text etc. Note that it does notify that the tiddler has changed but does not set the store as dirty.

setTiddlerTag sets the store as dirty, notifies the store as well but does not call saveChanges.

Saq

FND

unread,
Mar 31, 2008, 3:17:48 PM3/31/08
to Tiddly...@googlegroups.com
Jeremy's thoughts on this ticket:
http://trac.tiddlywiki.org/ticket/538#comment:4


-- F.

Reply all
Reply to author
Forward
0 new messages