]> git.eshelyaron.com Git - emacs.git/commitdiff
Make ibuffer-mark-by-file-name-regexp work on the displayed file name
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 23 Aug 2019 00:52:07 +0000 (17:52 -0700)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 23 Aug 2019 00:52:07 +0000 (17:52 -0700)
* lisp/ibuf-ext.el (ibuffer-mark-by-file-name-regexp): Perform the
matching on the abbreviated (i.e., displayed) file name, and not
the complete name (bug#18859).  This seems like the more expected
action.

lisp/ibuf-ext.el

index 1b69574a392958fc6d2d1771d5a35fdb7161b414..06a2248d405c05259913e7a10deba20d4a47d6ff 100644 (file)
@@ -1846,7 +1846,8 @@ When BUF nil, default to the buffer at current line."
                          (stringp dired-directory)
                          dired-directory)))))
         (when name
-          (string-match regexp name))))))
+           ;; Match on the displayed file name (which is abbreviated).
+          (string-match regexp (abbreviate-file-name name)))))))
 
 ;;;###autoload
 (defun ibuffer-mark-by-content-regexp (regexp &optional all-buffers)