7

When looking up documentation with describe-function, Emacs display the docstring in a temporary help buffer. I want this buffer to replace current window.

So far, I've customized help-window-select but it only affect the focus.

9

If you don't like how help-window-select works you can simply use this code:

(add-to-list 'display-buffer-alist
             '("*Help*" display-buffer-same-window))

You can change "*Help*" with a regexp matching other buffer names if you want to also affect apropos windows or shell

  • 1
    I'm on mobile now. If you're familiar with it, do you know if this conflicts with Helm's preview for candidates (accessible from C-<down> and C-<up>)? – Mathieu Marques May 24 '16 at 18:15
  • I don't use helm but I don't imagine this would affect anything. This code only affects in which window the buffer is opened. You can look at display-buffer for more details once you get off of mobile – Jules May 24 '16 at 18:28
  • It actually messes up with Helm. I have Helm set up so candidates show up on the left while current selected buffer or candidate preview shows up on the right side (I have set Helm to use only 2 windows at all time). With your solution 1. I lose my current buffer (that I previously had on the right) and 2. Helm uses one window only. Furthermore, previewing candidates split the frame horizontally. – Mathieu Marques May 29 '16 at 21:40
  • I've read your message a few times but I can't really understand whats happening. Could you post an image or something. If you've figured out a solution by now even better! – Jules Jun 1 '16 at 14:06
  • Initial state. Here is how my Helm setup looks like. Candidates on the left, current window --- from when I originally ran the Helm command --- on the right. Now I preview the candidate. It shows in the right window. With your snippet, I only get one window with the Helm candidates. If I try and preview a candidate, my frame will be split vertically. Please let me know if this is still unclear. :-) – Mathieu Marques Jun 1 '16 at 14:15

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.