-
Notifications
You must be signed in to change notification settings - Fork 384
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
[mu4e bug] mu4e-compose-pre-hook is broken in v1.12+ #2715
Comments
That's indeed broken, I fixed it a some point.. but apparently it broke again :-| Also thank you for the PR... I'm pushing a change that is slightly different, running the hook a bit earlier so that (as the docstring suggests) one could influence the later draft-creation steps. |
Good to know. If you need I’m willing to test it :) |
Run the hook earlier, and ensure mu4e-compose-type & mu4e-compose-parent-message are set. As noted in #2715.
I just checked your implementation and it’s far more simple and better than mine. It leverages just a little thing: maybe you should also run the I’m speaking about these lines: (cl-assert (member compose-type '(reply forward edit new)))
(cl-assert (eq (if parent t nil)
(if (member compose-type '(reply forward)) t nil))) |
Maybe we could copy them to the being of Anyway, thanks for the heads up! Closing this ticket. |
Describe the bug
Due to an old known bug in date time formatting, my setup relies on preparatory work done for every draft. I expose it in this old issue: #2113 (comment)
To make it short, I temporarily store the
mu4e-compose-parent-message
in a variable, to be able to get it again to generate the citation line (historically the parent-message variable was lost while generating the citation line. Maybe this is not the case anymore, but this is another subject).Please note the documentation for the
mu4e-compose-pre-hook
still say the following:However, in version 1.12.0 through 1.12.5 the mu4e-compose-pre-hook call has disapeared and any functions added to the hook is never called. From 3ff2f9f the hook is called again… but too soon in the chain:
mu4e-compose-parent-message
andmu4e-compose-type
are only set after the hook is run in the functionmu4e--draft
How to Reproduce
mu4e-compose-pre-hook
The function is never called, or after 3ff2f9f, they are called but
mu4e-compose-parent-message
andmu4e-compose-type
are nil.Possible solution
If I may, I’d have moved the following block:
from the function
mu4e--prepare-draft-buffer
to the functionmu4e--prepare-draft
, before calling the pre-hook.However this implies to call
mu4e--prepare-draft
with the compose-type as parameter, what is not possible today, and I’m not sure about the implication of such a move.Environment
Emacs 29.3 with mu 1.12.5
Checklist
master
(otherwise please upgrade)The text was updated successfully, but these errors were encountered: