From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Feng Shu Newsgroups: gmane.emacs.bugs Subject: bug#59793: 29.0.60; subr.elc is not compiled correctly Date: Sun, 04 Dec 2022 05:50:33 +0800 Message-ID: <87r0xg6tsm.fsf@163.com> References: <87lenpne48.fsf@163.com> <83cz90erqg.fsf@gnu.org> <87359wr08z.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25359"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 59793@debbugs.gnu.org To: Akib Azmain Turja Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 03 22:51:18 2022 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 1p1aPl-0006MN-C6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Dec 2022 22:51:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1aPY-0003s7-Er; Sat, 03 Dec 2022 16:51:04 -0500 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 1p1aPV-0003rj-UG for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 16:51:01 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1aPV-0007OA-Ls for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 16:51:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1aPV-0003wF-Hu for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2022 16:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Feng Shu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Dec 2022 21:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59793 X-GNU-PR-Package: emacs Original-Received: via spool by 59793-submit@debbugs.gnu.org id=B59793.167010424915133 (code B ref 59793); Sat, 03 Dec 2022 21:51:01 +0000 Original-Received: (at 59793) by debbugs.gnu.org; 3 Dec 2022 21:50:49 +0000 Original-Received: from localhost ([127.0.0.1]:53509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1aPJ-0003w1-BX for submit@debbugs.gnu.org; Sat, 03 Dec 2022 16:50:49 -0500 Original-Received: from m12.mail.163.com ([220.181.12.196]:40182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1aPE-0003vv-Gx for 59793@debbugs.gnu.org; Sat, 03 Dec 2022 16:50:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=0rYZAs76IoLYH+WP2c2xZL+mtd61qOeD8/7VTOxNbZk=; b=e+y6C3lNos7DCXSq2Rq+gf5WPGFfymV6guS2I5pun7CeYSvKh/lWn3lU5FXtir t+msDQcIJaaDw5fbLD5BoUV9JkvLY3BlpDOPRqNe1qcsWXM7J8bjr91KQv3WHVs6 hqEKpOia4BwLpTHEMvg5MBQ8s/8EArSCy4aL25jBDg/SM= Original-Received: from Guix (unknown [49.88.144.183]) by zwqz-smtp-mta-g4-0 (Coremail) with SMTP id _____wAHqSmpxItjz9sJAA--.8573S2; Sun, 04 Dec 2022 05:50:34 +0800 (CST) In-Reply-To: <87359wr08z.fsf@disroot.org> (Akib Azmain Turja's message of "Sat, 03 Dec 2022 21:10:52 +0600") X-CM-TRANSID: _____wAHqSmpxItjz9sJAA--.8573S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxCFWruFWDtry5Gw1UCF48Zwb_yoW5Zr43pa 9xt3Z0kF40vrWxKw1Utw18JryFkan5Ww4kWry8JrWI9FWDtFy0qr42qFyrC3y7Zr4UG3yY y39Fyry3ZFyUZa7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRcJ5wUUUUU= X-Originating-IP: [49.88.144.183] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiSgzM1GI0Vy2QmgAAs4 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:249883 Archived-At: Akib Azmain Turja writes: > Eli Zaretskii writes: > >>> From: Feng Shu >>> Date: Sat, 03 Dec 2022 15:24:55 +0800 >>> >>> This week, I faced an issue about emacs-eat: >>> >>> >>> eat-yank not work well: https://codeberg.org/akib/emacs-eat/issues/9 >>> >>> >>> ------------- >>> (defun eat-yank (&optional arg) >>> "Same as `yank', but for Eat. >>> >>> ARG is passed to `yank', which see." >>> (interactive "*P") >>> (when eat--terminal >>> (funcall eat--synchronize-scroll-function) >>> (cl-letf* ((inhibit-read-only t) >>> (insert-for-yank (symbol-function #'insert-for-yank)) >>> ((symbol-function #'insert-for-yank) >>> (lambda (&rest args) >>> (cl-letf (((symbol-function #'insert) >>> (lambda (&rest args) >>> (eat-send-string-as-yank >>> eat--terminal >>> (mapconcat (lambda (arg) >>> (if (stringp arg) >>> arg >>> (string arg))) >>> args ""))))) >>> (apply insert-for-yank args))))) >>> (yank arg)))) >>> --------- >>> >>> >>> After some test with author of emacs-eat, we find that config >>> >>> (require 'eat) >>> (load "subr.el") >>> >>> work, while the below config do not work. >>> >>> (require 'eat) >>> (load "subr.elc") >>> >>> >>> we find that C-x C-e insert-for-yank and insert-for-yank-1 works too. >>> >>> >>> so we think subr.elc is not compiled correctly, I use the below >>> script to compile emacs, do not install and run ~/emacs/emacs29/src/emacs directly >> >> Thanks, but what exactly "does not work" in the byte-compiled version of >> subr.el? Do you have a recipe to reproduce the problem you see without >> using emacs-eat? If so, please post such a recipe. Because from your >> report, I don't see how to reproduce the problem and how to investigate it. >> >> >> > > I have figured out a simpler reproduction method, but since I don't have > the much information other than the subr.elc file, Feng should verify > it. > > 1. Save the following in a file. > > (require 'cl-lib) > (defun bug59593-yank (&optional arg) > (interactive "*P") > (cl-letf* ((inhibit-read-only t) > (insert-for-yank (symbol-function #'insert-for-yank)) > ((symbol-function #'insert-for-yank) > (lambda (&rest args) > (cl-letf (((symbol-function #'insert) > (lambda (&rest args) > (message > "%S" > (mapconcat (lambda (arg) > (if (stringp arg) > arg > (string arg))) > args ""))))) > (apply insert-for-yank args))))) > (yank arg))) > > 2. emacs -nw -Q -l FILE-FROM-STEP-1 -l PATH/TO/YOUR/SUBR.EL.GZ > 3. Kill something. > 4. M-x bug59593-yank. Now you should see the yank text in echo area. > 5. emacs -nw -Q -l FILE-FROM-STEP-1 -l PATH/TO/ATTACHED/SUBR.ELC > 6. Kill something. > 7. M-x bug59593-yank. The yank text got unexpectedly inserted. > > Feng, can you precisely specify the commit you're building from? It'll > allow to reproducing your problem more easily and precisely. The step is work to show this issue, and I use the below commit to test. commit f6e2f30f394a270c2eca9a9a14be46876d2a86e5 (HEAD -> emacs-29, origin/emacs-29) Author: Stefan Kangas Date: Sat Dec 3 15:31:07 2022 +0100 ; Fix typos --