mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
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
This commit is contained in:
@ -59,11 +59,16 @@
|
|||||||
(after! woman
|
(after! woman
|
||||||
;; The woman-manpath default value does not necessarily match man. If we have
|
;; 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
|
;; man available but aren't using it for performance reasons, we can extract
|
||||||
;; it's manpath.
|
;; its manpath.
|
||||||
(when (executable-find "man")
|
(let ((manpath (cond
|
||||||
(setq woman-manpath
|
((executable-find "manpath")
|
||||||
(split-string (cdr (doom-call-process "man" "--path"))
|
(split-string (cdr (doom-call-process "manpath"))
|
||||||
path-separator t))))
|
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
|
(use-package! drag-stuff
|
||||||
|
Reference in New Issue
Block a user