9

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.

1 Answer 1

11

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

8
  • 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>)? Commented May 24, 2016 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 Commented May 24, 2016 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. Commented May 29, 2016 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! Commented Jun 1, 2016 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. :-) Commented Jun 1, 2016 at 14:15

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.