branch: externals/notmuch-indicator commit 2f1558e6d95a1b3aaf08d57db6411a441f0dc943 Author: Yejun Su <goofan...@gmail.com> Commit: GitHub <nore...@github.com>
Add support for macOS notmuch configuration paths According to the notmuch documentation at <https://notmuchmail.org/doc/latest/man1/notmuch-config.html#configuration>, notmuch looks for configuration files at: > $XDG\_CONFIG\_HOME/notmuch/<profile>/config where <profile> is defined by NOTMUCH\_PROFILE environment variable if set, $XDG\_CONFIG\_HOME/notmuch/default/config otherwise. On macOS, `$XDG_CONFIG_HOME` is typically undefined, but the [XDG Base Directory](https://wiki.archlinux.org/title/XDG_Base_Directory) specification convention uses `~/.config` as the fallback. Additionally, when `$NOTMUCH_PROFILE` is undefined, it defaults to "default". This change adds two fallback paths to handle these common macOS scenarios: - `$HOME/.config/notmuch/$NOTMUCH_PROFILE/config` - `$HOME/.config/notmuch/default/config` This ensures notmuch-indicator can locate configuration files on macOS systems following standard conventions. --- notmuch-indicator.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notmuch-indicator.el b/notmuch-indicator.el index c32676763a..fceda5efcd 100644 --- a/notmuch-indicator.el +++ b/notmuch-indicator.el @@ -169,6 +169,8 @@ option `notmuch-indicator-refresh-count'." "Return `notmuch' configuration file." (catch 'found (dolist (path '("$XDG_CONFIG_HOME/notmuch/$NOTMUCH_PROFILE/config" + "$HOME/.config/notmuch/$NOTMUCH_PROFILE/config" + "$HOME/.config/notmuch/default/config" "$HOME/.notmuch-config.$NOTMUCH_PROFILE" "$HOME/.notmuch-config")) (when-let* ((config (substitute-env-vars path))