Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Somehow, I caused my GNU emacs v23.1.1 list-buffers to be sorted alphabetically through some key sequence or mouse click I typed by error. How can I restore the normal order of buffers listed in order of last access?

share|improve this question
up vote 4 down vote accepted

You can toggle sort up or down by clicking any column heading.

share|improve this answer
True! Do you know of any key combination to achieve the same? – choroba Jul 25 '12 at 11:13
I couldn't find any key bindings for sorting, in buff-menu.el, for which: "the single entry point is 'list-buffers'" .. The sort functions are Buffer-menu-sort (column), Buffer-menu-sort-by-column (&optional e), Buffer-menu-make-sort-button (name column) , but they all seem to be focused on mouse actions. – Peter.O Jul 25 '12 at 11:24
Hitting S appears to sort the buffer on the column at point. – jchl Jun 7 '14 at 7:59

Are you talking about the standard list-buffers? It does not support sorting, as far as I know. On the other hand, ibuffer can sort the buffers, you can use , (comma) to cycle over various sort options.

share|improve this answer
Yes, list-buffers and somehow I caused it to be sorted alphabetically. – WilliamKF Jul 25 '12 at 2:56
Next time you do so, press C-h l to see the last keys pressed. – choroba Jul 25 '12 at 9:07
I can confirm Peter O's answer: clicking on the column headings sorts by that column. This came in with Emacs 22. – Peter Westlake Jul 25 '12 at 10:37
ibuffer is nice, It seems to offer all that list-buffer does, and more. +1 – Peter.O Jul 25 '12 at 11:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.