From 8d94e433f3855a4e9d6a95f9e64b1211f54108e1 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Fri, 2 Sep 2022 17:28:15 +0200 Subject: [PATCH] Make Emacs find all info files in `package-user-dir' on Gentoo Linux --- README.org | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index d8ccd47..e8fd33d 100644 --- a/README.org +++ b/README.org @@ -740,6 +740,7 @@ the help facilities of Emacs. | info | help-map | {{{kbd(C-h i)}}} | |------------------------------+----------+------------------| + ** [[info:emacs#Name Help][Shortdoc-display-group (info)]] :PROPERTIES: :CUSTOM_ID: sec:shortdoc-display-group @@ -799,15 +800,24 @@ defined in this Org file. :CUSTOM_ID: sec:info :END: -Listing [[lst:configure-info]] adds a path in my home directory to the places where -=info= looks for files. +Listing [[lst:configure-info]] adds the required paths to the places where =info= +looks for files. #+caption[Configure =info=]: #+caption: Configure =info=. #+name: lst:configure-info #+begin_src emacs-lisp (with-eval-after-load 'info - ;; Emacs should find my "python.info" file. + ;; Make Emacs find the "*.info" files in `package-user-dir' on Gentoo Linux. + (when (eq system-type 'gnu/linux) + (dolist (path + (nreverse + (mapcar + (lambda (name) + (expand-file-name (file-name-directory name))) + (directory-files-recursively package-user-dir "\\.info\\'")))) + (add-to-list 'Info-directory-list path nil #'file-equal-p))) + ;; Make Emacs find my "python.info" file. (add-to-list 'Info-directory-list (expand-file-name "~/.local/share/info"))) #+end_src