all intermediate drafts appear in threads (v0.24.2, Emacs 25.2)

classic Classic list List threaded Threaded
7 messages Options
Sanjoy Mahajan Sanjoy Mahajan
Reply | Threaded
Open this post in threaded view
|

all intermediate drafts appear in threads (v0.24.2, Emacs 25.2)

I save an outgoing email as I write it and often (as if it were a
regular document) by using the usual Emacs key sequence C-x C-s.  With
notmuch v0.24, notmuch saves a proper draft each time I use C-x C-s.
The result is a million drafts, which may be good.

However, it means that the thread view (in notmuch-show mode) includes
the zillion drafts.  Attached is a screenshot of what I mean (sorry that
it is so small -- I downsampled it to get within the message-size
limit).  I made the example by sending myself (sanjoy@localhost) a short
msg.  Then I replied to it with 'r', and saved the reply a few times
(first with "Draft v1" as the body text, the next time with "Draft v2",
etc.).

I then sent the v3 reply.

Attached are the individual mail files as a tgz archive.  The thread was
generated by the Emacs-front-end equivalent of

  $ notmuch search from:sanjoy date:today.. subject:fake

which produces

thread:000000000002e52b 19 mins. ago [3/6] Sanjoy Mahajan; fake msg to test
appearance of drafts in thread (deleted draft new replied unread)

In my .notmuch-config I have

[search]
exclude_tags=spam;deleted;draft

but the summary output from notmuch-search counts deleted and draft
messages anwyay.  Adding --exclude=all helps, and I've done that to my
version of "notmuch-search", but that fixes only the messages-matching
counts (it is 3/3 instead of 3/6):

  $ notmuch search --exclude=all from:sanjoy date:today.. subject:fake
  thread:000000000002e52b 23 mins. ago [3/3] Sanjoy Mahajan; fake msg to test
appearance of drafts in thread (new replied)

But even so the view of the thread inside Emacs still shows the deleted
or draft messages.

I am using Debian's Emacs 25.2 w/ notmuch 0.24.2.

Did I miss something in the configuration?  Or should I be using the
drafts differently?

-Sanjoy

<http://savelongwharfpark.org/>
Save Long Wharf Park in Boston Harbor!

<http://streetfightingmath.com/>
Six reasoning tools to make hard problems easy.


_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

screen-shot.png (103K) Download Attachment
lots-of-drafts-in-thread-maildir.tgz (1K) Download Attachment
Gregor Zattler Gregor Zattler
Reply | Threaded
Open this post in threaded view
|

Re: all intermediate drafts appear in threads (v0.24.2, Emacs 25.2)

Hi Sanjoy,
* Sanjoy Mahajan <[hidden email]> [13. Jul. 2017]:
> I save an outgoing email as I write it and often (as if it were a
> regular document) by using the usual Emacs key sequence C-x C-s.  With
> notmuch v0.24, notmuch saves a proper draft each time I use C-x C-s.
> The result is a million drafts, which may be good.
>
> However, it means that the thread view (in notmuch-show mode) includes
> the zillion drafts.  
[... 38 Zeilen gelöscht ...]

> Did I miss something in the configuration?  Or should I be using the
> drafts differently?

Same here.  Once in a while I do a

notmuch search --format=text0 --output=files is:deleted | xargs -0r rm

, which deletes all emails marked as "deleted".  After the next
notmuch new they do not show up in the threads any more.  This
could be automated by a cron job or so, but it didn't bother me
enough to do so.

Ciao, Gregor
--
 -... --- .-. . -.. ..--.. ...-.-

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: all intermediate drafts appear in threads (v0.24.2, Emacs 25.2)

In reply to this post by Sanjoy Mahajan
Sanjoy Mahajan <[hidden email]> writes:

> I save an outgoing email as I write it and often (as if it were a
> regular document) by using the usual Emacs key sequence C-x C-s.  With
> notmuch v0.24, notmuch saves a proper draft each time I use C-x C-s.
> The result is a million drafts, which may be good.
>
> However, it means that the thread view (in notmuch-show mode) includes
> the zillion drafts.  Attached is a screenshot of what I mean (sorry that
> it is so small -- I downsampled it to get within the message-size
> limit).  I made the example by sending myself (sanjoy@localhost) a short
> msg.  Then I replied to it with 'r', and saved the reply a few times
> (first with "Draft v1" as the body text, the next time with "Draft v2",
> etc.).

It could be a nice feature to toggle visibility of drafts (and other
excluded messages) in notmuch-show mode. So far nobody wrote such a
thing.

Two things you might find useful to know:

    - you can resume editing a previous draft with 'e'
    - autosaving does not create drafts

If it really bugs you, you could override the binding C-x C-s in
notmuch-show mode.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Matt Armstrong Matt Armstrong
Reply | Threaded
Open this post in threaded view
|

Re: all intermediate drafts appear in threads (v0.24.2, Emacs 25.2)

David Bremner <[hidden email]> writes:

> Sanjoy Mahajan <[hidden email]> writes:
>
>> I save an outgoing email as I write it and often (as if it were a
>> regular document) by using the usual Emacs key sequence C-x C-s.  With
>> notmuch v0.24, notmuch saves a proper draft each time I use C-x C-s.
>> The result is a million drafts, which may be good.
>>
>> However, it means that the thread view (in notmuch-show mode) includes
>> the zillion drafts.  Attached is a screenshot of what I mean (sorry that
>> it is so small -- I downsampled it to get within the message-size
>> limit).  I made the example by sending myself (sanjoy@localhost) a short
>> msg.  Then I replied to it with 'r', and saved the reply a few times
>> (first with "Draft v1" as the body text, the next time with "Draft v2",
>> etc.).
>
> It could be a nice feature to toggle visibility of drafts (and other
> excluded messages) in notmuch-show mode. So far nobody wrote such a
> thing.
>
> Two things you might find useful to know:
>
>     - you can resume editing a previous draft with 'e'
>     - autosaving does not create drafts
>
> If it really bugs you, you could override the binding C-x C-s in
> notmuch-show mode.

This is happening to me on a fairly regular basis too.  Is there
something I can bind C-x C-s to in notmuch-show that doesn't create a
new draft?

I like the idea of saving the drafts in the DB, so perhaps just getting
the deleted stuff working in an unsurprising way in notmuch-show is the
best way forward.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: all intermediate drafts appear in threads (v0.24.2, Emacs 25.2)

Matt Armstrong <[hidden email]> writes:

> David Bremner <[hidden email]> writes:

> This is happening to me on a fairly regular basis too.  Is there
> something I can bind C-x C-s to in notmuch-show that doesn't create a
> new draft?
>
> I like the idea of saving the drafts in the DB, so perhaps just getting
> the deleted stuff working in an unsurprising way in notmuch-show is the
> best way forward.

For me, when I save a second draft, the first is tagged as deleted, and
then mostly not shown. It's not perfect, but it's good enough at the
moment. One person I talked to who was confused by the number of drafts
in their inbox had excludes turned off. Excludes won't prevent deleted
drafts showing up in threads, but they will be collapsed.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Matt Armstrong Matt Armstrong
Reply | Threaded
Open this post in threaded view
|

Re: all intermediate drafts appear in threads (v0.24.2, Emacs 25.2)

David Bremner <[hidden email]> writes:

> Matt Armstrong <[hidden email]> writes:
>
>> David Bremner <[hidden email]> writes:
>
>> This is happening to me on a fairly regular basis too.  Is there
>> something I can bind C-x C-s to in notmuch-show that doesn't create a
>> new draft?
>>
>> I like the idea of saving the drafts in the DB, so perhaps just getting
>> the deleted stuff working in an unsurprising way in notmuch-show is the
>> best way forward.
>
> For me, when I save a second draft, the first is tagged as deleted, and
> then mostly not shown. It's not perfect, but it's good enough at the
> moment. One person I talked to who was confused by the number of drafts
> in their inbox had excludes turned off. Excludes won't prevent deleted
> drafts showing up in threads, but they will be collapsed.

Ah thanks, that was it for me too.  I've restored exclude_tags to the
default "deleted;spam;" setting.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Sanjoy Mahajan Sanjoy Mahajan
Reply | Threaded
Open this post in threaded view
|

Re: all intermediate drafts appear in threads (v0.24.2, Emacs 25.2)

In reply to this post by David Bremner-2
On 2017-07-18 07:42, David Bremner <[hidden email]> wrote:

> Two things you might find useful to know:
>
>     - you can resume editing a previous draft with 'e'
>     - autosaving does not create drafts
>
> If it really bugs you, you could override the binding C-x C-s in
> notmuch-show mode.

I think that's the best solution for me.  I can more easily reprogram
Emacs than I can my fingers (which have been programmed by Emacs, and
use C-x C-s reflexively).

--
-Sanjoy

<http://savelongwharfpark.org/>
Save Long Wharf Park in Boston Harbor!

<http://streetfightingmath.com/>
Six reasoning tools to make hard problems easy.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch