2

It is possible to automatically select *Help* buffers when they are displayed by doing (setq help-window-select t) (relevant question: How to close help buffer without moving to it?).

Is there a similar setting for *Apropos* buffers? When I use apropos using C-h a, the resulting apropos buffer is not automatically selected. I have to switch to it using C-x o. Is there a way to switch to the apropos buffer automatically?

Flux
  • 583
  • 2
  • 16

1 Answers1

1

You can add a function to apropos-mode-hook that selects the window for the Apropos buffer.

(defun my-apropos-select-window ()
  "..."
  (pop-to-buffer (current-buffer)))

(add-hook 'apropos-mode-hook #'my-apropos-select-window)
Drew
  • 75,699
  • 9
  • 109
  • 225
  • The next release of Emacs (the one right after Emacs 28.1) will use the value of `help-window-select` to control this behavior. Relevant commits: [Make `M-x apropos' respect help-window-select](https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4ea8ab77e295fc508fc910e8278540ebcce293fb) (2022-04-30) and [Document 'help-window-select'](https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=a3024ab4fb6b608d2110aa778c1eadec8113f498) (2022-05-01). – Flux May 05 '22 at 07:13
  • @Flux: I think your comment belongs on the question, not on this answer. Or maybe you can post it as another answer. – Drew May 05 '22 at 16:05