;;; ibuf-ext.el --- extensions for ibuffer
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Colin Walters <walters@verbum.org>
;; Maintainer: John Paul Wallington <jpw@gnu.org>
;; You should have received a copy of the GNU General Public License
;; along with this program ; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
"Disable all filters currently in effect in this buffer."
(interactive)
(setq ibuffer-filtering-qualifiers nil)
- (ibuffer-update nil t))
+ (let ((buf (ibuffer-current-buffer)))
+ (ibuffer-update nil t)
+ (when buf
+ (ibuffer-jump-to-buffer (buffer-name buf)))))
;;;###autoload
(defun ibuffer-pop-filter ()
(when (null ibuffer-filtering-qualifiers)
(error "No filters in effect"))
(pop ibuffer-filtering-qualifiers)
- (ibuffer-update nil t))
+ (let ((buf (ibuffer-current-buffer)))
+ (ibuffer-update nil t)
+ (when buf
+ (ibuffer-jump-to-buffer (buffer-name buf)))))
(defun ibuffer-push-filter (qualifier)
"Add QUALIFIER to `ibuffer-filtering-qualifiers'."
(ibuffer-awhen (with-current-buffer buf
(or buffer-file-name
(and (boundp 'dired-directory)
- dired-directory
+ (if (stringp dired-directory)
+ dired-directory
+ (car dired-directory))
(expand-file-name dired-directory))))
(string-match qualifier it)))