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
Message #29 received at 59793 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Akib Azmain Turja <akib <at> disroot.org>
>> Cc: Feng Shu <tumashu <at> 163.com>, 59793 <at> debbugs.gnu.org
>> Date: Sat, 03 Dec 2022 23:16:47 +0600
>>
>> > Am I missing something, or do you redefine a function and then expect it to work like you never redefined it?
>>
>> Unexpected: bug59593-yank just inserts the killed text.
>> Expected: bug59593-yank intercepts and shows the killed text in echo
>> area.
>
> You have redefined a subr.el function with cl-letf*, so how is what happens
> as result a bug in Emacs? Does the original subr.el function not do what
> it's supposed to do, before you replace it?
>
> I understand you didn't expect the result of cl-letf*, and were surprised by
> what you saw, but I don't understand why you expect the Emacs development to
> do something about your surprise.
I think the issue is that:
when I run emacs-29 first, I can not temp override `insert' function
in `insert-for-yank-1' with the help of cl-letf in bug59593-yank
(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)))
but after I run (load "subr.el"), overriding `insert' success.
if I run (load "subr.elc"), overriding do not success.
so I think subr.elc maybe has some problem.
by the way, I use f6e2f30f394a270c2eca9a9a14be46876d2a86e5 to test
>
>> > So I'm still confused...
>>
>> Is it clear now? (Somehow, I think, no.)
>
> See above: I understand what you are saying, but not why this is submitted
> as a bug to the Emacs development team.
--
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.