Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installed packages may not get their Info files properly installed #228

Open
treese opened this issue Dec 30, 2021 · 3 comments
Open

Installed packages may not get their Info files properly installed #228

treese opened this issue Dec 30, 2021 · 3 comments
Milestone

Comments

@treese
Copy link
Collaborator

treese commented Dec 30, 2021

In Aquamacs 3.6, a user reports that the info file for ELPA org-mode installation don't show up properly.

This could be a bug in Aquamacs, or it might be something that has changed with the package installation since Emacs 25. Either way, check in for Aquamacs 4.

@treese treese added this to the 4.0 milestone Dec 30, 2021
@rpgoldman
Copy link
Collaborator

I have just looked, and when I install org-mode from elpa there is a dir file in the elpa/org-9.5.2/ directory, which indicates that info files should be added to the info directory search list in some way.

When I look at the value of Info-directory-list, I see one elpa package there: "/Users/rpg/Library/Preferences/Aquamacs Emacs/Packages/elpa/bnf-mode-20200323.1348" for a package that I have just installed.

When I restart Aquamacs, though, this variable is nil. When I first open the Info docs, it gets populated. At this point there are no elements of ``"/Users/rpg/Library/Preferences/Aquamacs Emacs/Packages/"` in this list.

This suggests to me that somehow the updates to Info-default-directory-list are not getting persisted, or somehow are getting clobbered in initialization.

When I start Aquamacs without customizations, I get this as my Info-directory-list:

("/Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/info" "/Applications/Aquamacs.app/Contents/Resources/info" "/Applications/Aquamacs.app/Contents/Resources/info/" "/usr/local/share/info/" "/usr/share/info/")

So it's not my personal customizations that are doing this. Somehow the packages directories are being lost.

A separate issue is that the org info file, which should be in Packages/elpa/org-9.5.2/ and named simply org is not there, although the README_ELPA file says it should be. Actually the README_ELPA file contradicts the dir file, which indicates that both org and orgguide.

This suggests to me that there are in fact two bugs here:

  1. Installation of elpa packages does not work properly. The initial effect, as indicated above by the contents of Info-directory-list in Aquamacs after bnf-mode install, is correct. But the contents of Info-directory-list in Aquamacs after restarting show that the effects on info's search are not persisted properly.
  2. Something may be wrong in the packaging of org-mode for ELPA. If so, this is likely to be an upstream issue.

@rpgoldman
Copy link
Collaborator

Further according to the multi-file package docs:

If the content directory contains a file named dir, this is assumed to be an Info directory file made with install-info. See Invoking install-info in Texinfo. 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.

That suggests that I should have the org-mode docs in my Info-directory-list, because I have org-mode running, but I don't. Opening a BNF file loads bnf-mode, but also does not push the package directory onto Info-directory-list.

It's not entirely clear to me what "activated" means in the docs. Looking at package.el maybe it means "installed," rather than "run."

This seems to be the place where the package's documentation should be loaded:

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

What I don't see is any discussion of how the effect on Info-directory-list is persisted.

The only thing I can think of is that the code for initializing the Info directory is expected somehow to stumble over the dir files, but that somehow this doesn't happen in Aquamacs, perhaps because the package directories are in ~/Library?

Anyway, that's what I was able to dope out

@treese
Copy link
Collaborator Author

treese commented Dec 31, 2021

Thanks--that's some helpful background for debugging this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants