Skip to content

Remove forbidden properties #204

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

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

Conversation

spencerjackson
Copy link

This change (motivated by the investigation here, adopts infrastructure from message-mode to strip the read-only property from any text inserted into an org-msg compose buffer.

This matches the behavior of mu4e's buffer, and prevents an issue where mu4e adds read-only text which message-send can't correctly process.

jsilve24 and others added 2 commits December 6, 2024 09:35
fixes jeremy-compostella#200

remove undo from message-sent-hook as it was causing an error and for html drafts to be sent after successful message sending (unintended behavior).

Also discussed in jeremy-compostella#182 where the hook was suspected to be causing problems jeremy-compostella#182

Note, in jeremy-compostella#182 multiple users report no issues after removing hook.

As requested, only turn remove hook from mu4e
This matches the behavior of message-mode
@seblemaguer
Copy link
Contributor

Hello,

I am currently investigating this issue as well and while I applied your patch, the draft is still present after the message is sent. On your side, has the draft disappeared or it is still present?

@gambhiro
Copy link

gambhiro commented Feb 20, 2025

@seblemaguer I also re-installed org-msg from @spencerjackson 's branch. The previous error (primitive-undo: Changes to be undone... has disappeared, the message is sent, but the draft is still not removed.

(The config context is doom-emacs)

@seblemaguer
Copy link
Contributor

@gambhiro ok thanks. I will try to see if I can find what is going on there :)

@seblemaguer
Copy link
Contributor

Starting my investigation, I am confused with these two lines (links being https://github.com/jeremy-compostella/org-msg/blob/59e2042e5f23e25f31c6aef0db1e70c6f54f117d/org-msg.el#L1506C16-L1508C15 ):

  (when-let ((sent-hook (org-msg--mu4e-fun "compose-before-send")))
    (add-hook 'message-sent-hook sent-hook nil t)))

why do we had the "before-send" to the "sent" hook?

If I comment these, this solves the issue of the draft being not remove, but I want to be sure that I don't miss anything.

@cantao
Copy link

cantao commented May 5, 2025

Hi! The problem persists... Any updates on that? Thanks a lot! 😇

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.

5 participants