Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent commands from stealing emacs windows?

Tags:

emacs

I've been learning GNU Emacs on a Windows system for the last couple of months. One thing that really bugs me is having commands steal or close my windows. For example, when launching eshell it will occasionally put it another window rather than the current one. I also have an extension for VC for IBM's clearcase which also kills windows when I check-in/out files.

I would have thought that the ability to lock a window so that nothing can kill it or steal it would be a fairly desirable feature. Does Emacs come with this built-in? I have a feeling that it does but I am just lacking the terminology for it.

Any info would be appreciated.

Regards,

Elliot

like image 568
sonelliot Avatar asked Sep 24 '10 03:09

sonelliot


2 Answers

Use StickyWindows.

Download sticky-windows.el

put the following lines in your .emacs :

(require 'sticky-windows)
(global-set-key [(control x) (?0)] 'sticky-window-delete-window)
(global-set-key [(control x) (?1)] 'sticky-window-delete-other-windows)
(global-set-key [(control x) (?9)] 'sticky-window-keep-window-visible)
like image 186
Jérôme Radix Avatar answered Nov 19 '22 08:11

Jérôme Radix


(info "(emacs) Force Same Window") describes what's going on generally.

like image 25
offby1 Avatar answered Nov 19 '22 08:11

offby1