all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Which keymap fired in minibuffer?
@ 2020-03-14 19:05 emacs-list-18
  2020-03-16  1:10 ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: emacs-list-18 @ 2020-03-14 19:05 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

 is there a (canonical) way to tell in which keymap the binding was
 found that was just executed in a minibuffer the current state of
 emacs? emacs version >= 26

 What i did till now is this:
 (defun find_binding()
 (interactive)
 (message "local %s" (current-local-map))
 )

 (global-set-key (kbd "<f2>") 'find_binding)

 ...but this only tells me the contents of the keymap, but not its name.

Any ideas?

Christoph

 



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

* Re: Which keymap fired in minibuffer?
  2020-03-14 19:05 Which keymap fired in minibuffer? emacs-list-18
@ 2020-03-16  1:10 ` Michael Heerdegen
  2020-03-16  2:41   ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2020-03-16  1:10 UTC (permalink / raw)
  To: emacs-list-18; +Cc: help-gnu-emacs

emacs-list-18@pgxml.net writes:

>  What i did till now is this:
>  (defun find_binding()
>  (interactive)
>  (message "local %s" (current-local-map))
>  )
>
>  (global-set-key (kbd "<f2>") 'find_binding)
>
>  ...but this only tells me the contents of the keymap, but not its name.
>
> Any ideas?

Doesn't C-h k tell you?

Michael.



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

* Re: Which keymap fired in minibuffer?
  2020-03-16  1:10 ` Michael Heerdegen
@ 2020-03-16  2:41   ` Michael Heerdegen
  2020-03-16  8:06     ` tomas
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2020-03-16  2:41 UTC (permalink / raw)
  To: emacs-list-18; +Cc: help-gnu-emacs

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Doesn't C-h k tell you?

The functions that implement what C-h k says about which map holds your
keybinding are `help--key-binding-keymap' and `help--binding-locus' btw.

Michael.



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

* Re: Which keymap fired in minibuffer?
  2020-03-16  2:41   ` Michael Heerdegen
@ 2020-03-16  8:06     ` tomas
  2020-03-17  0:23       ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: tomas @ 2020-03-16  8:06 UTC (permalink / raw)
  To: help-gnu-emacs

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

On Mon, Mar 16, 2020 at 03:41:44AM +0100, Michael Heerdegen wrote:
> Michael Heerdegen <michael_heerdegen@web.de> writes:
> 
> > Doesn't C-h k tell you?
> 
> The functions that implement what C-h k says about which map holds your
> keybinding are `help--key-binding-keymap' and `help--binding-locus' btw.

...which C-h k would tell you (yeah, sorry, I know *you* know that, but
I just couldn't let this chance to recurse pass... :)

Cheers
-- t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: Which keymap fired in minibuffer?
  2020-03-16  8:06     ` tomas
@ 2020-03-17  0:23       ` Michael Heerdegen
  2020-03-17  7:50         ` tomas
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2020-03-17  0:23 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

<tomas@tuxteam.de> writes:

> > > Doesn't C-h k tell you?
> >
> > The functions that implement what C-h k says about which map holds your
> > keybinding are `help--key-binding-keymap' and `help--binding-locus' btw.
>
> ...which C-h k would tell you (yeah, sorry, I know *you* know that, but
> I just couldn't let this chance to recurse pass... :)

Should we ever need to write Emacs from scratch (eh, I meant, from
*scratch*) we will surely start with C-h k.

Michael.



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

* Re: Which keymap fired in minibuffer?
  2020-03-17  0:23       ` Michael Heerdegen
@ 2020-03-17  7:50         ` tomas
  0 siblings, 0 replies; 6+ messages in thread
From: tomas @ 2020-03-17  7:50 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

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

On Tue, Mar 17, 2020 at 01:23:10AM +0100, Michael Heerdegen wrote:
> <tomas@tuxteam.de> writes:
> 
> > > > Doesn't C-h k tell you?
> > >
> > > The functions that implement what C-h k says about which map holds your
> > > keybinding are `help--key-binding-keymap' and `help--binding-locus' btw.
> >
> > ...which C-h k would tell you (yeah, sorry, I know *you* know that, but
> > I just couldn't let this chance to recurse pass... :)
> 
> Should we ever need to write Emacs from scratch (eh, I meant, from
> *scratch*) we will surely start with C-h k.

... and the rest would write itself, recursively ;-)

Cheers
-- tomás

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2020-03-17  7:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-14 19:05 Which keymap fired in minibuffer? emacs-list-18
2020-03-16  1:10 ` Michael Heerdegen
2020-03-16  2:41   ` Michael Heerdegen
2020-03-16  8:06     ` tomas
2020-03-17  0:23       ` Michael Heerdegen
2020-03-17  7:50         ` tomas

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.