Questions tagged [kill-buffer]
The kill-buffer tag has no usage guidance.
7 questions
7
votes
3
answers
909
views
How can I kill buffers based on mode?
I know about kill-matching-buffers but that searches buffer names, I want instead to search buffer modes. For example, I might want to kill all buffers that have "notmuch-" or "[Notmuch]...
1
vote
3
answers
2k
views
kill-buffer with y-or-n-p instead of yes-or-no-p
Q: How can I use y-or-n-p -- instead of yes-or-no-p -- when calling kill-buffer for just the duration of a particular function?
In other words, I want the behavior of (fset 'yes-or-no-p 'y-or-n-p) ...
39
votes
6
answers
7k
views
How to reopen just killed buffer, like C-S-t in Firefox Browser?
Sometimes I accidentally kill a buffer and want to reopen it, just like C-S-t to undo closed tab in Firefox, but there is no built-in command in Emacs, the defun undo-kill-buffer in http://www....
19
votes
5
answers
4k
views
Kill process buffer without confirmation?
I have C-x C-k bound to kill-this-buffer. But when I enter into a buffer which is running a process like Python or MySQL, if I do C-x C-k it asks
Buffer "*Python*" has a running process; kill it (...
6
votes
1
answer
867
views
How to automatically kill a shell buffer when the shell process exits
In shell-mode when you exit the shell process (e.g. by typing exit) the buffer still hangs around (with the message "Process shell<1> finished").
How can I automatically kill the shell buffer when ...
4
votes
1
answer
1k
views
server-edit vs kill-buffer to kill an emacsclient buffer
I use emacsclient to open files from my webrowser (pdfs, text files etc). When I'm done with the file, I know I need to close it with C-x # (server-edit); if I use C-x k (kill-buffer) I get a warning ...
2
votes
2
answers
258
views
replace-buffer-in-windows issues in switching from emacs 24.5 to emacs 25.2
I installed Emacs 25.2 on a new system and cannot get the desired behavior with killing buffers when an Emacs frame is split into multiple windows.
For example, I have C-x 3 bound to a variation of ...