Home    

ee-buffers

ee-buffers - display and manipulate Emacs buffers

Description

This extension displays a categorized list of Emacs buffers with different buffer attributes, and allows to perform different operations on separate buffer or on groups of buffers.

Default views

list-buffers

This view emulates the default display of function 'list-buffers'.

r-filter filters out the buffers whose names begin with space. The *ee-buffers* buffer itself is filtered out as well.
c-path-finder no categories in this view
r-sorter unsorted, i.e. buffers are sorted by recency
r-title-printer emulates the title printed by 'list-buffers'
r-printer emulates the rows printed by 'list-buffers'
post-update moves point to previously visited buffer
r-select switches to the selected buffer
 MR Buffer           Size Mode             File
 -- ------           ---- ----             ----
    ee-buffers.el   32822 Emacs-Lisp       /home/juri/emacs/ee/ee-buffers.el
    ee.el           92569 Emacs-Lisp       /home/juri/emacs/ee/ee.el
*   ee.texi         10848 Texinfo          /home/juri/emacs/ee/ee.texi
    *scratch*           0 Lisp Interaction ~/
 *  *Messages*      38599 Fundamental      /home/juri/
 *  *grep*          54447 grep             /usr/share/emacs/21.2/lisp/
D % *info*          52033 Info             /usr/share/info/emacs-21/
--:%%  *ee-buffers*    (ee-buffers)--L1--C0--All----------------------------
 

Dired-like

This view categorizes the file buffers by their directory names. Buffers not visiting a file are categorized under their mode name. Inside every category the buffers are sorted alphabetically (and sorting them by recency could be also useful). Every buffer row is printed in format very similar to the output of function 'dired', where the buffer attributes replace the file attributes: inode is replaced by buffer-display-count, user name - by mode name, file modification time - by buffer-display-time, and file name - by buffer name. Typing `M-o' will disable/enable filter very much like dired-omit-toggle does with dired-omit-files. Toggled buffer names are displayed in the same color as in the dired mode. Buffers not visited some time amount are "faded away" and displayed in gray color instead of black.

Categorizing the buffers by their directory names is the most useful way to group buffers, because often an user simultaneouly works only with files located in one or very few directories, so other groups of ununsed buffers can be easily hidden from view by collapsing their directory category. This is my favorite ee-buffers view.

r-filter filters out the buffers whose names begin with space character, some buffers whose names are surrounded by asterisks, buffers in dired mode except the buffer *Find*, and the *ee-buffers* buffer itself.
c-path-finder categorizes by buffer directory name
c-sorter sorts alphabetically
r-sorter sorts alphabetically by buffer name
c-printer shows in parentheses the amount of buffers in a category, and amount of marked buffers (alternatively, useful could be total size of buffers)
r-printer columns are mark, modified, read-only, display-count, mode-name, size, buffer display time and buffer name
post-update moves point to the previously visited buffer
r-select switches to the selected buffer
 MR Cnt Mode                 Size    Display Time  Buffer Name
- /home/juri/ (1)
      2 Emacs-Lisp         119408 2003-02-15 19:52 .emacs
- /home/juri/emacs/ee/ (8, 2)
      1 Makefile             2114 2003-02-15 18:45 Makefile<ee>
      1 Fundamental          2803 2003-02-15 18:45 README<ee>
      1 Emacs-Lisp           5287 2003-02-15 18:45 ee-autoloads.el
     56 Emacs-Lisp          32019 2003-02-15 21:42 ee-buffers.el
     27 Emacs-Lisp          92569 2003-02-15 19:54 ee.el
      4 Texinfo             10848 2003-02-15 19:52 ee.texi
*     4 Emacs-Lisp            544 2003-02-15 19:55 ee.ee
*     1 Emacs-Lisp            532 2003-02-15 18:45 ee.views.ee
- /home/juri/.emacs-ee/ (3)
  %   1 Dired by name         223 2003-02-15 18:45 /home/juri/.emacs-ee/
      1 Emacs-Lisp          11680 2003-02-15 18:45 view.ee
      1 Emacs-Lisp          44011 2003-02-15 18:45 programs-debian.ee
+ /home/juri/.emacs-ee/info-emacs-21/ (3)
--:%%  *ee-buffers*    (ee-buffers)--L1--C0--All--------------------------
 

Alternatively, directory paths can be splitted into a directory trees. To do this, in the c-path-finder the property function 'list' should be replaced by 'ee-split-string' with argument "/". Also buffer sizes can be summed up on the category lines.

 MR Cnt Mode                 Size    Display Time  Buffer Name
- home (3, 245242)
 - juri (3, 245242)
      1 Emacs-Lisp         116908 2003-02-15 18:45 .emacs
  - emacs (2, 128334)
   - ee (2, 128334)
     93 Emacs-Lisp          35765 2003-02-15 23:09 ee-buffers.el
     28 Emacs-Lisp          92569 2003-02-15 22:17 ee.el
- usr (2, 202569)
 - share (2, 202569)
  - emacs (1, 150523)
   - lisp (1, 150523)
  %   1 Emacs-Lisp         150523 2003-02-15 23:06 files.el
  - info (1, 52046)
   + emacs-21 (1, 52046)
--:%%  *ee-buffers*    (ee-buffers)--L1--C0--All-------------------
 

The variables 'ee-buffer-directory-name-regexp-alist' and 'ee-buffer-file-name-regexp-alist' can be used to specify the mappings between directory or file names and project names. For example, the next value of 'ee-buffer-directory-name-regexp-alist'

(("ee" . "ee")
 ("emacs" . "emacs")
 ("html\\|www" . "www"))

will place the files with the directory names matching the keys of this association list under the associated project names.

 MR Cnt Mode                 Size    Display Time  Buffer Name
- Project (15)
 - ee (14)
  - /home/juri/emacs/ee/ (8)
      1 Makefile             2114 2003-02-15 18:45 Makefile<ee>
      1 Fundamental          2803 2003-02-15 18:45 README<ee>
      1 Emacs-Lisp           5287 2003-02-15 18:45 ee-autoloads.el
     56 Emacs-Lisp          32019 2003-02-15 21:42 ee-buffers.el
     27 Emacs-Lisp          92569 2003-02-15 19:54 ee.el
      4 Texinfo             10848 2003-02-15 19:52 ee.texi
      4 Emacs-Lisp            544 2003-02-15 19:55 ee.ee
      1 Emacs-Lisp            532 2003-02-15 18:45 ee.views.ee
  - /home/juri/.emacs-ee/ (3)
  %   1 Dired by name         223 2003-02-15 18:45 /home/juri/.emacs-ee/
      1 Emacs-Lisp          11680 2003-02-15 18:45 view.ee
      1 Emacs-Lisp          44011 2003-02-15 18:45 programs-debian.ee
  + /home/juri/.emacs-ee/info-emacs-21/ (3)
 - emacs (1)
  - /home/juri/ (1)
      2 Emacs-Lisp         119408 2003-02-15 19:52 .emacs
--:%%  *ee-buffers*    (ee-buffers)--L1--C0--All--------------------------
 

By Mode or Type

Buffers in this view are categorized by mode names and additionally by buffer "types", such as modified, read-only, invisible, etc. In this view every buffer can appear under several categories.

r-filter filters out the *ee-buffers* buffer
c-path-finder categorizes by mode name and by buffer "type"
c-sorter first level sorted alphabetically, second level is unsorted
r-sorter sorts alphabetically by buffer name
c-printer shows in parentheses the amount of buffers in a category, and amount of marked buffers (alternatively, useful could be total size of buffers)
r-printer columns are mark, modified, read-only, display-count, mode-name, size, buffer display time and buffer name
post-update moves point to the previously visited buffer
r-select switches to the selected buffer
 MR Cnt Mode                 Size    Display Time  Buffer Name
- Dired (2)
 - Dired by date (1)
  %   8 Dired by date        2728 2003-02-15 22:15 /home/juri/
 - Dired by name (1)
  %   3 Dired by name        5297 2003-02-15 21:42 /home/juri/emacs/ee/
- Emacs-Lisp (2)
    102 Emacs-Lisp          35254 2003-02-15 23:33 ee-buffers.el
     28 Emacs-Lisp          92569 2003-02-15 22:17 ee.el
- Fundamental (2)
 *    1 Fundamental             0 2003-02-15 19:56   *info tag table*
 *    0 Fundamental         84049 2003-02-15 23:33 *Messages*
- Invisible (1)
 *    1 Fundamental             0 2003-02-15 19:56   *info tag table*
- Lisp Interaction (1)
      5 Lisp Interaction        0 2003-02-15 18:45 *scratch*
- Modified (2)
 *    1 Fundamental             0 2003-02-15 19:56   *info tag table*
 *    0 Fundamental         84049 2003-02-15 23:33 *Messages*
- Read-only (2)
  %   8 Dired by date        2728 2003-02-15 22:15 /home/juri/
  %   3 Dired by name        5297 2003-02-15 21:42 /home/juri/emacs/ee/
--:%%  *ee-buffers*    (ee-buffers)--L1--C0--All-----------------------
 

By Coding

Buffers in this view are categorized by buffer file coding system.

r-filter filters out buffers not visiting files
c-path-finder categorizes by field file-coding-system
r-printer prints buffer file name
r-select switches to the selected buffer
- iso-2022-7bit-unix (1)
  /usr/share/emacs/21.3/etc/HELLO
- undecided-unix (2)
  /dos/c/home/juri/prog/gnu/emacs/ee/ee-buffers.el
  /dos/c/home/juri/prog/gnu/emacs/ee/ee.ee
- utf-8-unix (1)
  /usr/share/emacs/21.3/lisp/textmodes/tex-mode.el
--:%%  *ee-buffers*    (ee-buffers)--L1--C0--All-----------------------
 

TODO

  • Add more views

ChangeLog

  • 2003-08-09 - Added view "by Coding"