Variable: proced-filter-alist

proced-filter-alist is a customizable variable defined in proced.el.gz.

Value

((user (user . proced-user-name))
 (user-running (user . proced-user-name) (state . "\\`[Rr]\\'")) (all)
 (all-running (state . "\\`[Rr]\\'"))
 (emacs (fun-all lambda (list) (proced-filter-children list 1))))

Documentation

Alist of process filters.

The car of each element is a symbol, the name of the filter. The cdr is a list of elementary filters that are applied to every process. A process is displayed if it passes all elementary filters of a selected filter.

An elementary filter can be one of the following:
(KEY . REGEXP) If value of attribute KEY matches REGEXP,
                 accept this process.
(KEY . FUN) Apply function FUN to attribute KEY. Accept this process,
                 if FUN returns non-nil.
(function . FUN) For each process, apply function FUN to list of attributes
                 of each. Accept the process if FUN returns non-nil.
(fun-all . FUN) Apply function FUN to entire process list.
                 FUN must return the filtered list.

Source Code

;; Defined in /usr/src/emacs/lisp/proced.el.gz
;; FIXME: is there a better name for filter `user' that does not coincide
;; with an attribute key?
(defcustom proced-filter-alist
  `((user (user . proced-user-name))
    (user-running (user . proced-user-name)
                  (state . "\\`[Rr]\\'"))
    (all)
    (all-running (state . "\\`[Rr]\\'"))
    (emacs (fun-all . (lambda (list)
                        (proced-filter-children list ,(emacs-pid))))))
  "Alist of process filters.
The car of each element is a symbol, the name of the filter.
The cdr is a list of elementary filters that are applied to every process.
A process is displayed if it passes all elementary filters of a selected
filter.

An elementary filter can be one of the following:
\(KEY . REGEXP)   If value of attribute KEY matches REGEXP,
                 accept this process.
\(KEY . FUN)      Apply function FUN to attribute KEY.  Accept this process,
                 if FUN returns non-nil.
\(function . FUN) For each process, apply function FUN to list of attributes
                 of each.  Accept the process if FUN returns non-nil.
\(fun-all . FUN)  Apply function FUN to entire process list.
                 FUN must return the filtered list."
  :type '(repeat (cons :tag "Filter"
                       (symbol :tag "Filter Name")
                       (repeat :tag "Filters"
                               (choice (cons :tag "Key . Regexp" (symbol :tag "Key") regexp)
                                       (cons :tag "Key . Function" (symbol :tag "Key") function)
                                       (cons :tag "Function" (const :tag "Key: function" function) function)
                                       (cons :tag "Fun-all" (const :tag "Key: fun-all" fun-all) function))))))