all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: matthew.fidler@gmail.com, 15653@debbugs.gnu.org
Subject: bug#15653: 24.3; call-interactively not sending keys
Date: Sat, 17 Aug 2019 10:18:41 +0300	[thread overview]
Message-ID: <83k1bcntta.fsf@gnu.org> (raw)
In-Reply-To: <87zhkb3ywn.fsf@mouse.gnus.org> (message from Lars Ingebrigtsen on Wed, 14 Aug 2019 20:12:08 -0700)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 14 Aug 2019 20:12:08 -0700
> Cc: 15653@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?





  reply	other threads:[~2019-08-17  7:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-19 18:50 bug#15653: 24.3; call-interactively not sending keys Matthew Fidler
2019-08-15  3:12 ` Lars Ingebrigtsen
2019-08-17  7:18   ` Eli Zaretskii [this message]
2019-08-17 21:21     ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=83k1bcntta.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=15653@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=matthew.fidler@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 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.