From f546c7fa751620c22722da24749cf34ead2a3b47 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Fri, 20 Oct 2017 22:22:08 +0900 Subject: [PATCH] ibuffer: new filter to list buffers running a process * lisp/ibuf-ext.el (ibuffer-filter-by-process): Add new filter (Bug#28825). * lisp/ibuffer.el (ibuffer-mode-map): Bound it to '/E'. ; * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 27.1): ; Announce this change. --- etc/NEWS | 5 +++++ lisp/ibuf-ext.el | 6 ++++++ lisp/ibuffer.el | 1 + 3 files changed, 12 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 716b0309a5a..74d6e8bf1c9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -56,6 +56,11 @@ whether '"' is also replaced in 'electric-quote-mode'. If non-nil, * Changes in Specialized Modes and Packages in Emacs 27.1 +** Ibuffer + +--- +*** New filter ibuffer-filter-by-process; bound to '/E'. + ** Edebug +++ diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 2c841fa7e0a..1ef7cb118cc 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -1286,6 +1286,12 @@ currently used by buffers." :reader (read-from-minibuffer "Filter by name (regexp): ")) (string-match qualifier (buffer-name buf))) +;;;###autoload (autoload 'ibuffer-filter-by-process "ibuf-ext") +(define-ibuffer-filter process + "Limit current view to buffers running a process." + (:description "process") + (get-buffer-process buf)) + ;;;###autoload (autoload 'ibuffer-filter-by-starred-name "ibuf-ext") (define-ibuffer-filter starred-name "Limit current view to buffers with name beginning and ending diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index fed9e75f177..7ed77d29921 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -522,6 +522,7 @@ directory, like `default-directory'." (define-key map (kbd "/ m") 'ibuffer-filter-by-used-mode) (define-key map (kbd "/ M") 'ibuffer-filter-by-derived-mode) (define-key map (kbd "/ n") 'ibuffer-filter-by-name) + (define-key map (kbd "/ E") 'ibuffer-filter-by-process) (define-key map (kbd "/ *") 'ibuffer-filter-by-starred-name) (define-key map (kbd "/ f") 'ibuffer-filter-by-filename) (define-key map (kbd "/ b") 'ibuffer-filter-by-basename) -- 2.39.5