;;; ibuffer.el --- operate on buffers like dired
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2011 Free Software Foundation, Inc.
;; Author: Colin Walters <walters@verbum.org>
;; Maintainer: John Paul Wallington <jpw@gnu.org>
(defvar ibuffer-tmp-hide-regexps)
(defvar ibuffer-tmp-show-regexps)
-(declare-function ibuffer-mark-on-buffer "ibuf-ext"
+(declare-function ibuffer-mark-on-buffer "ibuf-ext"
(func &optional ibuffer-mark-on-buffer-mark group))
-(declare-function ibuffer-format-qualifier "ibuf-ext" (qualifier))
-(declare-function ibuffer-generate-filter-groups "ibuf-ext"
+(declare-function ibuffer-generate-filter-groups "ibuf-ext"
(bmarklist &optional noempty nodefault))
(declare-function ibuffer-format-filter-group-data "ibuf-ext" (filter))
:group 'ibuffer)
(defcustom ibuffer-compressed-file-name-regexp
- "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|zip\\|z\\)$"
+ "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|xz\\|zip\\|z\\)$"
"Regexp to match compressed file names."
+ :version "24.1" ; added xz
:type 'regexp
:group 'ibuffer)
;; immediate operations
(define-key map (kbd "n") 'ibuffer-forward-line)
- (define-key map (kbd "<down>") 'ibuffer-forward-line)
(define-key map (kbd "SPC") 'forward-line)
(define-key map (kbd "p") 'ibuffer-backward-line)
- (define-key map (kbd "<up>") 'ibuffer-backward-line)
(define-key map (kbd "M-}") 'ibuffer-forward-next-marked)
(define-key map (kbd "M-{") 'ibuffer-backwards-next-marked)
(define-key map (kbd "l") 'ibuffer-redisplay)
(define-key map (kbd "/ /") 'ibuffer-filter-disable)
(define-key map (kbd "M-n") 'ibuffer-forward-filter-group)
- (define-key map (kbd "<right>") 'ibuffer-forward-filter-group)
+ (define-key map "\t" 'ibuffer-forward-filter-group)
(define-key map (kbd "M-p") 'ibuffer-backward-filter-group)
- (define-key map (kbd "<left>") 'ibuffer-backward-filter-group)
+ (define-key map [backtab] 'ibuffer-backward-filter-group)
(define-key map (kbd "M-j") 'ibuffer-jump-to-filter-group)
(define-key map (kbd "C-k") 'ibuffer-kill-line)
(define-key map (kbd "C-y") 'ibuffer-yank)
one window."
(interactive "P")
(let ((buf (ibuffer-current-buffer t)))
- (bury-buffer (current-buffer))
(switch-to-buffer buf)
(when single
(delete-other-windows))))
(line (+ 1 (count-lines 1 (point)))))
(bury-buffer buf)
(ibuffer-update nil t)
- (goto-line line)))
+ (goto-char (point-min))
+ (forward-line (1- line))))
(defun ibuffer-visit-tags-table ()
"Visit the tags table in the buffer on this line. See `visit-tags-table'."
;; This definitely falls in the
;; ghetto hack category...
(not (string-match "too small" (cadr err)))))
- (apply #'signal err)
+ (signal (car err) (cdr err))
(enlarge-window 3))))))
(select-window (next-window))
(switch-to-buffer buf)
(ibuffer-map-on-mark ibuffer-deletion-char func))
(defsubst ibuffer-assert-ibuffer-mode ()
- (assert (derived-mode-p 'ibuffer-mode)))
+ (assert (derived-mode-p 'ibuffer-mode)))
(defun ibuffer-buffer-file-name ()
(or buffer-file-name
name)))
(when hmap
(setq
- strname
+ strname
(propertize strname 'mouse-face 'highlight 'keymap hmap)))
strname)))))
(add-text-properties opos (point) `(ibuffer-title-header t))
(setq buffer-read-only t)
(set-buffer-modified-p ibuffer-did-modification)
(setq ibuffer-did-modification nil)
- (goto-line (1+ orig)))))
+ (goto-char (point-min))
+ (forward-line orig))))
(defun ibuffer-quit ()
"Quit this `ibuffer' session.
(add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
(run-mode-hooks 'ibuffer-mode-hook))
+\f
+;;; Start of automatically extracted autoloads.
+\f
+;;;### (autoloads (ibuffer-do-occur ibuffer-mark-dired-buffers ibuffer-mark-read-only-buffers
+;;;;;; ibuffer-mark-special-buffers ibuffer-mark-old-buffers ibuffer-mark-compressed-file-buffers
+;;;;;; ibuffer-mark-help-buffers ibuffer-mark-dissociated-buffers
+;;;;;; ibuffer-mark-unsaved-buffers ibuffer-mark-modified-buffers
+;;;;;; ibuffer-mark-by-mode ibuffer-mark-by-file-name-regexp ibuffer-mark-by-mode-regexp
+;;;;;; ibuffer-mark-by-name-regexp ibuffer-copy-filename-as-kill
+;;;;;; ibuffer-diff-with-file ibuffer-jump-to-buffer ibuffer-do-kill-lines
+;;;;;; ibuffer-backwards-next-marked ibuffer-forward-next-marked
+;;;;;; ibuffer-add-to-tmp-show ibuffer-add-to-tmp-hide ibuffer-bs-show
+;;;;;; ibuffer-invert-sorting ibuffer-toggle-sorting-mode ibuffer-switch-to-saved-filters
+;;;;;; ibuffer-add-saved-filters ibuffer-delete-saved-filters ibuffer-save-filters
+;;;;;; ibuffer-or-filter ibuffer-negate-filter ibuffer-exchange-filters
+;;;;;; ibuffer-decompose-filter ibuffer-pop-filter ibuffer-filter-disable
+;;;;;; ibuffer-switch-to-saved-filter-groups ibuffer-delete-saved-filter-groups
+;;;;;; ibuffer-save-filter-groups ibuffer-yank-filter-group ibuffer-yank
+;;;;;; ibuffer-kill-line ibuffer-kill-filter-group ibuffer-jump-to-filter-group
+;;;;;; ibuffer-clear-filter-groups ibuffer-decompose-filter-group
+;;;;;; ibuffer-pop-filter-group ibuffer-set-filter-groups-by-mode
+;;;;;; ibuffer-filters-to-filter-group ibuffer-included-in-filters-p
+;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group
+;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group
+;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode
+;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "ae74e74d79fa66e206bef609e5f72d00")
+;;; Generated autoloads from ibuf-ext.el
+
+(autoload 'ibuffer-auto-mode "ibuf-ext" "\
+Toggle use of Ibuffer's auto-update facility.
+With numeric ARG, enable auto-update if and only if ARG is positive.
+
+\(fn &optional ARG)" t nil)
+
+(autoload 'ibuffer-mouse-filter-by-mode "ibuf-ext" "\
+Enable or disable filtering by the major mode chosen via mouse.
+
+\(fn EVENT)" t nil)
+
+(autoload 'ibuffer-interactive-filter-by-mode "ibuf-ext" "\
+Enable or disable filtering by the major mode at point.
+
+\(fn EVENT-OR-POINT)" t nil)
+
+(autoload 'ibuffer-mouse-toggle-filter-group "ibuf-ext" "\
+Toggle the display status of the filter group chosen with the mouse.
+
+\(fn EVENT)" t nil)
+
+(autoload 'ibuffer-toggle-filter-group "ibuf-ext" "\
+Toggle the display status of the filter group on this line.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-forward-filter-group "ibuf-ext" "\
+Move point forwards by COUNT filtering groups.
+
+\(fn &optional COUNT)" t nil)
+
+(autoload 'ibuffer-backward-filter-group "ibuf-ext" "\
+Move point backwards by COUNT filtering groups.
+
+\(fn &optional COUNT)" t nil)
+ (autoload 'ibuffer-do-shell-command-pipe "ibuf-ext")
+ (autoload 'ibuffer-do-shell-command-pipe-replace "ibuf-ext")
+ (autoload 'ibuffer-do-shell-command-file "ibuf-ext")
+ (autoload 'ibuffer-do-eval "ibuf-ext")
+ (autoload 'ibuffer-do-view-and-eval "ibuf-ext")
+ (autoload 'ibuffer-do-rename-uniquely "ibuf-ext")
+ (autoload 'ibuffer-do-revert "ibuf-ext")
+ (autoload 'ibuffer-do-isearch "ibuf-ext")
+ (autoload 'ibuffer-do-isearch-regexp "ibuf-ext")
+ (autoload 'ibuffer-do-replace-regexp "ibuf-ext")
+ (autoload 'ibuffer-do-query-replace "ibuf-ext")
+ (autoload 'ibuffer-do-query-replace-regexp "ibuf-ext")
+ (autoload 'ibuffer-do-print "ibuf-ext")
+
+(autoload 'ibuffer-included-in-filters-p "ibuf-ext" "\
+Not documented
+
+\(fn BUF FILTERS)" nil nil)
+
+(autoload 'ibuffer-filters-to-filter-group "ibuf-ext" "\
+Make the current filters into a filtering group.
+
+\(fn NAME)" t nil)
+
+(autoload 'ibuffer-set-filter-groups-by-mode "ibuf-ext" "\
+Set the current filter groups to filter by mode.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-pop-filter-group "ibuf-ext" "\
+Remove the first filter group.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-decompose-filter-group "ibuf-ext" "\
+Decompose the filter group GROUP into active filters.
+
+\(fn GROUP)" t nil)
+
+(autoload 'ibuffer-clear-filter-groups "ibuf-ext" "\
+Remove all filter groups.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-jump-to-filter-group "ibuf-ext" "\
+Move point to the filter group whose name is NAME.
+
+\(fn NAME)" t nil)
+
+(autoload 'ibuffer-kill-filter-group "ibuf-ext" "\
+Kill the filter group named NAME.
+The group will be added to `ibuffer-filter-group-kill-ring'.
+
+\(fn NAME)" t nil)
+
+(autoload 'ibuffer-kill-line "ibuf-ext" "\
+Kill the filter group at point.
+See also `ibuffer-kill-filter-group'.
+
+\(fn &optional ARG INTERACTIVE-P)" t nil)
+
+(autoload 'ibuffer-yank "ibuf-ext" "\
+Yank the last killed filter group before group at point.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-yank-filter-group "ibuf-ext" "\
+Yank the last killed filter group before group named NAME.
+
+\(fn NAME)" t nil)
+
+(autoload 'ibuffer-save-filter-groups "ibuf-ext" "\
+Save all active filter groups GROUPS as NAME.
+They are added to `ibuffer-saved-filter-groups'. Interactively,
+prompt for NAME, and use the current filters.
+
+\(fn NAME GROUPS)" t nil)
+
+(autoload 'ibuffer-delete-saved-filter-groups "ibuf-ext" "\
+Delete saved filter groups with NAME.
+They are removed from `ibuffer-saved-filter-groups'.
+
+\(fn NAME)" t nil)
+
+(autoload 'ibuffer-switch-to-saved-filter-groups "ibuf-ext" "\
+Set this buffer's filter groups to saved version with NAME.
+The value from `ibuffer-saved-filter-groups' is used.
+
+\(fn NAME)" t nil)
+
+(autoload 'ibuffer-filter-disable "ibuf-ext" "\
+Disable all filters currently in effect in this buffer.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-pop-filter "ibuf-ext" "\
+Remove the top filter in this buffer.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-decompose-filter "ibuf-ext" "\
+Separate the top compound filter (OR, NOT, or SAVED) in this buffer.
+
+This means that the topmost filter on the filtering stack, which must
+be a complex filter like (OR [name: foo] [mode: bar-mode]), will be
+turned into two separate filters [name: foo] and [mode: bar-mode].
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-exchange-filters "ibuf-ext" "\
+Exchange the top two filters on the stack in this buffer.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-negate-filter "ibuf-ext" "\
+Negate the sense of the top filter in the current buffer.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-or-filter "ibuf-ext" "\
+Replace the top two filters in this buffer with their logical OR.
+If optional argument REVERSE is non-nil, instead break the top OR
+filter into parts.
+
+\(fn &optional REVERSE)" t nil)
+
+(autoload 'ibuffer-save-filters "ibuf-ext" "\
+Save FILTERS in this buffer with name NAME in `ibuffer-saved-filters'.
+Interactively, prompt for NAME, and use the current filters.
+
+\(fn NAME FILTERS)" t nil)
+
+(autoload 'ibuffer-delete-saved-filters "ibuf-ext" "\
+Delete saved filters with NAME from `ibuffer-saved-filters'.
+
+\(fn NAME)" t nil)
+
+(autoload 'ibuffer-add-saved-filters "ibuf-ext" "\
+Add saved filters from `ibuffer-saved-filters' to this buffer's filters.
+
+\(fn NAME)" t nil)
+
+(autoload 'ibuffer-switch-to-saved-filters "ibuf-ext" "\
+Set this buffer's filters to filters with NAME from `ibuffer-saved-filters'.
+
+\(fn NAME)" t nil)
+ (autoload 'ibuffer-filter-by-mode "ibuf-ext")
+ (autoload 'ibuffer-filter-by-used-mode "ibuf-ext")
+ (autoload 'ibuffer-filter-by-name "ibuf-ext")
+ (autoload 'ibuffer-filter-by-filename "ibuf-ext")
+ (autoload 'ibuffer-filter-by-size-gt "ibuf-ext")
+ (autoload 'ibuffer-filter-by-size-lt "ibuf-ext")
+ (autoload 'ibuffer-filter-by-content "ibuf-ext")
+ (autoload 'ibuffer-filter-by-predicate "ibuf-ext")
+
+(autoload 'ibuffer-toggle-sorting-mode "ibuf-ext" "\
+Toggle the current sorting mode.
+Default sorting modes are:
+ Recency - the last time the buffer was viewed
+ Name - the name of the buffer
+ Major Mode - the name of the major mode of the buffer
+ Size - the size of the buffer
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-invert-sorting "ibuf-ext" "\
+Toggle whether or not sorting is in reverse order.
+
+\(fn)" t nil)
+ (autoload 'ibuffer-do-sort-by-major-mode "ibuf-ext")
+ (autoload 'ibuffer-do-sort-by-mode-name "ibuf-ext")
+ (autoload 'ibuffer-do-sort-by-alphabetic "ibuf-ext")
+ (autoload 'ibuffer-do-sort-by-size "ibuf-ext")
+ (autoload 'ibuffer-do-sort-by-filename/process "ibuf-ext")
+
+(autoload 'ibuffer-bs-show "ibuf-ext" "\
+Emulate `bs-show' from the bs.el package.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-add-to-tmp-hide "ibuf-ext" "\
+Add REGEXP to `ibuffer-tmp-hide-regexps'.
+This means that buffers whose name matches REGEXP will not be shown
+for this Ibuffer session.
+
+\(fn REGEXP)" t nil)
+
+(autoload 'ibuffer-add-to-tmp-show "ibuf-ext" "\
+Add REGEXP to `ibuffer-tmp-show-regexps'.
+This means that buffers whose name matches REGEXP will always be shown
+for this Ibuffer session.
+
+\(fn REGEXP)" t nil)
+
+(autoload 'ibuffer-forward-next-marked "ibuf-ext" "\
+Move forward by COUNT marked buffers (default 1).
+
+If MARK is non-nil, it should be a character denoting the type of mark
+to move by. The default is `ibuffer-marked-char'.
+
+If DIRECTION is non-nil, it should be an integer; negative integers
+mean move backwards, non-negative integers mean move forwards.
+
+\(fn &optional COUNT MARK DIRECTION)" t nil)
+
+(autoload 'ibuffer-backwards-next-marked "ibuf-ext" "\
+Move backwards by COUNT marked buffers (default 1).
+
+If MARK is non-nil, it should be a character denoting the type of mark
+to move by. The default is `ibuffer-marked-char'.
+
+\(fn &optional COUNT MARK)" t nil)
+
+(autoload 'ibuffer-do-kill-lines "ibuf-ext" "\
+Hide all of the currently marked lines.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-jump-to-buffer "ibuf-ext" "\
+Move point to the buffer whose name is NAME.
+
+If called interactively, prompt for a buffer name and go to the
+corresponding line in the Ibuffer buffer. If said buffer is in a
+hidden group filter, open it.
+
+If `ibuffer-jump-offer-only-visible-buffers' is non-nil, only offer
+visible buffers in the completion list. Calling the command with
+a prefix argument reverses the meaning of that variable.
+
+\(fn NAME)" t nil)
+
+(autoload 'ibuffer-diff-with-file "ibuf-ext" "\
+View the differences between marked buffers and their associated files.
+If no buffers are marked, use buffer at point.
+This requires the external program \"diff\" to be in your `exec-path'.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-copy-filename-as-kill "ibuf-ext" "\
+Copy filenames of marked buffers into the kill ring.
+
+The names are separated by a space.
+If a buffer has no filename, it is ignored.
+
+With no prefix arg, use the filename sans its directory of each marked file.
+With a zero prefix arg, use the complete filename of each marked file.
+With \\[universal-argument], use the filename of each marked file relative
+to `ibuffer-default-directory' if non-nil, otherwise `default-directory'.
+
+You can then feed the file name(s) to other commands with \\[yank].
+
+\(fn &optional ARG)" t nil)
+
+(autoload 'ibuffer-mark-by-name-regexp "ibuf-ext" "\
+Mark all buffers whose name matches REGEXP.
+
+\(fn REGEXP)" t nil)
+
+(autoload 'ibuffer-mark-by-mode-regexp "ibuf-ext" "\
+Mark all buffers whose major mode matches REGEXP.
+
+\(fn REGEXP)" t nil)
+
+(autoload 'ibuffer-mark-by-file-name-regexp "ibuf-ext" "\
+Mark all buffers whose file name matches REGEXP.
+
+\(fn REGEXP)" t nil)
+
+(autoload 'ibuffer-mark-by-mode "ibuf-ext" "\
+Mark all buffers whose major mode equals MODE.
+
+\(fn MODE)" t nil)
+
+(autoload 'ibuffer-mark-modified-buffers "ibuf-ext" "\
+Mark all modified buffers.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-mark-unsaved-buffers "ibuf-ext" "\
+Mark all modified buffers that have an associated file.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-mark-dissociated-buffers "ibuf-ext" "\
+Mark all buffers whose associated file does not exist.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-mark-help-buffers "ibuf-ext" "\
+Mark buffers like *Help*, *Apropos*, *Info*.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-mark-compressed-file-buffers "ibuf-ext" "\
+Mark buffers whose associated file is compressed.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-mark-old-buffers "ibuf-ext" "\
+Mark buffers which have not been viewed in `ibuffer-old-time' hours.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-mark-special-buffers "ibuf-ext" "\
+Mark all buffers whose name begins and ends with '*'.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-mark-read-only-buffers "ibuf-ext" "\
+Mark all read-only buffers.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-mark-dired-buffers "ibuf-ext" "\
+Mark all `dired' buffers.
+
+\(fn)" t nil)
+
+(autoload 'ibuffer-do-occur "ibuf-ext" "\
+View lines which match REGEXP in all marked buffers.
+Optional argument NLINES says how many lines of context to display: it
+defaults to one.
+
+\(fn REGEXP &optional NLINES)" t nil)
+
+;;;***
+\f
+;;; End of automatically extracted autoloads.
+
+
(provide 'ibuffer)
(run-hooks 'ibuffer-load-hook)
;; coding: iso-8859-1
;; End:
-;; arch-tag: 72581688-0603-4954-b8cf-837c700f62e8
;;; ibuffer.el ends here