Fix a previous attempted fix loading mu4e.

mu version 1.8.2 renamed mu-meta to mu-config.  As the variable mu4e-mu-version
is defined in said file the easiest fix seems to be to simply attempt to load
the new one, and only if that fails to load the old version.

Maybe this can be reworked or better yet removed in the future.
This commit is contained in:
Nathanael Schweers 2022-07-01 21:27:52 +02:00 committed by Maxi Wolff
parent 7af1a21724
commit 1435c95a79
1 changed files with 7 additions and 2 deletions

View File

@ -168,8 +168,13 @@ mu4e-use-maildirs-extension-load to be evaluated after mu4e has been loaded."
(defun mu4e/pre-init-org ()
(if mu4e-org-link-support
(with-eval-after-load 'org
(if (version<= "1.8.2" mu4e-mu-version)
(require 'mu4e-config)
;; This is a dirty hack due to mu(4e) 1.8.2 renaming mu4e-meta to
;; mu4e-config. See also
;; https://github.com/djcb/mu/commit/cf0f72e4a48ac7029d7f6758b182d4bb559f8f49
;; and https://github.com/syl20bnr/spacemacs/issues/15618. This code
;; used to simply read: (require 'mu4e-meta). We now attempt to load
;; mu4e-config. If this fails, load mu4e-meta.
(unless (ignore-errors (require 'mu4e-config))
(require 'mu4e-meta))
(if (version<= mu4e-mu-version "1.3.5")
(require 'org-mu4e)