all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: m43cap@yandex.com, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 64927@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#64927: 30.0.50; kill-ring with no X
Date: Thu, 03 Aug 2023 12:51:23 +0300	[thread overview]
Message-ID: <838rasxxlw.fsf@gnu.org> (raw)
In-Reply-To: <87a5vfdko3.fsf@yandex.com> (message from Colin Baxter on Sat, 29 Jul 2023 12:25:16 +0100)

> From: Colin Baxter <m43cap@yandex.com>
> Date: Sat, 29 Jul 2023 12:25:16 +0100
> 
> >>>>> Colin Baxter <m43cap@yandex.com> writes:
> 
>     > 1. Emacs-30.0.50 compiled --with-x-toolkit=no
>     > 2. emacs -Q <RET>
>     > 3. C-x C-f test.txt <RET>
>     > 4. Enter some text, e.g. "This is a test."
>     > 5. Enter some more text, e.g. "This is another test."
>     > 6. Place the cursor somewhere and press <F10>
>     > 7. Select Edit --> Paste from kill menu --> This is test.
>     > 8. popup-menu: Invalid
>     > `key-parse' syntax: %S: ["This is a test"]
> 
> Forget to mention that the text 4, 5 has of course to be copied to the
> kill-ring using C-<space> M-w. Sorry about that!

I can reproduce the same problem on a TTY frame by activating the menu
with F10, but not if the menu is activated with a mouse (on a
text-mode terminal that has a mouse).  Do you see the same problem in
the non-toolkit build if you use the mouse instead of the keyboard?

This also affects Emacs 29, and is a regression from Emacs 28, which
is related to the use of the new key-* functions.  Specifically, the
error is signaled by the call to key-valid-p issued by
possibly_translate_key_sequence, which is a subroutine of lookup-key.
The argument KEY of possibly_translate_key_sequence in this case is a
vector whose only element is a string with text properties:

  [#("create a file" 0 13 (face font-lock-comment-face fontified t))]

key-valid-p doesn't support such strings, it expects strings that
describe key sequences.

Significantly, possibly_translate_key_sequence calls key-parse after
it calls key-valid-p, and key-parse copes with this string quite well.
So I'm thinking of removing the key-valid-p call from
possibly_translate_key_sequence, since I believe key-parse can detect
any problems by itself?  Stefan, WDYT?

Colin, can you try such a change and see if it produces any
regressions?





  reply	other threads:[~2023-08-03  9:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29  9:47 bug#64927: 30.0.50; kill-ring with no X Colin Baxter
2023-07-29 11:25 ` Colin Baxter
2023-08-03  9:51   ` Eli Zaretskii [this message]
2023-08-03 15:11     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-03 16:00       ` Eli Zaretskii
2023-08-03 16:06         ` Eli Zaretskii
2023-08-03 16:30         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-03 18:26           ` Eli Zaretskii
2023-08-03 21:13             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-04  6:14               ` Colin Baxter
2023-08-04  6:38                 ` Eli Zaretskii
2023-08-03 19:55     ` Colin Baxter

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=838rasxxlw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=64927@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=m43cap@yandex.com \
    --cc=monnier@iro.umontreal.ca \
    /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.