Emacs: Info-Mode Keys, Adding Web Browser Backspace Key, Mouse Back Button

Buy Xah Emacs Tutorial. Master emacs benefits for life.
, , …,

This page shows you the keyboard shortcuts for navigating emacs's “Info-mode”, and how to set web browser keys for it.

Emacs has extensive documentation, in a format called Texinfo. It is a tree structure, very similar to how you browse a website. To view the complete documentation index, call infoCtrl+h i】. Once you are in the Info doc, you can use the mouse or keyboard to navigate.

emacs info 2014-01-19
emacs info doc index.

Info-mode Keys

Here's the most important info keys:

emacs info keys
goto Next LinkTab ↹
Visit LinkEnter ↵
emacs info keys for navigation
Back (last node)l
parent node (up) u
previous nodep
next noden
emacs info keys
search s
emacs info help keys
view helph
list keysCtrl+h m

2 great commands for searching info is:

Adding Web Browser Backspace Key

Web browsers on Windows use the ⌫ Backspace for moving to last viewed page.

Here's how to add the backspace key to emacs. Put the following in your emacs init file.

(defun add-browser-backspace-key-to-Info-mode ()
  "Add some browser styled nav keys for `Info-mode'.
  The following keys are added:
 【Backspace】 for `Info-history-back'
 【Shift+Backspace】 for `Info-history-forward'."
    (local-set-key (kbd "<backspace>") 'Info-history-back)
    (local-set-key (kbd "<S-backspace>") 'Info-history-forward)
    ;; (local-set-key (kbd "<mouse-8>") 'Info-history-back) 5-button mouse. the mouse numbering depends on your OS and mouse. Call “describe-key” then press mouse button to find out
  ;; note: on Linux Firefox, you have to turn on Backspace key for previous page. In the preference.

(add-hook 'Info-mode-hook 'browser-nav-keys)

5 Buttons Mouse, Setting Forward/Backward Thumb Buttons for Info

if you have 5-buttons mouse, you can also make the 4th button do “previous page”. The button syntax is different depending on your mouse and whether you are on {Linux, Mac, Microsoft Windows}. Here's how.

① call describe-keyCtrl+h k】, then press the mouse button. Emacs might say:

<mouse-8> … undefined

② add the following in your info key function given above.

(local-set-key (kbd "<mouse-8>") 'Info-history-back)

I recommend you get a 5-buttons mouse, because the extra buttons lets you do lots of things. You do use mouse a lot, because 50% of time you spend in browser even for coding, and in browser the mouse is most efficient.


Like it? Buy Xah Emacs Tutorial.
blog comments powered by Disqus