unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Fix search tab completion in terminals
@ 2012-03-16  3:13 Austin Clements
  2012-03-18 12:42 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Austin Clements @ 2012-03-16  3:13 UTC (permalink / raw)
  To: notmuch

In X, Emacs distinguishes the tab key, which produces a 'tab event;
from C-i, which produces a ?\t event.  However, in a terminal, these
are indistinguishable and only produce a ?\t event.  In order to
simplify things, Emacs automatically translates from 'tab to ?\t (see
"Function key translations" in M-x describe-bindings), so functions
only need to be bound to ?\t to work in all situations.

Previously, the search tab completion code usedq (kbd "<tab>"), which
produced the event sequence [tab], which only matched the 'tab event
and hence only worked in X.  This patch changes it to (kbd "TAB"),
which matches the general ?\t event and works in all situations.
---
 emacs/notmuch.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 99e0c93..f0afa07 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -962,7 +962,7 @@ PROMPT is the string to prompt with."
 					 completions)))
 	       (t (list string)))))))
       ;; this was simpler than convincing completing-read to accept spaces:
-      (define-key keymap (kbd "<tab>") 'minibuffer-complete)
+      (define-key keymap (kbd "TAB") 'minibuffer-complete)
       (let ((history-delete-duplicates t))
 	(read-from-minibuffer prompt nil keymap nil
 			      'notmuch-search-history nil nil)))))
-- 
1.7.7.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] emacs: Fix search tab completion in terminals
  2012-03-16  3:13 [PATCH] emacs: Fix search tab completion in terminals Austin Clements
@ 2012-03-18 12:42 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2012-03-18 12:42 UTC (permalink / raw)
  To: Austin Clements, notmuch

On Thu, 15 Mar 2012 23:13:12 -0400, Austin Clements <amdragon@MIT.EDU> wrote:
> 
> Previously, the search tab completion code usedq (kbd "<tab>"), which
> produced the event sequence [tab], which only matched the 'tab event
> and hence only worked in X.  This patch changes it to (kbd "TAB"),
> which matches the general ?\t event and works in all situations.

pushed,

d

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-18 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16  3:13 [PATCH] emacs: Fix search tab completion in terminals Austin Clements
2012-03-18 12:42 ` David Bremner

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

	https://yhetil.org/notmuch.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).