emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[QUESTION] Update Ibuffer keybindings


From: Tino Calancha
Subject: [QUESTION] Update Ibuffer keybindings
Date: Tue, 20 Dec 2016 18:10:00 +0900

Hi,

commit 35aaa6b6aa adds several commands to ibuffer.
You can find the entire discussion on:
https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00399.html

Chris is suggesting to go an step further and update the Ibuffer
keybindings as follows:

1) Bind the new command `ibuffer-filter-chosen-by-completion' to
'/ TAB'.  Those keys together with '/ t' are currently bound to
`ibuffer-exchange-filters'.

2) Bind the new command `ibuffer-filter-by-directory' to '/ /';
rebind `ibuffer-filter-disable', which is currently bound to
'/ /', to '/ DEL'.

Please, let me know your opinion about the convenice/unconvenience
on this proposal.
Following is the patch:


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>From ae5137a907071cbafafdf651c4873eac8acab141 Mon Sep 17 00:00:00 2001
From: Christopher Genovese <address@hidden>
Date: Tue, 20 Dec 2016 17:42:24 +0900
Subject: [PATCH] ibuffer: Update key bindings

* lisp/ibuffer.el (ibuffer-mode-map): Bind 'ibuffer-filter-by-directory'
and 'ibuffer-filter-chosen-by-completion' to '//' and '/TAB' respectively.
Rebind 'ibuffer-filter-disable' to '/ DEL'.
; * etc/NEWS: Update NEWS entries.
---
 etc/NEWS        | 10 ++++++----
 lisp/ibuffer.el |  5 +++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index ee74236a52..5c461a7dda 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -341,12 +341,14 @@ to '/b', '/.', '//', '/*', '/i' and '/v'.
 
 ---
 *** Two new commands 'ibuffer-filter-chosen-by-completion'
-and `ibuffer-and-filter', the second bound to '/&'.
+and `ibuffer-and-filter'; bound to '/ TAB' and '/&'
+respectively.
 
 ---
-*** The commands `ibuffer-pop-filter', `ibuffer-pop-filter-group',
-`ibuffer-or-filter' and `ibuffer-filter-disable' have the alternative
-bindings '/<up>', '/S-<up>', '/|' and '/DEL', respectively.
+*** The key binding for `ibuffer-filter-disable' has being changed
+to '/DEL'; the commands `ibuffer-pop-filter', `ibuffer-pop-filter-group'
+and `ibuffer-or-filter' have the alternative bindings '/<up>', '/S-<up>'
+and '/|'.
 
 ---
 *** The data format specifying filters has been extended to allow
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 5a740845bd..db9cfebfc5 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -526,12 +526,14 @@ ibuffer-mode-map
     (define-key map (kbd "/ f") 'ibuffer-filter-by-filename)
     (define-key map (kbd "/ b") 'ibuffer-filter-by-basename)
     (define-key map (kbd "/ .") 'ibuffer-filter-by-file-extension)
+    (define-key map (kbd "/ /") 'ibuffer-filter-by-directory)
     (define-key map (kbd "/ <") 'ibuffer-filter-by-size-lt)
     (define-key map (kbd "/ >") 'ibuffer-filter-by-size-gt)
     (define-key map (kbd "/ i") 'ibuffer-filter-by-modified)
     (define-key map (kbd "/ v") 'ibuffer-filter-by-visiting-file)
     (define-key map (kbd "/ c") 'ibuffer-filter-by-content)
     (define-key map (kbd "/ e") 'ibuffer-filter-by-predicate)
+    (define-key map (kbd "/ TAB") 'ibuffer-filter-chosen-by-completion)
 
     (define-key map (kbd "/ r") 'ibuffer-switch-to-saved-filters)
     (define-key map (kbd "/ a") 'ibuffer-add-saved-filters)
@@ -542,7 +544,6 @@ ibuffer-mode-map
     (define-key map (kbd "/ <up>") 'ibuffer-pop-filter)
     (define-key map (kbd "/ !") 'ibuffer-negate-filter)
     (define-key map (kbd "/ t") 'ibuffer-exchange-filters)
-    (define-key map (kbd "/ TAB") 'ibuffer-exchange-filters)
     (define-key map (kbd "/ o") 'ibuffer-or-filter)
     (define-key map (kbd "/ |") 'ibuffer-or-filter)
     (define-key map (kbd "/ &") 'ibuffer-and-filter)
@@ -550,7 +551,7 @@ ibuffer-mode-map
     (define-key map (kbd "/ P") 'ibuffer-pop-filter-group)
     (define-key map (kbd "/ S-<up>") 'ibuffer-pop-filter-group)
     (define-key map (kbd "/ D") 'ibuffer-decompose-filter-group)
-    (define-key map (kbd "/ /") 'ibuffer-filter-disable)
+    (define-key map (kbd "/ DEL") 'ibuffer-filter-disable)
 
     (define-key map (kbd "M-n") 'ibuffer-forward-filter-group)
     (define-key map "\t" 'ibuffer-forward-filter-group)
-- 
2.11.0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.4)
 of 2016-12-20
Repository revision: 35aaa6b6aa9a2e7b42465603fb32355a009c510f




reply via email to

[Prev in Thread] Current Thread [Next in Thread]