all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17767: 24.4.50; [PATCH] Bind tab and backtab in completion lists
@ 2014-06-12 23:19 Matthias Meulien
  2014-06-13 18:14 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Meulien @ 2014-06-12 23:19 UTC (permalink / raw
  To: 17767

[-- Attachment #1: Type: text/plain, Size: 68 bytes --]

 
Two bindings that ease completion selection in completion lists.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Bind tab and backtab in completion lists --]
[-- Type: text/x-diff, Size: 830 bytes --]

From 7b61f2ae2acda2d3eb59ffc2a9df8da132d77297 Mon Sep 17 00:00:00 2001
From: Matthias Meulien <orontee@gmail.com>
Date: Fri, 13 Jun 2014 01:10:15 +0200
Subject: [PATCH] Bind tab and backtab in completion lists

---
 lisp/simple.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/simple.el b/lisp/simple.el
index cde1699..bd31b94 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6977,6 +6977,8 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally."
     (define-key map "\e\e\e" 'delete-completion-window)
     (define-key map [left] 'previous-completion)
     (define-key map [right] 'next-completion)
+    (define-key map [tab] 'next-completion)
+    (define-key map [backtab] 'previous-completion)
     (define-key map "q" 'quit-window)
     (define-key map "z" 'kill-this-buffer)
     map)
-- 
2.0.0


[-- Attachment #3: Type: text/plain, Size: 7305 bytes --]





In GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
 of 2014-05-27 on choubidou
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
Important settings:
  value of $LC_COLLATE: C
  value of $LANG: fr_FR.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
  diff-auto-refine-mode: t
  flyspell-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  global-auto-complete-mode: t
  global-semantic-mru-bookmark-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-idle-scheduler-mode: t
  semantic-mode: t
  desktop-save-mode: t
  auto-image-file-mode: t
  electric-pair-mode: t
  icomplete-mode: t
  global-auto-revert-mode: t
  auto-insert-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  use-hard-newlines: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  auto-fill-function: org-auto-fill-function
  transient-mark-mode: t

Recent input:
M-b M-b M-b <M-backspace> b a c k C-x C-s C-n C-n C-n 
C-x d <return> C-x M-o C-s s i m p l e C-n <f9> M-p 
M-p <return> C-c C-p C-c C-p C-c C-p C-s . e l . C-s 
C-n M-> M-p M-p <return> C-x b M-v <tab> C-x k C-x 
4 f <M-backspace> <M-backspace> p r o <tab> e m <tab> 
p a t <tab> <return> g n n <return> C-x o g i t SPC 
s t a t u s <return> C-c C-p <C-return> C-g M-> C-x 
v d <return> M-< n n n n n n C-v C-v C-n C-n C-n C-n 
C-n C-n v T a b SPC a n d SPC <M-backspace> <M-backspace> 
B i n d SPC t a b SPC a n d SPC b a c k t a b SPC t 
o SPC <M-backspace> i n SPC c o m p l e t i o n SPC 
l i s t s C-c C-c q g i t SPC f o r m <tab> a t - p 
a t c h SPC H E A D <return> l l <return> g i t SPC 
c l o g SPC - 1 <return> SPC <return> M-p M-p M-p . 
. <return> M-p M-b M-f ~ <return> m v SPC 0 0 <tab> 
~ / P r <tab> j <backspace> e m a <tab> p a t <tab> 
<return> C-x C-f M-p M-p 0 0 0 1 - b i n <tab> <return> 
C-x 4 b s i m <tab> <return> C-v C-v C-v C-v M-v M-< 
C-x k <return> M-x e m a c s SPC b u g <tab> <M-backspace> 
r e p <tab> <M-backspace> <M-backspace> r e p o r t 
SPC <tab> <return>

Recent messages:
Ispell process killed
Starting new Ispell process /usr/bin/aspell with english dictionary...
Mark set
Press C-c C-c when you are done editing.
Enter a change comment.  Type C-c C-c when done
Checking in /home/matthias/Sources/emacs/lisp/simple.el...done
No match
Mark set
Ispell process killed
Starting new Ispell process /usr/bin/aspell with en dictionary...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr gnus-msg gnus-art mm-uu mml2015 epg-config
mm-view mml-smime smime password-cache dig mailcap gnus-sum emacsbug
sendmail bug-reference log-edit pcvs-util add-log diary-lib
diary-loaddefs pcase derived time-stamp misearch multi-isearch eieio-opt
help-mode reftex-dcr reftex reftex-vars tex-mode warnings
semantic/bovine/c hideif semantic/bovine/c-by semantic/lex-spp
semantic/bovine/gcc semantic/analyze/refs cwarn sh-script executable
arc-mode archive-mode rst diff-mode semantic/tag-write face-remap vc-dir
ewoc vc vc-dispatcher css-mode smie generic semantic/bovine/make
semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn
semantic/bovine/make-by semantic/bovine make-mode semantic/html
sgml-mode semantic/wisent/javascript-jv semantic/wisent/js-wy
semantic/java semantic/doc cap-words superword subword dired-aux
mule-util conf-mode inversion vc-git semantic/tag-file semantic/db-file
data-debug cedet-files semantic/wisent/python semantic/decorate/include
semantic/db-find semantic/db-ref semantic/decorate/mode
semantic/decorate pulse semantic/dep semantic/wisent/python-wy
semantic/wisent semantic/wisent/wisent rx python flyspell ox-latex
ox-icalendar ox-html ox-ascii ox-publish ox goto-addr org-element
org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view
jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m js json imenu
ob-sh shell ob-plantuml paren choubidou-custom cus-edit cus-start
cus-load gnus-demon nntp gnus-group gnus-undo gnus-start gnus-cloud
nnimap nnmail mail-source tls utf7 netrc parse-time gnus-spec gnus-win
nnoo gnus-int gnus-range message rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader gnus gnus-ems nnheader gnus-util mail-utils mm-util
mail-prsvr wid-edit gnus-dired dired-x dired org-capture org org-macro
org-footnote org-pcomplete pcomplete org-list org-faces org-entities
noutline outline easy-mmode org-version ob-emacs-lisp ob ob-tangle
org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar
cal-loaddefs dictionary link connection irfc url-vars flymake-csslint
php-mode etags cc-langs speedbar sb-image dframe sql view thingatpt
flymake-jslint flymake-python-pyflakes flymake-easy advice help-fns
flymake compile comint hideshow skeleton find-file whitespace
auto-complete edmacro kmacro cl-macs popup cl minimap
semantic/mru-bookmark ring semantic/db-mode semantic/db gv eieio-base
semantic/idle semantic/format ezimage semantic/tag-ls semantic/find
semantic/ctxt semantic/util-modes semantic/util semantic semantic/tag
semantic/lex semantic/fw mode-local cedet ispell desktop frameset server
woman man cl-loaddefs cl-lib ansi-color image-file tar-mode saveplace
elec-pair icomplete windmove autorevert filenotify autoinsert cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs generic-x Django-doc-autoloads auto-complete-autoloads
color-theme-solarized-autoloads doctags-autoloads
flymake-csslint-autoloads flymake-jslint-autoloads
flymake-easy-autoloads gist-autoloads finder-inf eieio byte-opt bytecomp
byte-compile cconv eieio-core info easymenu gnuplot-autoloads
graphviz-dot-mode-autoloads htmlize-autoloads logito-autoloads
php-mode-autoloads popup-autoloads symbols-mode-autoloads package
time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode prog-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind gfilenotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 1065146 145606)
 (symbols 48 54363 0)
 (miscs 40 9360 511)
 (strings 32 327260 16344)
 (string-bytes 1 6006216)
 (vectors 16 61615)
 (vector-slots 8 1739608 113512)
 (floats 8 365 542)
 (intervals 56 42066 2111)
 (buffers 960 236)
 (heap 1024 168392 3781))

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

* bug#17767: 24.4.50; [PATCH] Bind tab and backtab in completion lists
  2014-06-12 23:19 bug#17767: 24.4.50; [PATCH] Bind tab and backtab in completion lists Matthias Meulien
@ 2014-06-13 18:14 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-06-13 18:14 UTC (permalink / raw
  To: Matthias Meulien; +Cc: 17767-done

> Two bindings that ease completion selection in completion lists.

Hmm... on the one hand, this is in line with other applications's use of
tab and backtab, but on the other hand, Emacs's TAB key is already super
crowded with other meanings (typically "expand", "complete",
or "indent"), so it's a bit unfortunate.  It seems harmless here, but
this use will obviously spread to other circumstances where conflicts
are possible (e.g. using TAB to move between input fields conflicts with
using TAB to complete within an input field).

I guess we're going to have to adapt somehow.

> +    (define-key map [tab] 'next-completion)

I installed your patch but I used ?\t here so it also works in
text terminals.


        Stefan





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

end of thread, other threads:[~2014-06-13 18:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-12 23:19 bug#17767: 24.4.50; [PATCH] Bind tab and backtab in completion lists Matthias Meulien
2014-06-13 18:14 ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.