Juri Linkov writes: >> How about this? > > Looks good. > >> + (read-buffer-sort minibuffer >> + (choice (const :tag "completions-sort controls sorting" nil) >> + (const :tag "sort matching buffer-list" buffer-list)) >> + "30.1") > > Shouldn't 'read-buffer-sort' support other choices from 'completions-sort'? > Your new choice 'historical' would sort buffers by the order of 'M-p' > the same way as 'buffer-list' will sort buffers by the order of 'M-n'. > Also 'alphabetical' would be useful for 'C-x b' when 'completions-sort' > was customized to something else. Finally got to it, I've added that in this patch (which combines both the read-buffer-sort and completions-sort changes). The nice reusable part is that the new minibuffer-sort-by-history and minibuffer-sort-alphabetically should work for any completion table. So it will be easy to just add options for different completion tables, e.g. read-file-name-sort, and they can just use those pre-existing functions. This does require adding the new dynamic variable minibuffer-completion-base which maybe should go in some other place, or could be derived from some other variable - I'm not sure. Possibly it's fine as I did it.