[TW5] Could update work on modified tiddlers original copy?

78 views
Skip to first unread message

Mat

unread,
Apr 2, 2015, 5:20:01 AM4/2/15
to tiddl...@googlegroups.com
I'm always a bit hesitant in modifying core tiddlers. On the one hand I guess I should be... but then, hacking is what TW is about.

But first there's the "what if I break something". While I guess that is possible, am I right in that in most cases I can just delete the tiddler and the core will re-use the original?

...and what does that mean actually, that it created a copy as soon as I started to modify it?

Second, there is the updating aspect. Modified core tiddler, not update to it.

Now, I'm wondering if there actually is a copy kept of the original, then why can't we let this copy be updated so that if I delete my modified version then I revert back but to an updated original.

Thoughts?

<:-)

PMario

unread,
Apr 2, 2015, 5:35:54 AM4/2/15
to tiddl...@googlegroups.com
On Thursday, April 2, 2015 at 11:20:01 AM UTC+2, Mat wrote:
I'm always a bit hesitant in modifying core tiddlers. On the one hand I guess I should be... but then, hacking is what TW is about.

That's why there is the warning if you open a core tiddler.
 
But first there's the "what if I break something". While I guess that is possible, am I right in that in most cases I can just delete the tiddler and the core will re-use the original?

Don't use "production" for your experiments, without a backup.
__Backup__ is the key word here! ...

If you break something, but the edit / save mechanism still works you just delete your modified tiddler and the core tiddler will take over again.

...and what does that mean actually, that it created a copy as soon as I started to modify it?

yes.

Second, there is the updating aspect. Modified core tiddler, not update to it.

If you modify a core tiddler, you don't get core updates to this tiddler anymore, because your modification will take precedence. ... That's intended by design!
 
Now, I'm wondering if there actually is a copy kept of the original, then why can't we let this copy be updated so that if I delete my modified version then I revert back but to an updated original.

That's the case. The core is only 1 plugin, that contains all the tiddlers.
The core will be updated, including your modified tiddler. But since your tiddler is activated later, your modification will overwrite the updated core.

-mario

Mat

unread,
Apr 2, 2015, 8:01:58 AM4/2/15
to tiddl...@googlegroups.com
Thanks for your replies Mario!



Don't use "production" for your experiments, without a backup.

You're of course right.  Hours would have been saved over the years had I not needed to "juuust improve that one little minor detail so I couldn't possibly need to backup this one time".
 
 
if there actually is a copy kept of the original, then why can't we let this copy be updated so that if I delete my modified version then I revert back but to an updated original.
 
That's the case.

Excellent!

I hadn't realized core was a single plugin and so I thought the reasoning was "the user has updated tiddler X so it will not be updated so to not have it overwritten." Glad to understand this is not how it works.

----------------------------------------------


BTW, the current warning message merely gives the rather cryptic information that "future upgrades will be non-trivial". Maybe the warning message inform (or link to) an explanation with something along:

"If you modify a shadow tiddler, a copy of the original version will be kept. Updating your TiddlyWiki will update this original copy but not your modified copy. Deleting your modified copy will re-activate the original shadow tiddler."

Considering our target user groups, and as indicated by this thread, I believe this is of value for a user to know. If he is advanced enough to mess with shadow tiddlers, then this is relevant info.

-----------------------------------------------


Another question, from pondering on the above. Are these statements true:

1a) "Default/empty TW =  shadowTiddlers + systemTiddlers", i.e nothing more.

1b) ...and "Default/empty TW =  corePlugin + someOtherPlugins" i.e nothing more.

2) "coreTiddlers = someOfTheShadowTiddlers + someOfTheSystemTiddlers", i.e nothing more.

3) "defaultShadowTiddlers = coreShadowTiddlers + pluginShadowTiddlers", i.e nothing more.



Thank you Mario, or whoever is kind to answer.

<:-)

Jeremy Ruston

unread,
Apr 2, 2015, 8:18:41 AM4/2/15
to TiddlyWiki
Hi Mat

> "Default/empty TW =  shadowTiddlers + systemTiddlers", i.e nothing more.

> "coreTiddlers = someOfTheShadowTiddlers + someOfTheSystemTiddlers", i.e nothing more.

> "defaultShadowTiddlers = coreShadowTiddlers + pluginshadowtiddlers", i.e nothing more.

I think there's a bit of confusion here. Here's how I think about this stuff:

* Any tiddler whose title starts $:/ is a system tiddler. (Independently of whether it's a shadow, a plugin or anything else)
* There are special tiddlers called plugins that each contain a bunch of shadow tiddlers. These shadow tiddlers have the property that they can be overridden with a real tiddler. A consequence is that if one deletes a tiddler that is overriding a shadow tiddler, then the shadow is reinstated
* There is a special plugin called $:/core that contains the TiddlyWiki core code and user interface
* An "empty" TiddlyWiki must still include the $:/core plugin in order to operate correctly

I think that covers the concepts you're trying to describe. Note that there is no concept of "default shadow tiddlers".

Best wishes

Jeremy.




On Thu, Apr 2, 2015 at 1:01 PM, Mat <matia...@gmail.com> wrote:
Thanks for your replies Mario!


Don't use "production" for your experiments, without a backup.

You're of course right.  Hours would have been saved over the years had I not needed to "juuust improve that one little minor detail so I couldn't possibly need to backup this one time".
 
 
if there actually is a copy kept of the original, then why can't we let this copy be updated so that if I delete my modified version then I revert back but to an updated original.
 
That's the case.

Excellent!

I hadn't realized core was a single plugin and so I thought the reasoning was "the user has updated tiddler X so it will not be updated so to not have it overwritten." Glad to understand this is not how it works.

----------------------------------------------


BTW, the current warning message merely gives the rather cryptic information that "future upgrades will be non-trivial". Maybe the warning message inform (or link to) an explanation with something along:

"If you modify a shadow tiddler, a copy of the original version will be kept. Updating your TiddlyWiki will update this original copy but not your modified copy. Deleting your modified copy will re-activate the original shadow tiddler."

Considering our target user groups, and as indicated by this thread, I believe this is of value for a user to know. If he is advanced enough to mess with shadow tiddlers, then this is relevant info.

-----------------------------------------------


Another question, from pondering on the above. Are these statements true:

"Default/empty TW =  shadowTiddlers + systemTiddlers", i.e nothing more.

"coreTiddlers = someOfTheShadowTiddlers + someOfTheSystemTiddlers", i.e nothing more.

"defaultShadowTiddlers = coreShadowTiddlers + pluginshadowtiddlers", i.e nothing more.




Thank you Mario, or whoever is kind to answer.

<:-)

--
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 post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/a25e2c9e-95e9-4b57-858a-5b3c2be0b139%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

PMario

unread,
Apr 2, 2015, 10:07:18 AM4/2/15
to tiddl...@googlegroups.com
On Thursday, April 2, 2015 at 2:01:58 PM UTC+2, Mat wrote:
Another question, from pondering on the above. Are these statements true:

1a) "Default/empty TW =  shadowTiddlers + systemTiddlers", i.e nothing more.

The problem here is that empty.html can be different for every TW edition. For me a german version can be empty with a german interface. But from Jeremys point of view this is different.

eg: see: https://github.com/Jermolene/TiddlyWiki5/blob/master/core/templates/save-empty.tid
This tiddler defines the filter to save an empty.html  in the core code. So this is used, if not re-defined.

\define saveTiddlerFilter()
[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
\end


see: https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/tiddlers/system/download-empty.tid
Download empty.html from tiddlywiki.com

\define saveTiddlerFilter()
[[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
\end


see: https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/de-AT/tiddlers/system/%24__editions_de-AT-DE_download-empty.tid
Downloads tiddlywiki.html from http://tiddlywiki.com/languages/de-AT/ and de-DE

\define saveTiddlerFilter()
[[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] [[$:/languages/de-DE]] [[$:/languages/de-AT]] [[$:/language]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
\end


This uses the same mechanism, but saves the file as tiddlywiki.hmtl. ... Which may be better named as: tiddlywiki-de-AT.html or tiddlywiki-de-DE.html

But imo we didn't discuss this topic yet.

have fun!
mario


Reply all
Reply to author
Forward
0 new messages