[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 75101583c3: Make ibuffer directory filter buffer aware
From: |
Stefan Kangas |
Subject: |
master 75101583c3: Make ibuffer directory filter buffer aware |
Date: |
Thu, 24 Nov 2022 20:10:05 -0500 (EST) |
branch: master
commit 75101583c3f645aa845fb78f88b02eae92bfdc44
Author: Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Make ibuffer directory filter buffer aware
* lisp/ibuf-ext.el (define-ibuffer-filter): Make ibuffer directory
filter buffer aware for buffer not visiting files. (Bug#59165)
---
lisp/ibuf-ext.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 6b5cccec51..adffef4325 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1336,10 +1336,12 @@ against '/a/b'. For a buffer not associated with a
file, this
matches against the value of `default-directory' in that buffer."
( :description "directory name"
:reader (read-from-minibuffer "Filter by directory name (regex): "))
- (if-let ((it (with-current-buffer buf (ibuffer-buffer-file-name))))
- (when-let ((dirname (file-name-directory it)))
- (string-match qualifier dirname))
- (when default-directory (string-match qualifier default-directory))))
+ (with-current-buffer buf
+ (if-let* ((filename (ibuffer-buffer-file-name))
+ (dirname (file-name-directory filename)))
+ (string-match qualifier dirname)
+ (when default-directory
+ (string-match qualifier default-directory)))))
;;;###autoload (autoload 'ibuffer-filter-by-size-gt "ibuf-ext")
(define-ibuffer-filter size-gt
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 75101583c3: Make ibuffer directory filter buffer aware,
Stefan Kangas <=