Is there a way to sort a list of packages in Package Menu (*Packages*) sorted by Version? If you are using melpa, you see that melpa versions each package with %Y%m%d.%d. I'd like to sort by the melpa version string.


I use this to enable sorting on all columns in the package menu's tabular list:

(add-hook 'package-menu-mode-hook
          (lambda () (setq tabulated-list-format
                             (vconcat (mapcar (lambda (arg) (list (nth 0 arg) (nth 1 arg)
                                                            (or (nth 2 arg) t)))
  • Thanks it works. It'd be nice if it can take the numbers after the . as numbers. But I think I can figure that out. – Yasushi Shoji Feb 14 '16 at 7:36
  • That reduces each element in the format to a 3-elements list. But the format accepts longer lists. – Malabarba Feb 14 '16 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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