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:
[...]
>> >> > You need to find a different way of overriding what insert-for-yank does.
>> >>
>> >> Why? And any suggestion how?
>> >
>> > The why is "because what you tried doesn't work." As to how, I'd need to
>> > know more about the problem you are trying to solve, and why you've selected
>> > such a strange way of solving it. Surely programming for Emacs doesn't
>> > require replacing the definitions of standard functions.
>>
>> I'm trying a make 'eat-yank' (a command in Eat package) to be as much
>> identical as to 'yank' as possible. That hack allows to avoid
>> overriding the whole 'yank' logic.
>
> You cannot rely on such kludges. The Emacs feature provided for doing stuff
> like this is add-function.
How about this:
(with-temp-buffer
(yank ARG)
(buffer-string))
I guess this is OK, right?
Or, A better idea would be:
(with-temp-buffer
(insert-for-yank (current-kill (cond
((listp ARG) 0)
((eq ARG '-) -2)
(t (1- ARG)))))
(buffer-string))
Right?
But how can I copy 'yank-transform-functions' hook to the temporary
buffer?
--
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.