Drafts of the same message, accumulating

20 views
Skip to first unread message

Nicolas Richard

unread,
Aug 22, 2016, 7:51:43 AM8/22/16
to mu-discuss
Hello,

[I'm reposting this message as it seems it didn't get through when I
sent it a few weeks ago -- I hope it doesn't come as a duplicate.]

I've been observing an annoying behaviour for a long time and finally
took a closer look this morning. Here's what I have found :

When composing a new message, mu4e picks a filename for saving it to
disk as a draft. Let's say it's called `draftname`. Now if offlineimap
runs in the background, it will actually rename that file to something
else, behind emacs' back. If you save the same buffer again, it'll write
to the old name (`draftname`), hence creating a second file for the same
message.

Here's an example of a filename that got renamed :
1467805728.a37c58e0dd3aee73.localhost:2,DS
became, after a run of offlineimap :
1467806963_0.7963.localhost,U=247391,FMD5=f03ab16cd58372c77ba45a3d9a5a1cb9:2,DS
(I checked it's the same inode number).

Do you have any suggestion to avoid the problem ? i.e. avoid having
multiple drafts or at least have them removed when sending the message.

Btw here's a related emacs.sx question. I did not ask the question but I
commented on it as I think they're referring to the same problem :
http://emacs.stackexchange.com/questions/21723/how-can-i-delete-mu4e-drafts-on-successfully-sending-the-mail#comment37502_21723

--
Nicolas Richard.

Dirk-Jan C. Binnema

unread,
Aug 22, 2016, 3:23:45 PM8/22/16
to mu-di...@googlegroups.com
I think the StackExchange question/answers mix (at least!) three
problems:

1) emacs autosave / backup files; if they go to the drafts directory,
they might be indexed as mails. mu tries to avoid that (e.g. ignoring
files that start with '#' etc.); but a better solution might be
to move the autosave dir elsewhere
2) offlineimap changing draft filenames; easiest solution might be to
tell offlineimap not to sync the drafts directory. You'd lose the
ability to work on drafts from different machines, but that might not
be a big loss.
3) duplicates in the sent-mail folder; those can be dealt with using
`mu4e-sent-messages-behavior'; see its docs for details.

Cheers,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C
Reply all
Reply to author
Forward
0 new messages