all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: tumashu@163.com, 59793@debbugs.gnu.org, akib@disroot.org,
	miha@kamnitnik.top
Subject: bug#59793: 29.0.60; subr.elc is not compiled correctly
Date: Sun, 10 Sep 2023 12:26:00 -0700	[thread overview]
Message-ID: <CADwFkmnxjnfZHpSR44TmrVJzPwM9rfCdCY3hKHOgCPdGAVU0Rw@mail.gmail.com> (raw)
In-Reply-To: <83k0379ine.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 04 Dec 2022 19:35:17 +0200")

tags 59793 + notabug
close 59793
thanks

Eli Zaretskii <eliz@gnu.org> writes:

>> From: miha@kamnitnik.top
>> Cc: tumashu@163.com, 59793@debbugs.gnu.org
>> Date: Sun, 04 Dec 2022 18:27:07 +0100
>>
>> In Emacs 29.0.50, I checked M-x disassemble RET insert-for-yank-1 RET
>> and it looks like it uses an 'insert' bytcode operation instead of
>> funcalling the 'insert' function. I think this is what prevents
>> overriding of 'insert' from working on byte-compiled code, as explained
>> in '(elisp) Advice and Byte Code'.
>
> Of course!  And the same can happen with other function calls that the byte
> compiler converts into bytecode operations.
>
> That is why this technique is unreliable and shouldn't be used.

This bug report was about redefining built-in functions that have
opcodes and then wondering why the bytecode behavior differs from the
interpreted.

The answer is: don't do that, use add-advice instead.

So I'm closing this bug report.





  reply	other threads:[~2023-09-10 19:26 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 [this message]
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=CADwFkmnxjnfZHpSR44TmrVJzPwM9rfCdCY3hKHOgCPdGAVU0Rw@mail.gmail.com \
    --to=stefankangas@gmail.com \
    --cc=59793@debbugs.gnu.org \
    --cc=akib@disroot.org \
    --cc=eliz@gnu.org \
    --cc=miha@kamnitnik.top \
    --cc=tumashu@163.com \
    /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.