Emacs: kill-buffer Induces Buffer Accumulation
This page discusses emacs user interface issue of the command kill-buffer
.
In my usage pattern, i find that one problem of emacs default UI is that it makes it difficult to close a buffer.
To close a file, user calls kill-buffer
【Ctrl+x k】 then Enter, and if it's not saved, one has to type full yes
or no
. Too many keystrokes. Also, when it is the “*scratch*” or buffer not associated with file, it doesn't ask for save.
These issues induce people not want to close buffer. So, buffer accumulates. Instead of closing files we don't need, people use {bury-buffer
, switch-to-buffer
}, even though we just want to close it. Tens or hundreds of buffers became a problem, then, {kill-some-buffers
, clean-buffer-list
, ido-mode
}, are invented to solve this new problem.
By habit, i always close buffers that i'm done working with. I did that for the past decade, even if it means painfully using kill-buffer
. So, usually i have no more than 20 buffers open. In past years, with ErgoEmacs Keybinding and my own AutoHotkey setup, i have single key to close buffer, and with just y/n if unsaved. This also makes switching to next/prev buffer much more useful (both are single key), much like switching tabs in a web browser.
This post is inspired by jcs's blog The Emacs clean-buffer-list Command At http://irreal.org/blog/?p=765
Emacs Modernization
- Emacs Modernization: Simple Changes Emacs Should Adopt
- Why Emacs Keys are Painful
- Emacs: Problems of the Scratch Buffer
- Emacs Modernization: Meta Key Notation
- Emacs Menu Usability Problem
- Emacs Mode Line Problem
- Emacs cua-mode Problems
- Emacs: Inconsistency of Search Features
- Problems of grep in Emacs
- Emacs: Usability Problems of Mode Documentation
- Problems of Emacs Manual
- Emacs Manual Sucks by Examples
- Emacs: kill-buffer Induces Buffer Accumulation
- Emacs Spell Checker Problems
- Emacs: Form Feed ^L Problem
- Emacs: Single Key to Delete Whole Line
- Emacs HTML Mode Sucks
- Emacs Does Not Support Viewing Images Files In Windows
- Emacs Should Adopt HTML as Texinfo Replacement
- Emacs Should Support HTML Mail
- Problems of Emacs's “man” Command
- Emacs Lisp Mode Syntax Coloring Problem
- Emacs AutoHotkey Mode Problems
- Elisp: Syntax Table Sucks
- Emacs: Make elisp-index-search use Current Symbol
- Emacs GNU Texinfo Problems; Invalid HTML
- A Record of Frustration in IT Industry; Disappearing FSF URLs, 2006
- Emacs Manual Node Persistency Issues
- Emacs: dired-do-query-replace-regex Replace ALL (fixed)
- Problems of Emacs Supporting Obsolete Systems
- Elisp: Function to Copy/Delete a Dir Recursively (fixed)
- Thoughts on Common Lisp Scheme Lisp Based Emacs
- Text Editors Popularity and Market Research
- Text Editor's Cursor Movement Behavior (emacs, vi, Notepad++)
- Emacs: Usability Problems of Letter-Case Changing Commands
- Emacs Select Word Command Problem
- Emacs: Search Current Word 💠
- Emacs fill-paragraph Problem