Emacs: defining a target window for command output

I'm tired of emacs knocking down my windows with his exit and unpredictably. I would like to have several windows in the emacs frame and each window is for a specific purpose only. For instance,

ECB panels | Editor 1 | Editor 2 | Bookmarks+ ------------------------------------------------ "Messages" (output buffer) 

So, when I run Mx compile , I want the output to always go to Messages. Similarly, when I run Mx magit-status , I want to receive the results in the messages as well. Clicking on a bookmark or pressing Cx rb should open the file and place the cursor in Editor 1.

I tried some lisp fragments to β€œlock” the windows to prevent changes, but emacs goes out when all the windows are β€œlocked”, so it cannot find an available window for entering new output. This is an unpleasant buffer change function that emacs should return on terminal days of 80x25 characters.

I have never seen ECB windows down, so this must be doable in some way.

+6
source share
2 answers

You are explicitly requesting the selected windows. Well, Emacs has exactly this feature: dedicated windows . Ch rg dedicated windows will tell you almost everything you need to know.

But see also special-display-buffer-names and special-display-regexps --- or if you're a masochist, play with display-buffer-alist to do the same.

With display-buffer-alist you can basically do everything you can imagine, including knit your underwear in knots and set it on fire.

(Me, I just set special-display-regexps to ("[ ]?[*][^*]+[*]") .)

+2
source

Call lockon-window before opening anything. Call again to remove all windows. It is easy to configure sending everything to the window: Message; however, to show the buffer for the window: Editor-1 from the window: Bookmarks + without calling the lockon-window, too hard with my strength. I hope the slide window helps.

0
source

Source: https://habr.com/ru/post/956286/


All Articles