GNU bug report logs -
#59793
29.0.60; subr.elc is not compiled correctly
Previous Next
Reported by: Feng Shu <tumashu <at> 163.com>
Date: Sat, 3 Dec 2022 07:26:02 UTC
Severity: normal
Tags: notabug
Found in version 29.0.60
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Feng Shu <tumashu <at> 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.
--8<---------------cut here---------------start------------->8---
(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)))
--8<---------------cut here---------------end--------------->8---
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.
--
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib <at> hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 1 year and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.