GNU bug report logs -
#31209
27.0.50; current-kill calls interprogram-paste-function more than once
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Wed, 18 Apr 2018 17:48:01 UTC
Severity: normal
Tags: fixed, patch
Found in version 27.0.50
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Under lexical-binding, I expect the following:
(let* ((i 0)
(kill-ring ())
(kill-ring-yank-pointer ())
(save-interprogram-paste-before-kill t)
(interprogram-paste-function
(lambda ()
(setq i (1+ i))
(list "a" "b" "c"))))
(current-kill 0)
(message "\
`interprogram-paste-function' called %d time(s)
`kill-ring' = %s"
i kill-ring))
to evaluate to:
‘interprogram-paste-function’ called 1 time(s)
‘kill-ring’ = (a b c)
but the actual result is:
‘interprogram-paste-function’ called 4 time(s)
‘kill-ring’ = (a a b c b a b c c a b c)
This behaviour is due to current-kill passing each string returned by
interprogram-paste-function to kill-new, which in turn calls
interprogram-paste-function when save-interprogram-paste-before-kill is
non-nil, and was introduced along with
save-interprogram-paste-before-kill [1: 4ed8c7aadb].
[1: 4ed8c7aadb]: 2009-08-26 20:55:39 +0000
(save-interprogram-paste-before-kill): New user option.
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4ed8c7aadb59c8ae75641710e3d9ff5bddbbd952
Patch addressing this to follow.
Thanks,
--
Basil
In GNU Emacs 27.0.50 (build 6, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2018-04-18 built on thunk
Repository revision: 5dff4905d73d0d42447ff4b114d1af726a689c6a
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Debian GNU/Linux buster/sid
This bug report was last modified 7 years and 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.