Hi TWTones

> This would be a wise improvement. However it is not necessarily dealing with 
> the cause.

It’s not clear how the draft of the draft was created; the system tries to 
prevent it (see below) but there’s no structural obstacle to a draft of a draft 
and so when custom code comes into play it’s perfectly possible to create one.

> Multiple drafts seem to come from the fact that many lists will show both the 
> draft of and the non draft tiddler.
> If an edit is done on the original tiddler while a draft tiddler already 
> exists multiple drafts can come into play.
That’s not correct, the system will reuse the existing draft. For example, on 
tiddlywiki.com:

1. Edit HelloThere and delete all the text and replace it with “Testing", but 
don’t click the tick to save it
2. Use the sidebar “Open” tab to close the draft tiddler
3. Use the search box to open HelloThere
4. Click the edit button
5. You’ll see the text “Testing”, showing that the same draft was reused.
> There is nothing to "protect" us from this occurring.
The navigator widget does in fact check for an existing draft when asked to 
edit a tiddler.

Best wishes

Jeremy

> It is not necessarily the full solution, however with help I recently came up 
> with the following code pattern to hide the non-draft title while a draft 
> title exists in a list.
> 
> \define hasdrafts() {{{ [list[$:/StoryList]get[draft.of]] }}} 
> 
> <$list 
> filter="[{$:/HistoryList}split<title-string>splitbefore<end-title>removesuffix<end-title>reverse[]is[tiddler]limit[20]]">
>     <$list filter="[all[current]] -[subfilter<hasdrafts>]">
>         {{||$:/core/ui/Buttons/edit}} {{||$:/core/ui/Buttons/open-window}} 
> <$link/> <<close-if-open-button>><br>
>     </$list> 
> </$list>
> This is done for the history list
> 
> I wonder if a filter that allows us to say something like !has[draft.of]] and 
> has[draft.of]] but works like my above solution
> Allow us to include or exclude tiddler titles for which there is a draft 
> somewhere/anywhere (not just the current title)
> eg "New Tiddler" is the title but there is/or is not a "Draft of 'New 
> Tiddler'" in the wiki.
> Perhaps an operator draft[] and !draft[] that tests both if the current title 
> begins "draft of" or a draft of for this tiddler exists anywhere.
> Many of the standard lists have this feature built in, but I am hoping we can 
> make this easier to implement, so user lists can implement this easily.
> 
> Regards
> TW Tones
> 
> On Thursday, August 6, 2020 at 7:09:24 PM UTC+10, Jeremy Ruston wrote:
> Hi yrosgi
> 
> The problem here is that deleting a draft also deletes the underlying 
> original tiddler. I've made a GitHub ticket to describe the issue here:
> 
> https://github.com/Jermolene/TiddlyWiki5/issues/4792 
> <https://github.com/Jermolene/TiddlyWiki5/issues/4792>
> 
> This problem has been reported quite frequently so I'm keen to fix it for the 
> next version.
> 
> Best wishes
> 
> Jeremy
> 
> --
> Jeremy Ruston
> jer...@jermolene.com <>
> https://jermolene.com <https://jermolene.com/>
>> On 4 Aug 2020, at 13:53, yrosgi L <yro...@gmail.com <>> wrote:
>> 
>> 
>> PS: because the last time I lost a tiddler(recover from git history 
>> finally), this time I choose to close the draft of the draft of something, 
>> and it will become to a draft of something, and then close it normally. 
>> Fixed.
>> 
>> -- 
>> 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 tiddl...@googlegroups.com <>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/1b84093f-df39-406a-b808-f0660e9bb498o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/1b84093f-df39-406a-b808-f0660e9bb498o%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> <mailto:tiddlywiki+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/24d2d047-1e93-4850-bd83-aa02e32e7f53o%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/24d2d047-1e93-4850-bd83-aa02e32e7f53o%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/DE79455F-1C9D-4286-9BDA-09B63D71CCFE%40gmail.com.

Reply via email to