From: Feng Shu <tumashu@163.com>
To: Akib Azmain Turja <akib@disroot.org>
Cc: Eli Zaretskii <eliz@gnu.org>, 59793@debbugs.gnu.org
Subject: bug#59793: 29.0.60; subr.elc is not compiled correctly
Date: Sun, 04 Dec 2022 05:50:33 +0800 [thread overview]
Message-ID: <87r0xg6tsm.fsf@163.com> (raw)
In-Reply-To: <87359wr08z.fsf@disroot.org> (Akib Azmain Turja's message of "Sat, 03 Dec 2022 21:10:52 +0600")
Akib Azmain Turja <akib@disroot.org> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Feng Shu <tumashu@163.com>
>>> 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 <stefankangas@gmail.com>
Date: Sat Dec 3 15:31:07 2022 +0100
; Fix typos
--
prev parent reply other threads:[~2022-12-03 21:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-03 7:24 bug#59793: 29.0.60; subr.elc is not compiled correctly Feng Shu
2022-12-03 9:55 ` Eli Zaretskii
2022-12-03 15:10 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-03 15:37 ` Eli Zaretskii
2022-12-03 17:16 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-03 18:10 ` Eli Zaretskii
2022-12-03 21:49 ` Feng Shu
2022-12-04 7:08 ` Eli Zaretskii
2022-12-04 11:21 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 17:01 ` Eli Zaretskii
2022-12-04 18:56 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 19:17 ` Eli Zaretskii
2022-12-09 10:44 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-09 19:18 ` Eli Zaretskii
2022-12-10 6:09 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-10 8:26 ` Eli Zaretskii
2022-12-10 7:32 ` Visuwesh
2022-12-10 8:30 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 11:18 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 17:00 ` Eli Zaretskii
2022-12-04 17:27 ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 17:35 ` Eli Zaretskii
2023-09-10 19:26 ` Stefan Kangas
2022-12-04 18:52 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-03 17:48 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-03 17:50 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-03 21:50 ` Feng Shu [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=87r0xg6tsm.fsf@163.com \
--to=tumashu@163.com \
--cc=59793@debbugs.gnu.org \
--cc=akib@disroot.org \
--cc=eliz@gnu.org \
/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).