You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have defined a function to be called when a message is sent, as follows:
(defunmu4e-extras-mark-sent-as-read (docid_draft-path)
"Mark the sent message identified by DOCID as read.When mu4e sends an email with Gmail, Gmail automatically saves a copy in the\"Sent\" folder, so the local copy is deleted (as specified by`mu4e-sent-messages-behavior'). However, the saved copy is treated as a new,unread message when synchronized back to the local client. To handle thisannoyance, this function marks the saved copy as read. It should be set as thevalue of `mu4e-sent-func'."
(mu4e--server-move docid nil"+S-u-N"))
(setq mu4e-sent-func #'mu4e-extras-mark-sent-as-read)
My expectation is that this function will be called after sending a message.
Actual behavior
The function is not called after sending a message.
Steps to reproduce
Evaluate the code above.
M-x debug-on-entry RET mu4e-extras-mark-sent-as-read
M-x compose-new RET.
Compose a test message.
M-x message-send-and-exit RET.
Note that the debugger is not triggered.
Versions of mu, mu4e/emacs, operating system etc.
mu4e 1.12.4
GNU Emacs 29.3 (build 2, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build 23C71)) of 2024-04-26
macOS Sonoma 14.4.1
The text was updated successfully, but these errors were encountered:
Unfortunately, this is a bit of an unsupported use-case.
mu4e-sent-func is for mu4e's internal plumbing.. well, used to be; it's gone now. There are still a few remnants.
I'd recommend using message-sent-hook instead.
But note that mu4e--server-move is explicitly an internal function.
Expected or desired behavior
I have defined a function to be called when a message is sent, as follows:
My expectation is that this function will be called after sending a message.
Actual behavior
The function is not called after sending a message.
Steps to reproduce
M-x debug-on-entry RET mu4e-extras-mark-sent-as-read
M-x compose-new RET
.M-x message-send-and-exit RET
.Versions of mu, mu4e/emacs, operating system etc.
mu4e 1.12.4
GNU Emacs 29.3 (build 2, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build 23C71)) of 2024-04-26
macOS Sonoma 14.4.1
The text was updated successfully, but these errors were encountered: