-
Notifications
You must be signed in to change notification settings - Fork 21
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
MessageNotFound after new mail was sent #395
Comments
Just checked with composing a new mail from the default query after start up, and the problem doesn't exist once the mail is sent and Purebred went back to the threads view. |
I think it has something to do with the mail being sent, falling into the result list of the search the threadview is set to. For example if the search is |
This one is nasty. The source of the problem is the So in this instance, what happens is, that the mail is removed from the index. The mail is composed as new, changed, sent and re-indexed. The view returns to the original query and obviously the original mail we created a new compose from doesn't exist any more. |
@romanofski can we handle it in a similar way to how we update tags on the |
Hm I see the problem... OK here's another idea. The message "key" in libnotmuch is the MessageID. If we write (and index) draft mail with message ID, and keep that message ID the same for Maybe I am misunderstanding the scenario... but let me know what you think. |
It depends really, because for draft mails, we would want to remove them from the index as long as they're sent (I would think?). thinks I think my initial mental model was to literally unindex and delete the files. But having the drafts around until the mail is sent is actually a good thing (just to avoid loosing your mail). |
I think the trouble is with the underlying file management and the semantics with the action: use the current mail as a template to compose a new mail. For drafts, essentially the file path changes. We move the mail from For any other mails, this action should make a copy of the existing mail to create a new composition. What I'm currently not sure about is whether a single action/keybinding should implicitly figure this out or whether we're better of using two separate actions/keybindings. |
Initially composeAsNew was implemented with the idea to continue draft mails. The mails are stored in the file system and indexed in notmuch. Once the draft is picked up again, the mail is unindexed and removed from the file system until it's sent. However, if we use the same function on existing mails in order to use the mail as a template for a new mail, we actually unindex and remove the mail mistakenly from notmuch and the file system. Instead all we want is a copy for composing. This is a workaround for now, since ideally we want to keep all compositions as a draft on the file system (see #351). This patch only unindexes/removes draft mails, any other mail contents are simply copied for composition. Fixes #395
Initially composeAsNew was implemented with the idea to continue draft mails. The mails are stored in the file system and indexed in notmuch. Once the draft is picked up again, the mail is unindexed and removed from the file system until it's sent. However, if we use the same function on existing mails in order to use the mail as a template for a new mail, we actually unindex and remove the mail mistakenly from notmuch and the file system. Instead all we want is a copy for composing. This is a workaround for now, since ideally we want to keep all compositions as a draft on the file system (see #351). This patch only unindexes/removes draft mails, any other mail contents are simply copied for composition. Fixes #395
Initially composeAsNew was implemented with the idea to continue draft mails. The mails are stored in the file system and indexed in notmuch. Once the draft is picked up again, the mail is unindexed and removed from the file system until it's sent. However, if we use the same function on existing mails in order to use the mail as a template for a new mail, we actually unindex and remove the mail mistakenly from notmuch and the file system. Instead all we want is a copy for composing. This is a workaround for now, since ideally we want to keep all compositions as a draft on the file system (see #351). This patch only unindexes/removes draft mails, any other mail contents are simply copied for composition. Fixes #395
Describe the bug
When I sent an email, the view goes back to the list of threads. When I try to re-open the same message, I get a MessageNotFound error. For example:
MessageNotFound "notmuch-sha1-37d366f6ef51d6b94836805748103ec126d391c8"
To Reproduce
Steps to reproduce the behavior:
e
.Custom query first:
Expected behavior
Not a
MessageNotFound
error.Screenshots
None
Additional context
Typically I reload the thread list after going back. Perhaps the keybindings are configured like that too and should be investigated.
The text was updated successfully, but these errors were encountered: