all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: sbaugh@janestreet.com, 62626@debbugs.gnu.org
Subject: bug#62626: 29.0.60; describe-key errors on Edit → Paste from Kill Ring → [any item]
Date: Sat, 08 Apr 2023 15:43:43 +0300	[thread overview]
Message-ID: <83ttxqmtmo.fsf@gnu.org> (raw)
In-Reply-To: <jwvmt3lku6s.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Thu, 06 Apr 2023 10:07:47 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Spencer Baugh <sbaugh@janestreet.com>,  62626@debbugs.gnu.org
> Date: Thu, 06 Apr 2023 10:07:47 -0400
> 
> > An alternative solution for the original problem would be to teach
> > event-basic-type and event-modifiers about "events" that happen to be
> > strings.
> 
> Since `read-key-sequence` returns those, we should probably teach
> `event-*` functions to deal with them.

Done.

> But since they don't agree with `eventp`, maybe we should also consider
> deprecating such "weird keys".

Patches welcome (and this is not for the release branch anyway).

> FWIW, that very same "Paste from Kill Menu" is constructed differently in
> `context-menu-region` where it doesn't suffer from this problem (it
> uses integers instead of strings, as keys).

Aren't those integer indices the reason why the recipe below:

  emacs -Q
  M-x context-menu-mode RET
  Type "foobar" and kill it
  C-h k and right click, then "Paste from Kill Menu", then select string
  Observe the help buffer claims the key sequence was:
    <down-mouse-3> <paste-from-menu> C-a
                                     ^^^
shows the bogus "C-a" at the end of the sequence?  I believe C-a comes
from the index 1 that read-key-sequence returns at the end of the
sequence:

  [(down-mouse-3 (#<window 3 on *scratch*> 146 (422 . 257) 1959895390 nil 146 (52 . 3) nil (422 . 209) (8 . 16))) paste-from-menu 1]





  reply	other threads:[~2023-04-08 12:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-02 18:49 bug#62626: 29.0.60; describe-key errors on Edit → Paste from Kill Ring → [any item] Spencer Baugh
2023-04-02 19:06 ` Spencer Baugh
2023-04-06 11:49   ` Eli Zaretskii
2023-04-06 13:07     ` Spencer Baugh
2023-04-06 13:49       ` Eli Zaretskii
2023-04-06 11:47 ` Eli Zaretskii
2023-04-06 14:07   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-08 12:43     ` Eli Zaretskii [this message]
2023-04-08 15:42       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-08 17:13         ` Eli Zaretskii

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=83ttxqmtmo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=62626@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=sbaugh@janestreet.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.