From 18e9cb8f431e4b7520e99854b423c25d546335be Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 22 Aug 2019 17:52:07 -0700 Subject: [PATCH] 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. --- lisp/ibuf-ext.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.39.5