GNU bug report logs -
#15653
24.3; call-interactively not sending keys
Previous Next
Reported by: Matthew Fidler <matthew.fidler <at> gmail.com>
Date: Sat, 19 Oct 2013 18:51:02 UTC
Severity: normal
Tags: fixed
Found in version 24.3
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 15653 <at> debbugs.gnu.org (full text, mbox):
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Wed, 14 Aug 2019 20:12:08 -0700
> Cc: 15653 <at> debbugs.gnu.org
>
> > (defun test-me ()
> > (interactive)
> > (message "Test Me: %s" (key-description (this-single-command-keys))))
> >
> > (defun test-me-2 ()
> > (interactive)
> > (message "Test Me 2: %s" (key-description (this-single-command-keys)))
> > (call-interactively 'test-me nil (read-kbd-macro "C-1" t)))
> >
> > (global-set-key (read-kbd-macro "C-c a" t) 'test-me-2)
> >
> > Then, Type C-c a. The message shows:
> >
> > Test Me 2: C-c a
> > Test Me: C-c a
> >
> > It should show
> >
> > Test Me 2: C-1
> > Test Me: C-c a
I don't understand the expectation: nothing in the documentation says
that the KEYS argument to call-interactively is stuffed into what
this-single-command-keys will return. The documentation says that the
KEYS argument will be used instead of this-single-command-keys when
the called command needs to access the events that invoked it, that's
all.
> Optional third arg KEYS, if given, specifies the sequence of events to
> supply, as a vector, if the command inquires which events were used to
> invoke it.
> ---
>
> But apparently `this-single-command-keys' is not the way to inquire
> about what events were used to invoke it, and I'm not quite sure what
> this is in reference to. I thought that perhaps it was an interactive
> spec or something, but no.
Yes, it _is_ the interactive spec. When that spec uses 'e' or '@' or
something else that needs to analyze the invoking events, then Emacs
provides the information from KEYS instead.
I don't really see hat needs to be clarified in the docs, but given
the above, perhaps Lars or Matthew could propose a clarification?
This bug report was last modified 5 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.