reddit / emacs

Upgrading `mu/mu4e` breaks config -- some questions.

nonreligious · 2022-10-03 07:23
After trying to refresh my email setup, I ended up mistakenly (i.e. deliberately, but without considering the consequence) updating `mu` and `mu4e`. I was on version `1.5.5`, and I've ended up on `1.8.9`. This upgrade does seem to break a lot of my little tweaks to `mu4e`. I've managed to sort a few of these out, e.g. `mu4e~proc-remove-id` becomes `mu4e--server-remove-id`, `mu4e~mark-check-target` becomes `mu4e--mark-check-target` . But there are still a few bugs. I previously stole a function to convert an email to a `.pdf` file: (defun mu4e-action-open-to-pdf (msg) (let* ((date (mu4e-message-field msg :date)) (infile (mu4e~write-body-to-html msg)) (outfile (format-time-string "%Y-%m-%d%H%M%S.pdf" date))) (with-temp-buffer (shell-command (format "wkhtmltopdf %s ~/Mail/gmail/pdfs/%s" infile outfile) t)) (interactive) (find-file (format "~/Mail/gmail/pdfs/%s" outfile) ) )) Now `mu4e~write-body-html` is no longer defined. My questions are: - Is there a replacement for `mu4e~write-body-html`? Or a different method to convert a message to pdf? - I've tried to follow the release notes [here](https://github.com/djcb/mu/releases), but find it hard to follow... for instance, the releases jump from `1.4.15` to `1.6.0`? (So where is `1.5.5`?) Is there a compilation of all these changes from e.g. `~` to `--` and other general refactoring? **EDIT**: Just found [this warning](https://www.djcbsoftware.nl/code/mu/mu4e/Available-functions.html) in the documentation: The whole of mu4e consists of hundreds of elisp functions. However, the majority of those are for internal use only; you can recognize them easily, because they all start with mu4e~ or mu4e--. These functions make all kinds of assumptions, and they are subject to change, and should therefore not be used. which explains the instability. Didn't see this/know enough about elisp when I stole the functions. Fair enough.
FreeAd7233 · 2022-10-03 08:30
this is a breaking change. Many functions in mu4e are renamed. You can look for Doomemacs/doomemacs/modules/email/mu4e/config.el to see some tweaks. Currently Doomemacs can support multiple version of mu, maybe it’s config may help you.
nonreligious · 2022-10-03 10:14
Thanks -- I'll check [it out](https://github.com/doomemacs/doomemacs/blob/master/modules/email/mu4e/config.el).
itistheblurstoftimes · 2022-10-03 22:25
mu4e is great but if you have done a lot of customization on it you should plan any upgrade for a time when you have hours to spare. There is no way around it.
[deleted] · 2022-10-06 05:51
There's a convention in Elisp that any `prefix--symbol-name` is internal or "private".