Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TorgoX (1933)


"Il est beau comme la retractilité des serres des oiseaux rapaces [...] et surtout, comme la rencontre fortuite sur une table de dissection d'une machine à coudre et d'un parapluie !" -- Lautréamont

Journal of TorgoX (1933)

Monday September 05, 2005
05:44 AM

A buffer-list tidier

[ #26600 ]
Dear Log,

My nugget of joy for today is this dodad I wrote to tidy up the order of the emacs buffers, as seen in the buffer list:

(defun buffer-list-sorted ()
  (sort (buffer-list)
       (a b) (string<
          (downcase (buffer-name a))
          (downcase (buffer-name b))

(defun sort-buffers ()
  "Put the buffer list in alphabetical order."
  (dolist (buff (buffer-list-sorted)) (bury-buffer buff))
  (when (interactive-p) (list-buffers))

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.