1

I have Emacs installed through Termux. The Emacs manuals (emacs.info.gz, etc.) are located at /data/data/com.termux/files/usr/share/info/. I can open them with find-file. I don't see them with C-h i.

The INFOPATH is set in ~/.bashrc:

# .bashrc
export INFOPATH=$INFOPATH:/data/data/com.termux/files/usr/share/info/

A new Termux session shows the correct INFOPATH. The path above is the Info-default-directory-list and is the last entry in Info-directory-list.

The texinfo, gzip, and zlib packages are installed in Termux.

I can see the manuals for Magit, use-package, etc. listed in *info*.

How can I access the Emacs manuals through Info?

  • 1
    If you don't have a dir file in that directory, you need to create one. See the Directory file dir section in the Texinfo manual. – NickD Jun 6 at 3:50
  • No dir. Seems like I need to use install-info, but I can't find the magic invocation of the correct arguments. – Lorem Ipsum Jun 6 at 4:03
  • You have to provide more details: isn't sudo make install-info enough? How about sudo make install-info prefix=/data/data/com.termux/files/usr? How did they end up in that directory in the first place? – NickD Jun 6 at 12:13
  • This works. After running this script and restarting Termux/Emacs. for file in /data/data/com.termux/files/usr/share/info/* do install-info --info-file="$file" --dir-file=/data/data/com.termux/files/usr/share/info/dir done. If you make comment an answer, I'll accept it. – Lorem Ipsum Jun 6 at 17:16
2

There are two components to the Info system: the info files themselves and a dir file which acts as the top level index. When Info sees more than one directory in INFOPATH, it merges all the dir files that it finds into one index. The corollary however is that the dir file must exist.

You can create the dir file by hand if you want: there is information about that in the Texinfo manual, but in most cases, it is built when the info file for the package is installed.

In any case, since these are the standard emacs info files, you can reinstall them using the appropriate make invocation and get everything. GNU Makefiles make use of the prefix variable (/usr/local by default) to construct all the directories for the software installation. So all you have to do is override that destination:

sudo make install-info prefix=/data/data/com.termux/files/usr

That in turn uses the install-info program appropriately to add the various info files to the dir file in the info directory corresponding to the prefix ($prefix/share/info).

In fact, since the info files were already installed in that directory, the OP found it expedient to just run a small script to create the dir file from the existing info files instead of rerunning the make:

for file in /data/data/com.termux/files/usr/share/info/*
do
     install-info --info-file="$file" --dir-file=/data/data/com.termux/file/usr/share/info/dir
done
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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