unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 27470@debbugs.gnu.org
Subject: bug#27470: 26.0.50; this-command-keys and interactive input
Date: Sat, 24 Jun 2017 09:15:04 -0400	[thread overview]
Message-ID: <jwvtw35bke4.fsf-monnier+bug#27470@gnu.org> (raw)
In-Reply-To: <87y3siapuw.fsf@drachen> (Michael Heerdegen's message of "Sat, 24 Jun 2017 07:58:47 +0200")

> (defun test (arg)
>   (interactive (list (read-from-minibuffer "Input: ")))
>   (message "%S" (cons this-command (this-command-keys)))
>   arg)

Whether it's a bug or not is hard to say (the quirk is described in the
doctring).  But you can get the behavior you want with:

    (defun sm-test (arg &optional keys)
      (interactive
        (let ((keys (this-command-keys-vector)))
          (list (read-from-minibuffer "Input: ") keys)))
      (message "%S" (cons this-command keys))
      arg)


-- Stefan





      parent reply	other threads:[~2017-06-24 13:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-24  5:58 bug#27470: 26.0.50; this-command-keys and interactive input Michael Heerdegen
2017-06-24  7:01 ` Eli Zaretskii
2017-06-25  5:53   ` Michael Heerdegen
2017-07-22  8:16   ` Eli Zaretskii
2017-07-23 15:44     ` Michael Heerdegen
2017-07-28 12:41       ` Eli Zaretskii
2017-06-24 13:15 ` Stefan Monnier [this message]

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='jwvtw35bke4.fsf-monnier+bug#27470@gnu.org' \
    --to=monnier@iro.umontreal.ca \
    --cc=27470@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    /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).