I was just fooled by an old org info file that was hanging around in my info dir. I assumed that when I call

(use-package wanderlust
  :ensure t)

That the current info file would be installed automatically.

The following from the elisp manual would indicate that this is so:

If the content directory contains a file named ‘dir’, this is assumed to be an Info directory file made with ‘install-info’. *Note Invoking install-info: (texinfo)Invoking install-info. The relevant Info files should also be present in the content directory. In this case, Emacs will automatically add the content directory to ‘Info-directory-list’ when the package is activated.

Yet, they do not show up. Is there something else to do in my init.el file to make this work?


2 Answers 2


I came up with this addition to my init file to deal with the problem.

(require 'f)
(require 'dash)

(defun pack-info-add-directories ()
  (let ((old-info-dirs Info-directory-list))
    (setq Info-directory-list nil)
    (setq Info-directory-list
           (--filter (file-exists-p (expand-file-name "dir" it))
                     (f-directories package-user-dir))
(add-hook 'after-init-hook 'pack-info-add-directories)

This adds the package directories with dir files to the front of the Info-directory-list. I invoke in the after-init-hook so it picks up any packages installed later on in the init file.

I found that I also had to delete the stock org info file from the system info dir in order for the current version to show up. I used this shell command to do so.

sudo ginstall-info --delete /usr/local/share/info/org.info.gz /usr/local/share/info/dir

I hope this helps someone. Better, someone can explain the canonical way to achieve the same thing.

  • The commenters are correct that the package-supplied info files and dir files are automatically added to Info-directory-list when each package is activated. I had to bisect my init file to find out that my problem was a very obscure interaction with the save-history-file that I don't really understand. I fixed that and now it works as expected, except that I still had to remove the packaged org.info in the standard directories in order for the correct org.info file to show up. Thanks to all commenters. May 13, 2016 at 10:02

My understanding is that you would need the wanderlust devs to change the structure in which their package is installed.

By studying the below code in package.el

;; Add info node.
(when (file-exists-p (expand-file-name "dir" pkg-dir))
  ;; FIXME: not the friendliest, but simple.
  (require 'info)
  (push pkg-dir Info-directory-list))

.. and few packages (like debbugs, ivy, magit) that have their Info documents added to the Info-directory-list correctly, the structure of files has to be as follows in your elpa/ dir:

    dir # not a directory but a file that describes 
        # where that Info document sits in the hierarchy

For example, this is what the dir file looks like for the magit package:

This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.

File: dir,      Node: Top       This is the top of the INFO tree

  This (the Directory node) gives a menu of major topics.
  Typing "q" exits, "?" lists all Info commands, "d" returns here,
  "h" gives a primer for first-timers,
  "mEmacs<Return>" visits the Emacs manual, etc.

  In Emacs, you can click mouse button 2 on a menu item or cross reference
  to select it.

* Menu:

* Magit: (magit).               Using Git from Emacs with Magit.
  • Kaushal, thanks for the answer. I was just using wanderlust as an example. Wanderlust /does/ have a dir file. I also don't see the dir file for magit or any other package showing up in Info-directory-list, just the standard locations. The package code gets run when the package is installed, but does it permanently change the Info-directory-list variable? Are we required to set the variable manually? I was hoping that it would happen automatically. May 10, 2016 at 23:23
  • No, Info-directory-list is recreated at startup time, rather than being saved somewhere. It does this because you might start different versions of emacs using the same init file, and you would want to get the right version of the emacs manual as well as the info pages for the built-in packages. When I inspect this variable on my machine, I see a number of direcotires that come from installed packages, so perhaps it's just not finding them on your machine. Why don't you check out what info-initialize and Info-default-dirs are doing?
    – db48x
    May 11, 2016 at 7:25
  • @DanielDoherty My answer was generic. I see the info manuals for Melpa and Elpa installed packages like Magit, debbugs and ivy perfectly fine in M-x info. Have you disabled package activation at startup? Do you have the package-initialize call in your config? May 11, 2016 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.