Variable: ibuffer-saved-filters

ibuffer-saved-filters is a customizable variable defined in ibuf-ext.el.gz.

Value

(("programming"
  (or (derived-mode . prog-mode) (mode . ess-mode)
      (mode . compilation-mode)))
 ("text document"
  (and (derived-mode . text-mode) (not (starred-name))))
 ("TeX"
  (or (derived-mode . tex-mode) (mode . latex-mode)
      (mode . context-mode) (mode . ams-tex-mode) (mode . bibtex-mode)))
 ("web"
  (or (derived-mode . sgml-mode) (derived-mode . css-base-mode)
      (derived-mode . js-base-mode)
      (derived-mode . typescript-ts-base-mode) (mode . js2-mode)
      (derived-mode . haml-mode) (mode . sass-mode)))
 ("gnus"
  (or (mode . message-mode) (mode . mail-mode)
      (mode . gnus-group-mode) (mode . gnus-summary-mode)
      (mode . gnus-article-mode))))

Documentation

An alist mapping saved filter names to filter specifications.

Each element should look like ("NAME" . FILTER-LIST), where FILTER-LIST has the same structure as the variable ibuffer-filtering-qualifiers, which see. The filters defined here are joined with an implicit logical and and associated with NAME. The combined specification can be used by name in other filter specifications via the saved qualifier (again, see ibuffer-filtering-qualifiers). They can also be switched to by name (see the functions ibuffer-switch-to-saved-filters and ibuffer-save-filters). The variable ibuffer-save-with-custom affects how this information is saved for future sessions. This variable can be set directly from lisp code.

This variable was added, or its default value changed, in Emacs 26.1.

Source Code

;; Defined in /usr/src/emacs/lisp/ibuf-ext.el.gz
(defcustom ibuffer-saved-filters '(("programming"
                                    (or (derived-mode . prog-mode)
                                        (mode         . ess-mode)
                                        (mode         . compilation-mode)))
                                   ("text document"
                                    (and (derived-mode . text-mode)
                                         (not (starred-name))))
                                   ("TeX"
                                    (or (derived-mode . tex-mode)
                                        (mode         . latex-mode)
                                        (mode         . context-mode)
                                        (mode         . ams-tex-mode)
                                        (mode         . bibtex-mode)))
                                   ("web"
                                    (or (derived-mode . sgml-mode)
                                        (derived-mode . css-base-mode)
                                        (derived-mode . js-base-mode)
                                        (derived-mode . typescript-ts-base-mode)
                                        (mode         . js2-mode)
                                        (derived-mode . haml-mode)
                                        (mode         . sass-mode)))
                                   ("gnus"
                                    (or (mode . message-mode)
                                        (mode . mail-mode)
                                        (mode . gnus-group-mode)
                                        (mode . gnus-summary-mode)
                                        (mode . gnus-article-mode))))

  "An alist mapping saved filter names to filter specifications.

Each element should look like (\"NAME\" . FILTER-LIST), where
FILTER-LIST has the same structure as the variable
`ibuffer-filtering-qualifiers', which see.  The filters defined
here are joined with an implicit logical `and' and associated
with NAME.  The combined specification can be used by name in
other filter specifications via the `saved' qualifier (again, see
`ibuffer-filtering-qualifiers'). They can also be switched to by
name (see the functions `ibuffer-switch-to-saved-filters' and
`ibuffer-save-filters').  The variable `ibuffer-save-with-custom'
affects how this information is saved for future sessions.  This
variable can be set directly from lisp code."
  :version "26.1"
  :type '(alist :key-type (string :tag "Filter name")
                :value-type (repeat :tag "Filter specification" sexp))
  :set (lambda (symbol value)
         ;; Just set-default but update legacy old-style format
         (set-default symbol (cdr (ibuffer-update-saved-filters-format value))))
  :group 'ibuffer)