emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for buff-menu.el enhancements


From: Drew Adams
Subject: patch for buff-menu.el enhancements
Date: Mon, 9 Jul 2007 16:52:51 -0700

Attached is a patch for buff-menu.el that provides some
enhancements for *Buffer List* (`C-x C-b').  Some of these
are similar to the enhancements I sent recently for Dired.
Some of them (e.g. click to change sort direction) are
similar to behavior provided by Windows Explorer.

To try this out with emacs -Q, load a patched copy of
buff-menu.el, and then eval each of these three sexps, the
last one using `C-M-x' (I don't know of another way for you
to override the pre-existing definition of face
`buffer-menu-buffer'):

(setq Buffer-menu-mode-map nil)
(setq Buffer-menu-sort-column 1)

;; Eval this one explicitly with C-M-x:
(custom-declare-face 'buffer-menu-buffer
  '((t (:foreground "Blue")))
  "Face used to highlight buffer names in the buffer menu."
  :group 'Buffer-menu)


Features:

1. A new column, Time, which is the time that a buffer was
   last accessed (displayed).

2. You can sort up or down by clicking any column
   heading. The sorted column and its sort order (ascending
   or descending) are indicated by highlighting of the
   column header (underlining or overlining, respectively).

3. Clicking column heading `CRM' sorts the buffers by time
   of first access (visit). This is not the same thing as a
   descending sort of Time, which is the time of last access
   (display). If you have many buffers (especially if they
   have similar names), sorting by one of these columns can
   be useful.

4. A mouse popup menu (`mouse-3'), providing these items:

   * Select Buffer
   * Unmark Buffer
   * Mark to Save Buffer
   * Mark to Delete Buffer
   * Mark as Modified/Unmodified
   * Execute: Save/Delete Marked Buffers

5. Command `buffer-menu' was redefined so that:

   * A prefix argument zero or less means list buffers
     alphabetically.

   * A prefix argument zero or more means list only file
     buffers.

6. The buffer-menu buffer (`*Buffer List*') is font-lock
   highlighted:

   * Each field of the buffer uses a different face: CRM,
     Buffer, Size, Mode, File.

   * Each mark uses a different face (Save, Delete,
     Read-Only, Mark, Current).

7. The buffer lines have the `mouse-face' property on the
   whole line, so you can click it anywhere.

8. Command `Buffer-menu-select' (`v') uses `pop-to-buffer'
   when the *Buffer List* window is `window-dedicated-p'.

9. Different kinds of buffers (directory, `*...*' name,
    normal) are highlighted differently, and the buffer name
    is also highlighted specially when you mark or flag a
    buffer.

Attachment: diff-buff-menu-2007-07-09.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]