3 ms·
“Buffer” is just as bad or good a name as “file” or “document”. Files and documents can be in-memory and temporary, and the primary purpose of an Emacs buffer a
by layer8 4y ago
“Buffer” is just as bad or good a name as “file” or “document”. Files and documents can be in-memory and temporary, and the primary purpose of an Emacs buffer arguably isn’t buffering.
- randomsearch 4y agoIn the most general sense, “Document” is a better name, because more people understand what a document is than understand what a “buffer” is.
- mattkrause 4y agoMaybe not for emacs? You can have buffers that are views of many different things: directories, shells, REPLs, email boxes, etc. People might not know what a buffer is, but I think they'd be surprised to see those "in" a document, which might be worse.
- carl-erwin 4y ago"Document" can be puzzling when working on a directory. A "buffer" is a transition zone the user can work/interact with (and sync to it's source if any)
- astrobe_ 4y agoDesigns these days try to hide the distinction between volatile memory ("RAM") and mass storage ("disk"), so buffers can only be more and more an alien concept for common users, if not a design defect. However, I think it doesn't really matters, because people who choose to use Emacs (or Vim) - even among developers - are much more likely to be aware of those "low level" details or understand and adapt easily. So how they are named doesn't matters more than the odd "frame" term Emacs uses instead of "Windows".
- chimprich 4y agoWhat happens if you open two buffers to view two parts of the same document (easy in Emacs, not possible in lots of editors)? If you switch focus or close one, what are you manipulating? Not the document. You could choose a different name (view?) but it's a different abstraction compared to a "document".
- trelane 4y agoDid you mean two windows in the same buffer? Or did you mean opening the same file in two buffers, each attached to its own window?
- DonaldPShimoda 4y ago> the primary purpose of an Emacs buffer arguably isn’t buffering. Until you save the buffer to disk, that's exactly what it's doing.
- jacobsenscott 4y agoI wouldn't consider an index of my email, or an ongoing IRC conversation, or a calculator to be a file or a document. Buffer is certainly a better name. There might be an even better name, but I don't know what a better name for "visual output from anything" is. Monitor?, but that would be kind of weird because people would think of the hardware.
- d0mine 4y agoAnother name for the API provided by "buffet" could have been "console" (combination of monitor+keyboard: read/write API).
- morelisp 4y agoA buffer in Emacs has no input or display capabilities; your "console" would be an alternative to what Emacs calls a "window" (an active buffer combined with input and display parameters).