changeset 57108:eeb2a6261d0d

(define-ibuffer-filter filename): Consider `dired-directory' if buffer has no file name. From Sean O'Rourke <sorourke@cs.ucsd.edu>.
author John Paul Wallington <jpw@pobox.com>
date Tue, 14 Sep 2004 20:04:14 +0000
parents 0d0a17cf1b63
children 1d12a7f38833
files lisp/ibuf-ext.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ibuf-ext.el	Tue Sep 14 20:04:09 2004 +0000
+++ b/lisp/ibuf-ext.el	Tue Sep 14 20:04:14 2004 +0000
@@ -1015,7 +1015,10 @@
   "Toggle current view to buffers with filename matching QUALIFIER."
   (:description "filename"
    :reader (read-from-minibuffer "Filter by filename (regexp): "))
-  (ibuffer-awhen (buffer-file-name buf)
+  (ibuffer-awhen (with-current-buffer buf
+		   (or buffer-file-name
+		       (and (boundp 'dired-directory)
+			    dired-directory)))
     (string-match qualifier it)))
 
 ;;;###autoload (autoload 'ibuffer-filter-by-size-gt  "ibuf-ext.el")