[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#424: new feature: killed-buffer
From: |
pierre kobylanski |
Subject: |
bug#424: new feature: killed-buffer |
Date: |
Mon, 16 Jun 2008 10:16:19 +0200 |
Hi guys,
I'd like to propose a new feature for emacs: the capability to easily
re-open previously killed buffers. Maybe someone else would appreciate
it.
It proposes three user functions:
* killed-buffers-mode
Activate/Deactivate remembering killed buffers. To avoid tricky
cases, only buffer associated with an existing file are taken
into account.
* restore-last-killed-buffer
Restore previously killed buffer. The number of
killed buffers to remember is configurable.
Ex: (global-set-key [(meta f8 )] 'restore-last-killed-buffer)
* mouse-killed-buffers-menu
Display a menu with last killed buffers. A variable
controls the number of item displayed, to ensure a
reasonable size of the popup menu.
This function respects the `mouse-wheel-follow-mouse'
setting.
I attached a screen-shot of such a menu.
Ex: (global-set-key [C-S-down-mouse-4] 'mouse-killed-buffers-menu)
Compatibilities / Dependencies :
* require emacs 22.1 or above.
Indeed, I make use of the `push' macro and the `find-file-hook'
variables (that obsoletes `find-file-hooks' since v22.1).
* require file-marker.el
This is a second file, that defines the file-marker structure.
Basically, it looks like a marker: it handles a filename and a
point. But I can't use markers as they end with buffer death.
Maybe you'll be interested in integrating this in next emacs version.
But before that, my code has some bugs to correct:
- copyright
- autoload
- maybe find default keystrokes (that follow emacs spirit).
- in text-mode, what about `mouse-killed-buffers-menu' and graphical stuff ?
- when killed-buffer-mode is off, the list of killed buffers is not
updated, so that we can have a buffer opened that still appear in
the killed buffers list. Bug or functionality ?
Of course, you have my email for any questions/demands.
Thanks for your involvement and time,
Pierre
killed-buffers.el
Description: Binary data
file-marker.el
Description: Binary data
killed-buffers.png
Description: PNG image
- bug#424: new feature: killed-buffer,
pierre kobylanski <=