unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25145: 25.1; clipboard-yank and associated functions are broken
@ 2016-12-09  8:43 Stephane Chauveau
  2016-12-09 13:10 ` Eli Zaretskii
  2016-12-11  2:14 ` Glenn Morris
  0 siblings, 2 replies; 4+ messages in thread
From: Stephane Chauveau @ 2016-12-09  8:43 UTC (permalink / raw)
  To: 25145


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))






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#25145: 25.1; clipboard-yank and associated functions are broken
  2016-12-09  8:43 bug#25145: 25.1; clipboard-yank and associated functions are broken Stephane Chauveau
@ 2016-12-09 13:10 ` Eli Zaretskii
  2016-12-09 13:53   ` Stephane Chauveau
  2016-12-11  2:14 ` Glenn Morris
  1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2016-12-09 13:10 UTC (permalink / raw)
  To: Stephane Chauveau; +Cc: 25145

> From: Stephane Chauveau <schauveau@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#25145: 25.1; clipboard-yank and associated functions are broken
  2016-12-09 13:10 ` Eli Zaretskii
@ 2016-12-09 13:53   ` Stephane Chauveau
  0 siblings, 0 replies; 4+ messages in thread
From: Stephane Chauveau @ 2016-12-09 13:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25145



On 12/09/2016 02:10 PM, Eli Zaretskii wrote:
>> From: Stephane Chauveau <schauveau@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








^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#25145: 25.1; clipboard-yank and associated functions are broken
  2016-12-09  8:43 bug#25145: 25.1; clipboard-yank and associated functions are broken Stephane Chauveau
  2016-12-09 13:10 ` Eli Zaretskii
@ 2016-12-11  2:14 ` Glenn Morris
  1 sibling, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2016-12-11  2:14 UTC (permalink / raw)
  To: 25145-done

Version: 25.2

Thanks; fixed in 442e2f6.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-11  2:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-09  8:43 bug#25145: 25.1; clipboard-yank and associated functions are broken Stephane Chauveau
2016-12-09 13:10 ` Eli Zaretskii
2016-12-09 13:53   ` Stephane Chauveau
2016-12-11  2:14 ` Glenn Morris

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).