unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Akib Azmain Turja via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Feng Shu <tumashu@163.com>, 59793@debbugs.gnu.org
Subject: bug#59793: 29.0.60; subr.elc is not compiled correctly
Date: Sat, 03 Dec 2022 23:48:50 +0600	[thread overview]
Message-ID: <87tu2cped9.fsf@disroot.org> (raw)
In-Reply-To: <0D6CA055-C9DD-425D-9D0B-03B555227E72@gnu.org> (Eli Zaretskii's message of "Sat, 03 Dec 2022 17:37:31 +0200")

[-- Attachment #1: Type: text/plain, Size: 2249 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

> On December 3, 2022 5:10:52 PM GMT+02:00, Akib Azmain Turja <akib@disroot.org> wrote:
>> 
>> 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.
>
> 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.

>
> And what do you mean by ATTACHED/SUBR.ELC?  I don't see any attachments to your message.
>

I mean, the subr.elc attached in the original file.  I'm also attaching
the subr.elc I got from Feng Shu on Codeberg.

> So I'm still confused...

Is it clear now?  (Somehow, I think, no.)

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

  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=87tu2cped9.fsf@disroot.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=59793@debbugs.gnu.org \
    --cc=akib@disroot.org \
    --cc=eliz@gnu.org \
    --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 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).