Skip to content
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

Ensure mu4e-compose-pre-hook has access to parent message and compose type #2716

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

milouse
Copy link
Contributor

@milouse milouse commented Jun 17, 2024

This MR try to fix #2715

@@ -461,7 +461,7 @@ The message is resent as-is, without any editing. See
"Resend message to address: " mu4e--contacts-set)))
(let ((msg (mu4e-message-at-point)))
(with-temp-buffer
(mu4e--prepare-draft msg)
(mu4e--prepare-draft 'new msg) ;; Resend as fake new?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djcb This is the point I’m the less sure about. Do not hesitate to comment if this is completely wrong.

(setq-local
mu4e-compose-parent-message parent
mu4e-compose-type compose-type)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve cut this part in 2 block:

  1. move the cl-assert to the mu4e--prepare-draft function (to keep the semantic of "preparing" stuff, ensuring everything is ok)
  2. move the setq-local statement later in the mu4e--draft function to still benefit from being call inside the target buffer (as now they are buffer-local, and mu4e--prepare-draft is called before the buffer is created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mu4e bug] mu4e-compose-pre-hook is broken in v1.12+
1 participant