From: Stephane Chauveau <schauveau@nvidia.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 25145@debbugs.gnu.org
Subject: bug#25145: 25.1; clipboard-yank and associated functions are broken
Date: Fri, 9 Dec 2016 14:53:49 +0100 [thread overview]
Message-ID: <584AB76D.2080304@nvidia.com> (raw)
In-Reply-To: <83pol1gsdm.fsf@gnu.org>
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
next prev parent reply other threads:[~2016-12-09 13:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-12-11 2:14 ` Glenn Morris
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=584AB76D.2080304@nvidia.com \
--to=schauveau@nvidia.com \
--cc=25145@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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).