From: Lars Ingebrigtsen Date: Fri, 23 Aug 2019 00:52:07 +0000 (-0700) Subject: Make ibuffer-mark-by-file-name-regexp work on the displayed file name X-Git-Tag: emacs-27.0.90~1328^2~126 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=18e9cb8f431e4b7520e99854b423c25d546335be;p=emacs.git Make ibuffer-mark-by-file-name-regexp work on the displayed file name * 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. --- diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 1b69574a392..06a2248d405 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -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)