-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exception editing draft message from inbox #225
Comments
See issue #220. Short answer: you cannot edit drafts that are in a Maildir. |
Okay, thanks! If you have time, can you clarify how my draft got into the Maildir? I'm not doing anything like #220 is doing, setting a label on a source draft folder. I am using the sync-back features, and the thread does have a label on it. Which of my behaviors is causing the issue (since I'd like to avoid it in the future)? Thanks again! |
Actually, I don't think this deals with issue #220 at all now. However, I cannot reproduce. Any other details about the specific thread you can provide? |
Draft does have a corresponding maildir flag ('D' means :draft). Seems like we're adding the draft label to messages polled from maildirfolders that have been marked as drafts externally. |
For now (until Maildir draft editing is possible), is it best to just disable the application of this label then? (https://github.com/sup-heliotrope/sup/blob/develop/lib/sup/maildir.rb#L182) |
I can't see anything peculiar about the thread itself. Single email to me, I sent a reply, and then a reply back to me. Oddly, the thread still indicates the presence of a draft, though the edited and sent draft appears in the thread. Here's the exception-log.txt when I try to edit the lingering draft:
It's identical to the other exception except for a different hash after |
@cscorley: yes, gracefully handle the draft label on any sync. Ignore it like other labels (e.g.: :killed), that is, remove it from the supported labels list. |
@acodispo: the hash will change each time the Maildir class is instantiated in Ruby (when you start sup). |
Is there a way to clear the draft status on that message? The message I was working on (i.e. the draft) is sent and done with, and it seems messy to leave it lying around. :-) I'm away from the laptop at present, but as I recall the only file showing in |
You could, while sup is shut down, try to edit the file directly: change the filename to no longer have the D flag at the end. Upon next re-poll sup should find the change and remove the draft label. Another way to do this is to change it on the remote server (I don't know your setup). If you are certain the email is not a draft, you could remove the draft label manually on the index and then reconcile the flags. You could do something along the lines of (sup closed): Remember to back up index and mail first. $ cd sup.git/devel
$ irb -I../lib -r './start-console'
> q = Index.parse_query('label:draft')
> a = []
> Index.each_message(q) { |x| a.push x }
> puts a # this should only contain one message if you only have one marked as draft
> m = a[0] # get the first message or find the problematic one
> m.labels.delete :draft
> m.sync_back
> exit |
Thanks for the help. I ended up having to wipe out my maildir and sup index and start over, for unrelated reasons, but if I run across the issue again I'll let you know. |
Ok |
In inbox-mode, highlight a thread with a draft, hit
e
.exception-log.txt:
Arch Linux, sup installed via
gem i sup
.The text was updated successfully, but these errors were encountered: