Subject: 25.1; ibuffer-do-sort-by-filename does not sort all buffers

From: Axel Svensson <[email-masked]>
Date: Sat, 30 Mar 2019 13:36:08 +0000

To reproduce:
 1) In a shell, run: mkdir ~/dir-a ~/dir-b ~/dir-c
 2) In a shell, run: touch ~/dir-a/filea1 ~/dir-c/filec1 ~/dir-c/filc2
 3) find-file ~/a and enter 20 characters in this buffer.
 4) find-file ~/c and enter 30 characters in this buffer.
 5) find-file ~/b and enter 10 characters in this buffer.
 6) find-file ~/dir-a
 7) find-file ~/dir-c
 8) find-file ~/dir-b
 9) M-x ibuffer. You should see three Fundamental buffers named a, b,
    and c, as well as three "Dired by name" buffers named dir-a, dir-b
    and dir-c.
10) Press s s
11) The modeline says "IBuffer by size", and the buffers are ordered by
    size, i.e. b,a,c,dir-b,dir-a,dir-c.
12) Press s f
13) The modeline says "IBuffer by filename/process", but not all the
    buffers are ordered. The Fundamental buffers are ordered a,b,c
    correctly, but the Dired buffers are ordered dir-b,dir-a,dir-c as
    before pressing s f.
14) Press s v
15) The modeline says "IBuffer by recency", and the buffer list is sorted
    correctly by recency, i.e. dir-b,dir-c,dir-a,b,c,a.
16) Press s f
17) The modeline says "IBuffer by filename/process", but not all the
    buffers are ordered. The Fundamental buffers are ordered a,b,c
    correctly, but the Dired buffers are ordered dir-b,dir-c,dir-a as
    before pressing s f.
18) To cleanup, run the following in a shell:
    rm ~/dir-a/filea1 ~/dir-c/filec1 ~/dir-c/filc2;
    rmdir ~/dir-a ~/dir-b ~/dir-c;

In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-09-15, modified by Debian built on trouble
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --with-x=yes --with-x-toolkit=gtk3
 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-wN2qS3/emacs25-25.1+1=.
-fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: IBuffer

Minor modes in effect:
  delete-selection-mode: t
  global-magit-file-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Sorting order normal
No library ibuf-ext.el in search path

You can run the command ‘ibuffer-do-sort-by-filename/process’ with s f
Quit [2 times]
You can run the command ‘ibuffer-do-sort-by-filename/process’ with s f
Sorting by major-mode
Sorting by mode-name
Mark activated
Making completion list...
Quit [3 times]

Load-path shadows:
/home/user/.emacs.d/elpa/dash-20180910.1856/dash hides
/usr/share/emacs25/site-lisp/dash-el/dash
/home/user/.emacs.d/elpa/git-commit-20181226.831/git-commit-pkg hides
/usr/share/emacs/25.1/site-lisp/elpa/git-commit-2.10.0/git-commit-pkg
/home/user/.emacs.d/elpa/git-commit-20181226.831/git-commit-autoloads
hides /usr/share/emacs/25.1/site-lisp/elpa/git-commit-2.10.0/git-commit-autoloads
/home/user/.emacs.d/elpa/git-commit-20181226.831/git-commit hides
/usr/share/emacs/25.1/site-lisp/elpa/git-commit-2.10.0/git-commit
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-subtree hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-subtree
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-wip hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-wip
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-remote hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-remote
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-blame hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-blame
/home/user/.emacs.d/elpa/magit-popup-20181204.2031/magit-popup hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-popup
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-autoloads hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-autoloads
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-obsolete hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-obsolete
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-ediff hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-ediff
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-core hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-core
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-worktree hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-worktree
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-process hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-process
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-branch hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-branch
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-bisect hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-bisect
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-submodule hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-submodule
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-log hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-log
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-git hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-git
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-apply hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-apply
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-autorevert hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-autorevert
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-stash hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-stash
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-margin hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-margin
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-repos hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-repos
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-status hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-status
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-pkg hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-pkg
/home/user/.emacs.d/elpa/magit-20181229.1434/git-rebase hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/git-rebase
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-commit hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-commit
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-mode hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-mode
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-diff hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-diff
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-sequence hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-sequence
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-notes hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-notes
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-refs hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-refs
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-section hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-section
/home/user/.emacs.d/elpa/magit-20181229.1434/magit hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-files hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-files
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-utils hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-utils
/home/user/.emacs.d/elpa/magit-20181229.1434/magit-extras hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-2.10.0/magit-extras
/home/user/.emacs.d/elpa/magit-popup-20181204.2031/magit-popup hides
/usr/share/emacs/25.1/site-lisp/elpa/magit-popup-2.10.0/magit-popup
/home/user/.emacs.d/elpa/magit-popup-20181204.2031/magit-popup-autoloads
hides /usr/share/emacs/25.1/site-lisp/elpa/magit-popup-2.10.0/magit-popup-autoloads
/home/user/.emacs.d/elpa/magit-popup-20181204.2031/magit-popup-pkg
hides /usr/share/emacs/25.1/site-lisp/elpa/magit-popup-2.10.0/magit-popup-pkg
/home/user/.emacs.d/elpa/with-editor-20181113.1845/with-editor-autoloads
hides /usr/share/emacs/25.1/site-lisp/elpa/with-editor-2.5.1/with-editor-autoloads
/home/user/.emacs.d/elpa/with-editor-20181113.1845/with-editor-pkg
hides /usr/share/emacs/25.1/site-lisp/elpa/with-editor-2.5.1/with-editor-pkg
/home/user/.emacs.d/elpa/with-editor-20181113.1845/with-editor hides
/usr/share/emacs/25.1/site-lisp/elpa/with-editor-2.5.1/with-editor
/usr/share/emacs/25.1/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs25/site-lisp/latex-cjk-thai/thai-word hides
/usr/share/emacs/25.1/lisp/language/thai-word
/home/user/.emacs.d/elpa/seq-2.20/seq hides
/usr/share/emacs/25.1/lisp/emacs-lisp/seq

Features:
(shadow sort mail-extr emacsbug sendmail eieio-opt tramp-cache
disp-table whitespace ibuf-ext ibuffer tabify man sh-script executable
bug-reference python-el-fgallina-expansions python magit-extras misearch
multi-isearch vc-git dired-aux wdired org-element org-rmail org-mhe
org-irc org-info org-gnus org-docview org-bibtex bibtex org-bbdb org-w3m
fringemark doc-view jka-compr image-mode gnus-async nntp gnus-sum
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls
gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win
gnus gnus-ems nnheader wid-edit org-mobile org-agenda org-install
w3m-load paren saveplace ido table delsel grep helm helm-source
eieio-compat helm-multi-match helm-lib sass-mode haml-mode
js-mode-expansions js html-mode-expansions sgml-mode json map
css-mode-expansions css-mode ruby-mode-expansions ruby-mode cider
tramp-sh cider-debug cider-browse-ns cider-inspector cider-mode
cider-completion cider-profile cider-eval cider-repl-history pulse
derived cider-repl cider-resolve cider-test cider-overlays
cider-stacktrace cider-doc cider-browse-spec org-table
the-org-mode-expansions org org-macro org-footnote org-pcomplete
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu
calendar cal-loaddefs cider-grimoire url-vars cider-popup cider-eldoc
cider-client cider-common cider-util color cider-connection
sesman-browser nrepl-client tramp tramp-compat auth-source
tramp-loaddefs trampver ucs-normalize queue nrepl-dict cider-compat
spinner auto-complete popup gtags php-mode php-project mode-local
find-func speedbar sb-image ezimage dframe etags xref project flymake
cc-langs cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs on-screen ace-jump-mode cl
yasnippet sml-mode-expansions sml-mode compile smie expand-region
text-mode-expansions clojure-mode-expansions er-basic-expansions
expand-region-core expand-region-custom multiple-cursors
mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors
mc-edit-lines multiple-cursors-core rect rainbow-delimiters smartparens
thingatpt paredit sesman vc vc-dispatcher clojure-mode lisp-mnt subr-x
align undo-tree diff enclose edmacro kmacro magit-submodule
magit-obsolete magit-blame magit-stash magit-bisect magit-push
magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff
smerge-mode diff-mode magit-core magit-autorevert autorevert filenotify
magit-process magit-margin magit-mode git-commit magit-git magit-section
eieio eieio-core magit-utils magit-popup crm log-edit easy-mmode message
dired format-spec rfc822 mml mml-sec password-cache epg gnus-util
time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mm-util help-fns mail-prsvr mailabbrev mail-utils
gmm-utils mailheader pcvs-util add-log with-editor cl-seq cl-macs
async-bytecomp advice async shell pcomplete comint ansi-color ring
server finder-inf rx info package epg-config seq byte-opt gv bytecomp
byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib
haskell-mode-autoloads erlang-start dash-functional dash mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 806075 56072)
 (symbols 48 70495 0)
 (miscs 40 194 931)
 (strings 32 252456 8037)
 (string-bytes 1 7017538)
 (vectors 16 96416)
 (vector-slots 8 2195997 252912)
 (floats 8 818 801)
 (intervals 56 1347 1267)
 (buffers 976 32))