Witam na mojej prywatnej stronie internetowej!
[If this is all Polish to you, click here: English]
Uwaga: z oczywistych powodów nie mogę zagwarantować swojej nieomylności, choć staram się o zgodność tego, co piszę, z Prawdą. Jest również oczywiste, że nie gwarantuję takiej zgodności w przypadku komentarzy. Umieszczenie linku do strony spoza niniejszego serwisu nie musi oznaczać, że podzielam poglądy autora tej strony, a jedynie, że uważam ją za wartościową z takich czy innych powodów.
Marcin ‘mbork’ Borkowski
Today I only have a short tip. Sometimes you may have an important Emacs buffer you don’t want to kill accidentally. (For example, it might be an Eshell buffer with a long-running process, or a scratch buffer not associated with any file where you have some notes – although that is obviously asking for trouble.) Well, you can say M-x emacs-lock-mode, and Emacs won’t let you kill that buffer (nor quit). You can also provide a prefix argument and decide whether you want to lock killing the buffer, quitting Emacs or both.
And now the fun part. You might think that since you’ve never heard about it (or did you?), it’s some kind of a new feature. Well… no. The kill-or-quit-lock feature was introduced in 2011, and the first, very crude version of the “buffer locking” feature (which only prevented you from accidentally quitting Emacs if at least one buffer is locked) was committed by RMS himself in 1994! I wonder how many more hidden gems like this there are in Emacs…