If I'm in a terminal, I can just type info glibc
and get info about glibc. Since emacs reads info files, it's silly to use M-x term
to read info files from within emacs. I know you can use C-u C-h i
followed by the path to the info file, but how can I just tell emacs to get info on glibc like I would on the command line?
The info reader in Emacs can be accessed with C-h i
. There you can jump directly into the some-node
node with g (some-node) RET
.
Alternatively, you can go to the some-node
node by eval'ing (info "some-node")
.
Note that the info reader on the terminal picks man pages when info nodes cannot be found. There is no "glibc" info node, but just a man page. To read man pages within Emacs just use woman
, e.g. woman RET glibc RET
.
The info node for the GNU C library is called "libc", so you should run (info "libc")
instead.
Eshell has a function eshell/info
with the following documentation:
Run the info command in-frame with the same behavior as command-line
`info', ie:
'info' => goes to top info window
'info arg1' => IF arg1 is a file, then visits arg1
'info arg1' => OTHERWISE goes to top info window and then menu item arg1
'info arg1 arg2' => does action for arg1 (either visit-file or menu-item) and then menu item arg2
etc.
For example, to access the Emacs info documentation in an Eshell session you can just type info Emacs
. For the libc documentation run info libc
in an Eshell session.
-
1
-
I updated the answer. There is no "glibc" info node, just a "libc" info node. What you see on the terminal is the "glibc" man page. To read man pages use
woman
. – rekado Apr 20 '15 at 5:24
Hm... indeed C-u C-h i
doesn't seem to let you do that.
OTOH, you can do
C-h i g (glibc) RET
-
-
That only searches nodes within the emacs info tree, not the general info tree – Elliot Gorokhovsky Apr 20 '15 at 5:13
-
1Emacs uses the general info tree (potentially complemented with Emacs's own info tree). The
info
command also supplements the general info tree with its own tricks (mostly looking up manpages), so maybe that's what you're seeing.M-x man RET glibc RET
should give you something similar, in that case. – Stefan Apr 20 '15 at 6:02
If you have ivy-mode
on from the package swiper,
after pressing g you get this:
In this case, the input is li
. But with no input, it gives me a list
of 137 files that I have in alphabetical order.