unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [QUESTION] Update Ibuffer keybindings
@ 2016-12-20  9:10 Tino Calancha
  0 siblings, 0 replies; only message in thread
From: Tino Calancha @ 2016-12-20  9:10 UTC (permalink / raw)
  To: Emacs developers; +Cc: Christopher Genovese, tino.calancha


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 <genovese@cmu.edu>
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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-20  9:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-20  9:10 [QUESTION] Update Ibuffer keybindings Tino Calancha

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).