From 56b6169ae739fb67a33746cc5863030b3e4fc6d3 Mon Sep 17 00:00:00 2001 From: John Goff <33040621+John-Goff@users.noreply.github.com> Date: Wed, 24 Jan 2024 12:31:20 -0500 Subject: [PATCH] fix(default): read correct manpath on MacOS Versions of `man` shipped with the latest MacOS do not support the `--path` argument, which causes `M-x woman` in Emacs to break. However the `manpath` command gives the same information and exists on MacOS and Linux, at least the systems that I tested. Check for its existence, and if there is no `manpath` command then fall back to the logic that existed before. Fix: #7021 --- modules/config/default/config.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index f4a301488..14bed119c 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -59,11 +59,16 @@ (after! woman ;; The woman-manpath default value does not necessarily match man. If we have ;; man available but aren't using it for performance reasons, we can extract - ;; it's manpath. - (when (executable-find "man") - (setq woman-manpath - (split-string (cdr (doom-call-process "man" "--path")) - path-separator t)))) + ;; its manpath. + (let ((manpath (cond + ((executable-find "manpath") + (split-string (cdr (doom-call-process "manpath")) + path-separator t)) + ((executable-find "man") + (split-string (cdr (doom-call-process "man" "--path")) + path-separator t))))) + (when manpath + (setq woman-manpath manpath)))) (use-package! drag-stuff