Jeremy,

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

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.
   - There is nothing to "protect" us from this occurring.

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
>
> This problem has been reported quite frequently so I'm keen to fix it for 
> the next version.
>
> Best wishes
>
> Jeremy
>
> --
> Jeremy Ruston
> [email protected] <javascript:>
> https://jermolene.com
>
> On 4 Aug 2020, at 13:53, yrosgi L <[email protected] <javascript:>> 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 [email protected] <javascript:>.
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/24d2d047-1e93-4850-bd83-aa02e32e7f53o%40googlegroups.com.

Reply via email to