all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Feng Shu <tumashu@163.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Akib Azmain Turja <akib@disroot.org>, 59793@debbugs.gnu.org
Subject: bug#59793: 29.0.60; subr.elc is not compiled correctly
Date: Sun, 04 Dec 2022 05:49:06 +0800	[thread overview]
Message-ID: <87v8ms6tv1.fsf@163.com> (raw)
In-Reply-To: <83sfhwcq9h.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Dec 2022 20:10:18 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Akib Azmain Turja <akib@disroot.org>
>> Cc: Feng Shu <tumashu@163.com>,  59793@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.

-- 






  reply	other threads:[~2022-12-03 21:49 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 [this message]
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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8ms6tv1.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.