[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28825: 27.0.50; New filter ibuffer-filter-by-process
From: |
Tino Calancha |
Subject: |
bug#28825: 27.0.50; New filter ibuffer-filter-by-process |
Date: |
Sat, 14 Oct 2017 11:51:16 +0900 |
Severity: wishlist
Tags: patch
I have defined in my .emacs an Ibuffer filter to list
the buffers running a process.
As others filters, you can get the via 'ibuffer-filter-by-predicate'
/e (get-buffer-process (current-buffer)) RET
I just find more convenient to have defined the new command; I bound
it to '/E' as a memo of 'E'xternal process, because '/r' and '/R'
are already assigned.
Do you want to add this into master branch?
--8<-----------------------------cut here---------------start------------->8---
commit ea28cf0003a6470aba73b871eb5ab15f59ba2d72
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Sat Oct 14 11:49:24 2017 +0900
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.
diff --git a/etc/NEWS b/etc/NEWS
index 2332ba4d1f..82948d1029 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -56,6 +56,11 @@ replaced by a double typographic quote.
* 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 686bc392b6..0b02efaa05 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1283,6 +1283,12 @@ name
: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 fed9e75f17..7ed77d2992 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -522,6 +522,7 @@ ibuffer-mode-map
(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)
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 27.0.50 (build 16, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
of 2017-10-14
Repository revision: 78479a3984047a8153b43571e6b5ebfb674223a4
- bug#28825: 27.0.50; New filter ibuffer-filter-by-process,
Tino Calancha <=