GNU bug report logs - #25145
25.1; clipboard-yank and associated functions are broken

Previous Next

Package: emacs;

Reported by: Stephane Chauveau <schauveau <at> nvidia.com>

Date: Fri, 9 Dec 2016 09:17:01 UTC

Severity: normal

Found in version 25.1

Fixed in version 25.2

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25145 in the body.
You can then email your comments to 25145 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25145; Package emacs. (Fri, 09 Dec 2016 09:17:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephane Chauveau <schauveau <at> nvidia.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 09 Dec 2016 09:17:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephane Chauveau <schauveau <at> nvidia.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 25.1; clipboard-yank and associated functions are broken
Date: Fri, 9 Dec 2016 09:43:09 +0100
I noticed that the functions clipboard-yank, clipboard-kill-ring-save
and clipboard-kill-region are not accessing the gui clipboard as they
use to.

In previous version those 3 functions were setting
x-select-enable-clipbard to enable the clipboard.

They are now setting gui-select-enable-clipboard.

The problem is likely related to the recent renaming of
x-select-enable-clibboard into select-enable-clipboard (so without a
gui- prefix).

The variable gui-select-enable-clipboard is set in a few other places
but, as far as I can tell, it is never used for anything.


In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu)
 of 2016-11-18 built on vogt
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description:    Linux Mint 17.1 Rebecca

Configured using:
 'configure --prefix=/home/schauveau/opt/emacs-25.1 --with-x-toolkit=no
 --with-xpm=no --with-gif=no'

Configured features:
JPEG TIFF PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS LIBXML2 ZLIB X11

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  show-paren-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Type C-x 1 to delete the help window.
uncompressing menu-bar.el.gz...done
Mark set
M-s C-g is undefined
Quit
Making completion list...

You can run the command ‘describe-variable’ with C-h v
uncompressing select.el.gz...done
Making completion list... [2 times]

Load-path shadows:
~/usr/share/emacs/xt-mouse hides 
/home/schauveau/opt/emacs-25.1/share/emacs/25.1/lisp/xt-mouse

Features:
(shadow sort mail-extr emacsbug message dired rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils pp jka-compr
windmove eieio-opt speedbar sb-image ezimage dframe find-func thingatpt
compile edmacro kmacro ido paren time tramp tramp-compat auth-source
cl-seq eieio eieio-core cl-macs gnus-util mm-util help-fns mail-prsvr
password-cache tramp-loaddefs trampver ucs-normalize shell pcomplete
comint ansi-color ring format-spec advice finder-inf info
chess-autoloads etags-select-autoloads xpm-autoloads package seq
byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv
cl-loaddefs pcase cl-lib epa-file epa derived epg epg-config disaster
generic generic-x time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify
dynamic-setting x multi-tty make-network-process emacs)

Memory information:
((conses 16 297179 14932)
 (symbols 48 28063 0)
 (miscs 40 107 370)
 (strings 32 48837 8668)
 (string-bytes 1 1295984)
 (vectors 16 43908)
 (vector-slots 8 786143 6898)
 (floats 8 265 274)
 (intervals 56 511 12)
 (buffers 976 23)
 (heap 1024 49084 1269))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25145; Package emacs. (Fri, 09 Dec 2016 13:11:01 GMT) Full text and rfc822 format available.

Message #8 received at 25145 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephane Chauveau <schauveau <at> nvidia.com>
Cc: 25145 <at> debbugs.gnu.org
Subject: Re: bug#25145: 25.1;
 clipboard-yank and associated functions are broken
Date: Fri, 09 Dec 2016 15:10:45 +0200
> From: Stephane Chauveau <schauveau <at> nvidia.com>
> Date: Fri, 9 Dec 2016 09:43:09 +0100
> 
> 
> I noticed that the functions clipboard-yank, clipboard-kill-ring-save
> and clipboard-kill-region are not accessing the gui clipboard as they
> use to.
> 
> In previous version those 3 functions were setting
> x-select-enable-clipbard to enable the clipboard.
> 
> They are now setting gui-select-enable-clipboard.
> 
> The problem is likely related to the recent renaming of
> x-select-enable-clibboard into select-enable-clipboard (so without a
> gui- prefix).
> 
> The variable gui-select-enable-clipboard is set in a few other places
> but, as far as I can tell, it is never used for anything.

Thank you for your report.  However, I don't think I understand what
is it that doesn't work in Emacs 25.1 as you expect.  What you
describe are simply indications of some redesign and reimplementation
in this area, but the functionality definitely works for me.

Could you perhaps give a recipe, starting from "emacs -Q", which
reproduces the problems you are seeing, and describe the expected
behavior and the actual one?  That would allow us to analyze the
problems you see.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25145; Package emacs. (Fri, 09 Dec 2016 16:32:02 GMT) Full text and rfc822 format available.

Message #11 received at 25145 <at> debbugs.gnu.org (full text, mbox):

From: Stephane Chauveau <schauveau <at> nvidia.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25145 <at> debbugs.gnu.org
Subject: Re: bug#25145: 25.1; clipboard-yank and associated functions are
 broken
Date: Fri, 9 Dec 2016 14:53:49 +0100

On 12/09/2016 02:10 PM, Eli Zaretskii wrote:
>> From: Stephane Chauveau <schauveau <at> nvidia.com>
>> Date: Fri, 9 Dec 2016 09:43:09 +0100
>>
>>
>> I noticed that the functions clipboard-yank, clipboard-kill-ring-save
>> and clipboard-kill-region are not accessing the gui clipboard as they
>> use to.
>>
>> In previous version those 3 functions were setting
>> x-select-enable-clipbard to enable the clipboard.
>>
>> They are now setting gui-select-enable-clipboard.
>>
>> The problem is likely related to the recent renaming of
>> x-select-enable-clibboard into select-enable-clipboard (so without a
>> gui- prefix).
>>
>> The variable gui-select-enable-clipboard is set in a few other places
>> but, as far as I can tell, it is never used for anything.
> Thank you for your report.  However, I don't think I understand what
> is it that doesn't work in Emacs 25.1 as you expect.  What you
> describe are simply indications of some redesign and reimplementation
> in this area, but the functionality definitely works for me.
>
> Could you perhaps give a recipe, starting from "emacs -Q", which
> reproduces the problems you are seeing, and describe the expected
> behavior and the actual one?  That would allow us to analyze the
> problems you see.

Here is the recipe.

This involved CLIPBOARD and PRIMARY buffer so on Linux X11

(1) Fill the CLIPBOARD and PRIMARY buffers with their respective name.
I use xsel but any other method should do

echo -n CLIPBOARD | xsel -b
echo -n PRIMARY | xsel -p

(2) Using emacs 24.3.1

emacs24 -Q --eval "(progn (setq x-select-enable-clipboard nil) (setq 
x-select-enable-primary nil)  (yank) )"

==> empty window as expected since PRIMARY and CLIPBOARD are both disabled

emacs24 -Q --eval "(progn (setq x-select-enable-clipboard nil) (setq 
x-select-enable-primary nil)  (clipboard-yank) )"

==> the content of CLIPBOARD is added to the scratch buffer

(3) The same commands using emacs 25.1.1 will always produce  an empty 
window.



As I tried to explain in my first email, the problem is that 
(clipboard-yank) is attempting to enable the clipboard by setting the 
variable gui-select-enable-clipboard:

(defun clipboard-yank ()
  "Insert the clipboard contents, or the last stretch of killed text."
  (interactive "*")
  (let ((gui-select-enable-clipboard t))
    (yank)))

However, this variable does not control the clipboard.
The proper variable name is select-enable-clipboard  or 
x-select-enable-clipboard







Added indication that bug 25145 blocks21966 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 09 Dec 2016 20:41:04 GMT) Full text and rfc822 format available.

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sun, 11 Dec 2016 02:15:02 GMT) Full text and rfc822 format available.

Notification sent to Stephane Chauveau <schauveau <at> nvidia.com>:
bug acknowledged by developer. (Sun, 11 Dec 2016 02:15:02 GMT) Full text and rfc822 format available.

Message #18 received at 25145-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 25145-done <at> debbugs.gnu.org
Subject: Re: bug#25145: 25.1;
 clipboard-yank and associated functions are broken
Date: Sat, 10 Dec 2016 21:14:04 -0500
Version: 25.2

Thanks; fixed in 442e2f6.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 08 Jan 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.