From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.bugs Subject: bug#64927: 30.0.50; kill-ring with no X Date: Thu, 03 Aug 2023 20:55:15 +0100 Message-ID: <878rar3nq4.fsf@yandex.com> References: <87edkrdp78.fsf@yandex.com> <87a5vfdko3.fsf@yandex.com> <838rasxxlw.fsf@gnu.org> Reply-To: m43cap@yandex.com Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21004"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (gnu/linux) Cc: 64927@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 03 21:56:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qReQm-0005GG-V4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Aug 2023 21:56:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qReQW-0003bL-25; Thu, 03 Aug 2023 15:56:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qReQU-0003bD-TR for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2023 15:56:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qReQU-0006oA-L7 for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2023 15:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qReQT-0007m5-Oj for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2023 15:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Colin Baxter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Aug 2023 19:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64927 X-GNU-PR-Package: emacs Original-Received: via spool by 64927-submit@debbugs.gnu.org id=B64927.169109252329839 (code B ref 64927); Thu, 03 Aug 2023 19:56:01 +0000 Original-Received: (at 64927) by debbugs.gnu.org; 3 Aug 2023 19:55:23 +0000 Original-Received: from localhost ([127.0.0.1]:52987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRePq-0007lB-W6 for submit@debbugs.gnu.org; Thu, 03 Aug 2023 15:55:23 -0400 Original-Received: from forward502a.mail.yandex.net ([178.154.239.82]:57754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRePo-0007l1-9M for 64927@debbugs.gnu.org; Thu, 03 Aug 2023 15:55:21 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-54.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-54.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1f:f15:0:640:e80a:0]) by forward502a.mail.yandex.net (Yandex) with ESMTP id 168865E933; Thu, 3 Aug 2023 22:55:18 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-54.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id FtZLrd0WmiE0-LfIukyXB; Thu, 03 Aug 2023 22:55:17 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1691092517; bh=Wkq4kfO0yP8RABt7ltylcs66n/AcB9aeVzhtsSJwZKg=; h=Message-ID:References:Date:Reply-To:Cc:In-Reply-To:Subject:To: From; b=mUjMSFwRm6dYSMgmBZ8ZBdwkcDJhumRgwCcG1KREYaQuAscDT6B+95pH+gA2BrwVb sou8iOYrKhDjftlTrv1ZUaWFykbpkiupQrlWEHQocDHa//qKsMUvwnFm5pAublNTuk WRwD0/O0uQyVK8FFj2H/YaAJ4kA331/fvVg2aM9I= Authentication-Results: mail-nwsmtp-smtp-production-main-54.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.com In-Reply-To: <838rasxxlw.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Aug 2023 12:51:23 +0300") X-Face: BHjiJOg/Qmj'BQgsAKL@])L)e62P)C"Y=6T Face: iVBORw0KGgoAAAANSUhEUgAAAEkAAAATAgMAAAChCMjeAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEX/zAABCWP///8I RHjYAAAAAWJLR0QCZgt8ZAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+UFEAk5BvqS634A AAAbSURBVBjTY2BgCA1hYA0FAxDDgQEERsXoIAYA2F9Eb3cpB+AAAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjEtMDUtMTZUMTA6NTY6MTcrMDE6MDCh/kkpAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA1 LTE2VDA5OjU3OjA2KzAxOjAwTyZ6HwAAAABJRU5ErkJggg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266622 Archived-At: >>>>> Eli Zaretskii writes: >> From: Colin Baxter Date: Sat, 29 Jul 2023 >> 12:25:16 +0100 >> >>>>>>> Colin Baxter writes: >> >> > 1. Emacs-30.0.50 compiled --with-x-toolkit=no > 2. emacs -Q >> > 3. C-x C-f test.txt > 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 > >> 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- 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? The issue remains whether I use a mouse to mark the region or C-. > 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? I will try, but I might be out of my depth here. I've found the "possibly_translate_key_sequence" line in keymap.c, but what part of the c program should I then comment out and re-build? Colin Baxter.