Is there a way to find out how long a buffer has been active in Emacs?
M-x list-buffers
lists them, but there is no way of deducing how long the buffer has existed for.
At any time, one and only one buffer is selected. It is also called the current buffer. Often we say that a command operates on "the buffer" as if there were only one; but really this means that the command operates on the selected buffer (most commands do).
You can have several buffers open at once, but can edit only one at a time. Several buffers can be visible at the same time when you're splitting your window.
Buffers in Emacs editing are objects that have distinct names and hold text that can be edited. Buffers appear to Lisp programs as a special data type. You can think of the contents of a buffer as a string that you can extend; insertions and deletions may occur in any part of the buffer.
Much better to use the multiple buffer feature of emacs. If you are editing the first file and want to start editing the second file, simply use the hot key C-x C-f or the menu selection File->Open File to start the second file. The second file is loaded into its own buffer.
Yep. But only because I wrote something for ya to do just that. Ok, I wrote it for myself, but have been using it for the past 3-4 years and can't live without it now.
https://github.com/hardaker/elisp-buffer-timer/
There is much more convenient mode for listing buffers called ibuffer
. One of its built-in mark commands assigned to the .
(period) key is 'Mark buffers older than ibuffer-old-time
', which is a customizable variable defaulting to 72 hours. The ibuffer
mode is included in the standard emacs-24 distribution.
Here is my .emacs
snippet:
(when (require 'ibuffer nil 'noerror)
(define-key global-map "\C-x\C-b" 'ibuffer))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With