3

I have a shell buffer that's a good candidate for a side window: I also regularly use an org buffer, that's always good to have around.

https://www.gnu.org/software/emacs/draft/manual/html_node/elisp/Side-Windows.html

I can't figure the keyboard shortcuts to:

  • make a side window
  • remove the side window
  • focus in to the side window
Drew
  • 75,699
  • 9
  • 109
  • 225
american-ninja-warrior
  • 3,773
  • 2
  • 21
  • 40
  • 1
    Your question appears to be: what keys can you use to (1) show/create a side window, (2) hide/delete a side window, and (3) select a side window. – Drew Jun 19 '18 at 18:40
  • Make a side window: `(split-window (selected-window) nil 'right nil)`. Remove the side window: `(delete-window (window-in-direction 'right))`. Focus in to the side window: `(select-window (window-in-direction 'right))`. See my previous answer regarding how to display a `*shell*` buffer in the desired window: https://emacs.stackexchange.com/a/28924/2287 . You may wish to set up your own keyboard shortcuts for commonly used functions. For example, I like F11 to `delete-window` with no argument, and F12 to `delete-other-windows` with no argument. – lawlist Jun 20 '18 at 14:21
  • @lawlist the elisp you mentioned creates regular splits. This question refers to the "original" side windows. In the emacs documentation it says "Note also that delete-other-windows cannot make a side window the only window on its frame ". Since your side window can be made the sole window, it looks to me like "(split-window (selected-window) nil 'right nil)" doesn't make a real side window – american-ninja-warrior Jul 09 '18 at 17:21

1 Answers1

4

There are no "built in" shortcuts for this. This answer uses lisp (which can be executed with Meta-:) to create a side window. Focussing on the side window and pressing C-x 1 - emacs refuses to make the side window the sole window. So I guess thats what we want.

Right now I'm doing

Meta-:
(display-buffer-in-side-window (get-buffer "*shell*") '((side . bottom)))
enter
american-ninja-warrior
  • 3,773
  • 2
  • 21
  • 40