unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Stefan Kangas <stefankangas@gmail.com>,
	Howard Melman <hmelman@gmail.com>,
	 emacs-devel@gnu.org
Subject: RE: transient
Date: Tue, 19 May 2020 15:53:59 -0700 (PDT)	[thread overview]
Message-ID: <4bdbede1-587b-4978-a290-166698ad12d9@default> (raw)
In-Reply-To: <CADwFkmk0kjv5kkondhDiU10DLsT69tNmi_w6fy7fFO=YmgqK7g@mail.gmail.com>

> > Icicles key completion is similar, but there are
> > notable differences:
> >
> > 1. You can use it on-demand (as well as just
> >    automatically) - complete only when you want
> >    to, and without a delay.
> 
> What binding do you use here?  Won't it conflict with
> other keybindings?

Are you sure you really want to know? ;-)

tl;dr:

By default, the key (`S-TAB' by default) doesn't
get bound in any keymaps where it's already bound.

___

Option:

 `icicle-key-complete-keys' is a variable defined in `icicles-opt.el'.
 Its value is ([backtab])

 Documentation:
 Key sequences to use for `icicle-complete-keys'.
 A list of values that each has the same form as a key-sequence
 argument to `define-key'.  It is a list mainly in order to accommodate
 different keyboards - for example, `S-tab' and `S-iso-lefttab'.

(IOW the key to complete keys is `S-TAB' only by default.)
___

These options are also relevant here:

1.
 `icicle-key-complete-keys-for-minibuffer' is a variable defined in `icicles-opt.el'.
 Its value is ([M-backtab] [ESC backtab])

 Documentation:
 Key sequences to use for `icicle-complete-keys' in the minibuffer.
 A list of values that each has the same form as a key-sequence
 argument to `define-key'.

 Note: Some operating systems intercept `M-S-TAB' for their own use.
 For some versions of MS Windows, you can use
 (w32-register-hot-key [M-S-tab]) to allow Emacs to use `M-S-TAB'.

[The reason for this is that by default `S-TAB' is also used
in Icicles in the minibuffer completion maps, to complete
minibuffer input.  So by default, _key_ completion in the
minibuffer itself (yes, it's possible) uses `M-S-TAB'.]

2.
 `icicle-keymaps-for-key-completion' is a variable defined in `icicles-opt.el'.
 Its value is (...)

 Documentation:
 List of keymaps in which to bind `S-TAB' to `icicle-complete-keys'.
 List elements are symbols that are bound to keymaps.

 Each keymap should have at least one prefix key.  `S-TAB' is bound in
 each keymap, so that you can use it to complete the prefix keys.

 If one of the keymaps is not defined when Icicle mode is entered, then
 it is ignored.  If you later define it, then just exit and reenter
 Icicle mode, to bind `S-TAB' in the newly defined map.  For example,
 use `M-x icy-mode' twice after entering Calendar mode, to be able to
 complete `calendar-mode' prefix keys such as `A'.

 Do not add `global-map' or any keymaps, such as `ctl-x-map', that are
 accessible from the global keymap to the list - they are already
 treated, by default.

 Do not add any of the translation keymaps, `function-key-map',
 `key-translation-map', or `iso-transl-ctl-x-8-map' to the list - that
 will not work.

[These are keymaps inaccessible from `global-map',
as maps accessible from it are already included.]

3.
 `icicle-complete-key-anyway-flag' is a variable defined in `icicles-opt.el'.
 Its value is nil

 Documentation:
 Non-nil means bind `S-TAB' for key completion even if already
 bound.  If nil, then each of the keys in `icicle-key-complete-keys' is
 bound to `icicle-complete-keys' in each keymap of
 `icicle-keymaps-for-key-completion' only if `S-TAB' is not already
 bound in the keymap.

 Note: the keys in `icicle-key-complete-keys' are always bound to
 `icicle-complete-keys' in `icicle-mode-map'.  This option affects only
 the binding of those keys in `icicle-keymaps-for-key-completion'.

[Besides the keymaps defined by that option, keymaps
reachable from `global-map' with this function get the
`S-TAB' binding, IF either they don't already have
`S-TAB' bound OR option `icicle-complete-key-anyway-flag'
is non-nil.
This is the reason behind the "Do not add `global-map'..."
part of the `icicle-keymaps-for-key-completion' doc string.]

(defun icicle-bind-key-completion-keys-in-keymaps-from (map &optional keys)
  "Bind keys in `icicle-key-complete-keys' to `icicle-complete-keys'.
Each key in `icicle-complete-keys' (or optional arg KEYS, if non-nil)
is bound in all keymaps accessible from keymap MAP."
  (dolist (key+map  (accessible-keymaps map))
    (let ((map  (cdr key+map)))
      (when (keymapp map)
        (dolist (key  (or keys  icicle-key-complete-keys))
          (when (or icicle-complete-key-anyway-flag
                    (not (lookup-key map key)))
            (condition-case nil
               (define-key map key 'icicle-complete-keys)
             (error nil))))))))

The same kind of treatment happens in reverse when
you turn `icy-mode' off: key-completion keys are
unbound.  (Yes, it can't be perfect.  For example,
the set of keymaps accessible from the then current
global map might be different, or their keys might
be different.)

See this part of the doc:

https://www.emacswiki.org/emacs/Icicles_-_Key_Completion#KeymapsInaccessibleFromGlobalMap

Search that same page for "option" to see the above
options and others having to do with key completion
described in context.



  reply	other threads:[~2020-05-19 22:53 UTC|newest]

Thread overview: 270+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  8:26 Making Emacs popular again with a video Nathan Colinet
2020-05-08 10:39 ` Arthur Miller
2020-05-10 20:48   ` Nathan Colinet
2020-05-08 10:41 ` Stefan Kangas
2020-05-10 16:18   ` Nathan Colinet
2020-05-08 11:33 ` Eli Zaretskii
2020-05-10 20:32   ` Nathan Colinet
2020-05-11 22:59     ` Stefan Kangas
2020-05-09  7:50 ` Andreas Röhler
2020-05-10 20:57   ` Nathan Colinet
2020-05-12  3:12     ` Richard Stallman
2020-05-12  7:04       ` Arthur Miller
2020-05-12 13:59         ` Dmitry Gutov
2020-05-12 14:47           ` Arthur Miller
2020-05-12 16:08           ` Drew Adams
2020-05-13  4:01         ` Richard Stallman
2020-05-13  8:49           ` Arthur Miller
2020-05-14  5:14             ` Richard Stallman
2020-05-14 10:22               ` Arthur Miller
2020-05-14 10:55               ` Robert Pluim
2020-05-15  3:25                 ` Richard Stallman
2020-05-15  7:55                   ` Arthur Miller
2020-05-15 10:11                     ` Eli Zaretskii
2020-05-15 10:43                       ` Arthur Miller
2020-05-15 11:23                         ` Eli Zaretskii
2020-05-15 19:15                     ` H. Dieter Wilhelm
2020-05-15 18:41                   ` H. Dieter Wilhelm
2020-05-22 19:09                   ` Ben McGinnes
     [not found]                     ` <E1jcLVP-0003SB-II@fencepost.gnu.org>
2020-05-24 19:16                       ` Ben McGinnes
2020-05-14 14:13               ` Eli Zaretskii
2020-05-14  7:38             ` Tim Cross
2020-05-14  7:51               ` Andreas Röhler
2020-05-14 14:18               ` Eli Zaretskii
2020-05-14 15:36                 ` Tim Cross
2020-05-13 10:43           ` Stefan Kangas
2020-05-12  8:23       ` Andreas Röhler
2020-05-13  3:55         ` Richard Stallman
2020-05-13  8:18           ` Andreas Röhler
2020-05-13 10:53           ` Stefan Kangas
2020-05-13 16:20             ` Drew Adams
2020-05-14  2:18             ` (emacs) Intro [was: Making Emacs popular again with a video] excalamus--- via Emacs development discussions.
2020-05-14 12:04               ` Dmitry Gutov
2020-05-14 21:31                 ` excalamus--- via Emacs development discussions.
2020-05-15  0:46                   ` Dmitry Gutov
     [not found]                   ` <d28fe30d-c192-8022-b758-d8b7019e49b5@yandex.ru-M7KnL6R----2>
2020-05-17 19:11                     ` excalamus--- via Emacs development discussions.
2020-05-19 14:14                       ` excalamus--- via Emacs development discussions.
     [not found]                         ` <d66793e5-07f9-4dd9-928d-e7e8c342b781@default>
     [not found]                           ` <M7iByNw--3-2@tutanota.com>
2020-05-21 18:18                             ` excalamus--- via Emacs development discussions.
     [not found]                             ` <M7sSK-m--3-2@tutanota.com-M7sSUVm--3-2>
2020-05-28  1:21                               ` excalamus--- via Emacs development discussions.
2020-05-28  7:08                                 ` Eli Zaretskii
2020-05-28  7:41                                   ` Andreas Röhler
2020-05-28 10:23                                 ` Stefan Kangas
2020-05-29  2:39                                   ` excalamus--- via Emacs development discussions.
2020-05-29  7:28                                     ` Eli Zaretskii
2020-05-29  7:40                                     ` Stefan Kangas
2020-05-29 15:14                                       ` Stefan Monnier
2020-05-30  1:39                                       ` Richard Stallman
2020-05-14 22:14                 ` Karl Fogel
2020-05-15  3:17               ` Richard Stallman
2020-05-15  6:36               ` Andreas Röhler
2020-05-12 12:57       ` GNU Emacs raison d'etre excalamus--- via Emacs development discussions.
2020-05-13 16:18         ` Karl Fogel
2020-05-13 16:28           ` Drew Adams
2020-05-13 19:39           ` Andreas Röhler
2020-05-13 20:05             ` Karl Fogel
2020-05-13 20:52               ` Dmitry Gutov
2020-05-13 22:04                 ` Karl Fogel
2020-05-13 22:55                   ` Dmitry Gutov
2020-05-14  4:56                     ` Karl Fogel
2020-05-14 16:37                       ` Drew Adams
2020-05-14 22:11                       ` excalamus--- via Emacs development discussions.
2020-05-15  3:16                       ` Richard Stallman
2020-05-15 21:42                         ` Karl Fogel
2020-05-15 22:14                           ` Arthur Miller
2020-05-16  0:03                             ` Dmitry Gutov
2020-05-15 22:41                           ` Drew Adams
2020-05-20 21:47                             ` Karl Fogel
2020-05-20 22:35                               ` Drew Adams
2020-05-21  0:35                                 ` Karl Fogel
2020-05-16  2:43                           ` Eduardo Ochs
2020-05-18  3:46                             ` Richard Stallman
2020-05-18 11:26                               ` Dmitry Gutov
2020-05-16  8:05                           ` Yuri Khan
2020-05-16 10:36                             ` Eli Zaretskii
2020-05-16 10:46                               ` Yuri Khan
2020-05-17  1:28                       ` Dmitry Gutov
2020-05-17  1:39                         ` Dmitry Gutov
2020-05-17  1:40                         ` Dmitry Gutov
2020-05-17  1:59                         ` Jean-Christophe Helary
2020-05-17  2:52                           ` Stefan Kangas
2020-05-17  9:32                             ` Joost Kremers
2020-05-17 11:07                             ` Arthur Miller
2020-05-18  3:43                           ` transient Richard Stallman
2020-05-18  6:58                             ` transient Joost Kremers
2020-05-18 11:29                               ` transient Dmitry Gutov
2020-05-18 18:41                               ` transient Howard Melman
2020-05-18 19:35                                 ` transient John Yates
2020-05-18 19:57                                   ` transient Howard Melman
2020-05-19  5:38                                 ` transient Drew Adams
2020-05-19 14:00                                   ` transient Arthur Miller
2020-05-20  3:14                                     ` transient Michael Heerdegen
2020-05-19 22:04                                   ` transient Stefan Kangas
2020-05-19 22:53                                     ` Drew Adams [this message]
2020-05-19  4:02                               ` which-key Richard Stallman
2020-05-17  7:09                         ` GNU Emacs raison d'etre Drew Adams
2020-05-20 21:36                           ` Karl Fogel
2020-05-20 21:57                             ` Drew Adams
2020-05-20 22:00                         ` Karl Fogel
2020-05-20 22:07                           ` Dmitry Gutov
2020-05-21  8:03                             ` tomas
2020-05-21  9:33                               ` Arthur Miller
2020-05-21 10:04                                 ` tomas
2020-05-24 14:05                                   ` Arthur Miller
2020-05-21 16:20                                 ` xristos
2020-05-24 13:45                                   ` Arthur Miller
2020-05-24 16:52                                     ` xristos
2020-05-24 17:00                                       ` Eli Zaretskii
2020-05-24 18:31                                     ` Philip K.
2020-05-25 17:34                                   ` João Távora
2020-05-26  4:14                                     ` Richard Stallman
2020-05-26 11:32                                       ` João Távora
2020-05-27  3:08                                         ` Richard Stallman
2020-05-27  5:01                                           ` Drew Adams
2020-05-29 12:59                                           ` Arthur Miller
2020-06-23  3:59                                             ` Richard Stallman
2020-05-21 17:07                               ` Karl Fogel
2020-05-23 20:36                                 ` Dmitry Gutov
2020-05-14  6:26                   ` tomas
2020-05-14  6:16               ` Andreas Röhler
2020-05-15  3:18               ` Richard Stallman
2020-05-16  0:56                 ` Tak Kunihiro
2020-05-16  6:50                   ` Eli Zaretskii
2020-05-16  9:10                     ` Sergey Organov
2020-05-16 10:38                       ` Eli Zaretskii
2020-05-16 12:24                         ` Sergey Organov
2020-05-16 12:29                           ` Eli Zaretskii
2020-05-16 12:34                             ` Sergey Organov
2020-05-16 12:46                               ` Dmitry Gutov
2020-05-16 13:57                                 ` Sergey Organov
2020-05-16 19:35                                   ` Dmitry Gutov
2020-05-16 20:05                                     ` Stefan Kangas
2020-05-16 20:34                                       ` Dmitry Gutov
2020-05-16 20:44                                       ` Bob Newell
2020-06-24 15:37                                         ` Ricardo Wurmus
2020-05-16 23:12                                       ` Drew Adams
2020-05-16 23:18                                         ` Drew Adams
2020-05-16 23:47                                         ` Stefan Kangas
2020-05-17  1:14                                           ` Drew Adams
2020-05-17  3:13                                             ` Stefan Kangas
2020-05-17  6:49                                               ` Drew Adams
2020-05-17  7:02                                                 ` Jean-Christophe Helary
2020-05-17  7:11                                                   ` Drew Adams
2020-05-17  9:07                                                     ` Jean-Christophe Helary
2020-05-17 10:20                                                       ` Marcin Borkowski
2020-05-17 11:07                                                         ` Jean-Christophe Helary
2020-05-17 15:25                                                       ` Eli Zaretskii
2020-05-17 15:48                                                         ` Jean-Christophe Helary
2020-05-17 17:06                                                           ` Stefan Monnier
2020-05-17 17:31                                                             ` Arthur Miller
2020-05-17 18:57                                                               ` Drew Adams
2020-05-17 20:03                                                                 ` Arthur Miller
2020-05-18  8:32                                                                 ` martin rudalics
2020-05-18 11:39                                                                   ` Dmitry Gutov
2020-05-18 13:02                                                                     ` martin rudalics
2020-05-18 13:38                                                                       ` Dmitry Gutov
2020-05-18 16:31                                                                         ` Robert Pluim
2020-05-18 23:14                                                                           ` Dmitry Gutov
2020-05-19  8:41                                                                             ` martin rudalics
2020-05-20  1:01                                                                               ` Dmitry Gutov
2020-05-20  9:06                                                                                 ` martin rudalics
2020-05-21  0:15                                                                                   ` Dmitry Gutov
2020-05-21  9:07                                                                                     ` martin rudalics
2020-05-21 23:16                                                                                       ` Dmitry Gutov
2020-05-22  9:31                                                                                         ` martin rudalics
2020-05-25  2:37                                                                                           ` Dmitry Gutov
2020-05-26  8:06                                                                                             ` martin rudalics
2020-06-05  2:40                                                                                               ` pop-up-mini-mode, was " Dmitry Gutov
2020-05-19  8:40                                                                     ` martin rudalics
2020-05-20  0:40                                                                       ` Dmitry Gutov
2020-05-20  9:04                                                                         ` martin rudalics
2020-05-20 13:28                                                                           ` Dmitry Gutov
2020-05-20 14:45                                                                           ` Eli Zaretskii
2020-05-20 14:56                                                                             ` Dmitry Gutov
2020-05-20 16:12                                                                               ` Eli Zaretskii
2020-05-20 17:45                                                                                 ` martin rudalics
2020-05-20 18:09                                                                                   ` Eli Zaretskii
2020-05-20 18:16                                                                                     ` Eli Zaretskii
2020-05-20 18:24                                                                                     ` Dmitry Gutov
2020-05-20 18:33                                                                                       ` Eli Zaretskii
2020-05-20 18:56                                                                                         ` Eli Zaretskii
2020-05-20 19:22                                                                                           ` Dmitry Gutov
2020-05-20 19:53                                                                                             ` tomas
2020-05-20 21:22                                                                                               ` Dmitry Gutov
2020-05-21  7:43                                                                                                 ` tomas
2020-05-21  2:28                                                                                             ` Eli Zaretskii
2020-05-21 22:19                                                                                               ` Dmitry Gutov
2020-05-22  7:28                                                                                                 ` Eli Zaretskii
2020-05-22 12:16                                                                                                   ` Dmitry Gutov
2020-05-20 23:07                                                                                           ` martin rudalics
2020-05-21 13:11                                                                                             ` Eli Zaretskii
2020-05-21 17:55                                                                                               ` martin rudalics
2020-05-18 15:57                                                                   ` Drew Adams
2020-05-19  8:41                                                                     ` martin rudalics
2020-05-21 18:19                                                                   ` Suppressing beginning/end-of-buffer error messages (WAS: GNU Emacs raison d'etre) Noam Postavsky
2020-05-22  9:30                                                                     ` martin rudalics
2020-05-22 12:46                                                                       ` Noam Postavsky
     [not found]                                                                         ` <11bfe86b-131c-4f55-5125-c269a73e360d@gmx.at>
2020-05-23 11:10                                                                           ` Noam Postavsky
2020-05-17 18:36                                                             ` GNU Emacs raison d'etre Drew Adams
2020-05-17 21:04                                                               ` Stefan Monnier
2020-05-17 21:48                                                                 ` Drew Adams
2020-05-17 18:38                                                             ` Dmitry Gutov
2020-05-17 21:17                                                               ` Stefan Monnier
2020-05-17 21:37                                                                 ` Dmitry Gutov
2020-05-18  8:33                                                                   ` martin rudalics
2020-05-18 11:37                                                                     ` Dmitry Gutov
2020-05-17 21:57                                                                 ` Drew Adams
2020-05-17 18:28                                                           ` Drew Adams
2020-05-17 17:59                                                       ` Drew Adams
2020-05-17 18:07                                                       ` Dmitry Gutov
2020-05-17  7:54                                                   ` Sergey Organov
2020-05-17 11:37                                             ` Dmitry Gutov
2020-05-17 18:11                                               ` Drew Adams
2020-05-16 23:01                                     ` Arthur Miller
2020-05-17  2:55                       ` Richard Stallman
2020-05-28  4:12                 ` Karl Fogel
2020-05-28  5:51                   ` Eduardo Ochs
2020-05-28  6:13                   ` Drew Adams
2020-05-28 14:12                     ` excalamus--- via Emacs development discussions.
2020-05-28 14:42                       ` Jean-Christophe Helary
2020-05-28 16:34                         ` Drew Adams
2020-05-29 14:44                           ` Jean-Christophe Helary
2020-05-28 15:00                       ` Philip K.
2020-05-28 15:13                         ` João Távora
2020-05-28 16:04                         ` T.V Raman
     [not found]                         ` <p914ks0kpui.fsf@google.com-M8R14r9----2>
2020-05-28 16:12                           ` excalamus--- via Emacs development discussions.
2020-05-28 16:46                             ` T.V Raman
2020-05-28 17:34                               ` Karl Fogel
2020-05-28 18:11                               ` andres.ramirez
     [not found]                               ` <877dwwezfr.fsf@red-bean.com-M8RLd3p--3-2>
2020-05-28 18:28                                 ` excalamus--- via Emacs development discussions.
2020-05-29  1:12                                   ` Karl Fogel
2020-05-30  1:44                         ` Richard Stallman
2020-05-30  2:02                           ` Jean-Christophe Helary
2020-05-30  9:13                             ` Arthur Miller
2020-05-30 16:43                           ` Alfred M. Szmidt
2020-05-31  7:07                             ` Richard Stallman
2020-06-08 17:37                               ` REmacs was " T.V Raman
2020-06-01  7:29                             ` Meaning behind Control-G Lars Brinkhoff
2020-06-01  7:56                               ` Lars Brinkhoff
2020-06-01  9:06                                 ` Lars Brinkhoff
2020-06-01 13:44                               ` Stefan Monnier
2020-06-02  1:51                                 ` Paul Eggert
2020-06-02  5:58                                   ` Lars Brinkhoff
2020-06-02 13:50                                     ` Stefan Monnier
2020-06-02 15:38                                     ` Drew Adams
2020-06-02 11:46                                   ` John Yates
2020-07-10 12:13                           ` GNU Emacs raison d'etre Lars Brinkhoff
2020-07-10 14:28                             ` Drew Adams
2020-07-11  2:16                             ` Richard Stallman
2020-05-28 16:41                       ` FW: " Drew Adams
2020-05-28 17:37                       ` Stefan Monnier
2020-05-28 20:33                         ` Perry E. Metzger
2020-05-28 23:44                           ` T.V Raman
2020-05-29  3:04                   ` Richard Stallman
2020-05-13 19:46           ` T.V Raman
2020-05-13 21:00           ` Dmitry Gutov
2020-05-13 21:02           ` excalamus--- via Emacs development discussions.
2020-05-13 22:22           ` H. Dieter Wilhelm
2020-05-14  4:20             ` Karl Fogel
2020-05-14  0:04           ` John Wiegley
2020-05-14  5:08           ` Richard Stallman
2020-05-14 20:29             ` Karl Fogel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bdbede1-587b-4978-a290-166698ad12d9@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=hmelman@gmail.com \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).