-
Notifications
You must be signed in to change notification settings - Fork 61
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
Compatibilty with mu4e 1.12 #190
Compatibilty with mu4e 1.12 #190
Conversation
danielfleischer
commented
Apr 13, 2024
- Collection of various patches to make org-msg compatible with mu 1.12+.
- It will break compatibility with older versions as there are major changes in the mu library.
Hi I did some test on this branch, there is a small problem I noticed:
However, the mail can be sent succesfully though. I have no idea what does this message mean. |
Try to comment the line:
I thought that isn't needed but some people came up with that fix. Also, are you following the latest code, not just the official 1.12 release? |
I'm also experiencing a similar problem: After sending a mail I see the buffer with mail converted to HTML and the buffer marked as modified. The minibuffer contains a message 'Text is read-only'. The mail is successfully sent. |
Yes, you should use mu4e from master as there were many updates to the composing code after the official release. Perhaps I should have been more explicit, as the the 1.12 code changes fast. |
if this is the case, perhaps we can’t merge this PR now? If this PR relies on the master branch code and has unresolved problems on official release. Since I believe most of people will just follow the official release (probably install from their package manager) instead of building from the source? |
Well, there was a 1.12.4 release a couple of days ago, containing the fixes I'm talking about. So no need to compile from master, just make sure you are updating, and not use the original 1.12.0 from February. |
Just updated my mu to |
@jeremy-compostella |
This works but I am getting |
You are not running the PR correctly. |
You’re right.I got mixed up and used:
Instead of your PR:
|
Still works with v1.12.6. |
@jeremy-compostella will this be merged? I have been using it locally for a while now as otherwise org-msg doesn't work Edit: And would be great to have a new release (version) for this as well, for downstream packaging. |
An off topic mumble as an old mu4e user here: I have switched to notmuch for about 1-2 months and I keep using |
@milanglacier please don't off topic here or in any pull-request discussion, it's not reddit or social media and the linear format makes any off topic an on topic discussion. This is strictly a technical discussion about suggested code changes to a library. As such you're not contributing anything. |
Ready to ship; the overall change after the recent master update is removing some hooks, originally from |
Do you mind making a clean (or multiple) commit(s) with a nice headline and a descriptive commit. I would like to avoid nasty merge commits. Especially when one dl something that the other undo 🤔 |
55b663a
to
3d225a3
Compare
@jeremy-compostella done; after your recent "backward compatibility" commit, all that is left is cleaning the hooks a bit. |
org-msg.el
Outdated
(setq mu4e-sent-func 'mu4e-sent-handler) | ||
(mu4e~proc-sent (buffer-file-name)))) | ||
nil t)) | ||
(add-hook 'message-sent-hook #'mu4e--compose-before-send nil t)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds weird to tie before-send
to the sent-hook
. Could you confirm this is correct ?
Also, do you think you could use a construction like the following (untested btw) ? I would to keep it compatible if mu4e change the prefix of this function.
(when-let ((sent-hook (org-msg--mu4e-fun "compose-before-send")
(add-hook 'message-sent-hook sent-hook)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the when-let
block and tested it.
Regarding the mu4e--compose-before-send hook, it actually deals with emails before and after sending so that's fine.
Composing and drafting were largely delegated to Gnus facilities. Code copied from `mu4e-compose.el` is not needed.
3d225a3
to
12b7259
Compare
@jeremy-compostella I am getting the error reported by @milanglacier above. Is there a reason for keeping |