[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recent change to yanking behavior of the clipboard
From: |
Po Lu |
Subject: |
Re: recent change to yanking behavior of the clipboard |
Date: |
Mon, 07 Feb 2022 11:48:45 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
>> Then, when you press C-y, Emacs is supposed to look for the value in
>> CLIPBOARD (and never PRIMARY).
>>
>> That means the only valid combination is the default, which is to have
>> `select-enable-clipboard' set to t and `select-enable-primary' set to
>> nil.
> Again, I don't understand what you mean.
>
> I have `select-enable-clipboard' set to nil and
> `select-enable-primary' and set to t, and that's a valid combination
> -- it does what I want to, and has done so for at least a decade.
On X, every program is supposed to follow this:
https://specifications.freedesktop.org/clipboards-spec/clipboards-spec.txt
In short:
1. selecting but with no explicit copy should only set PRIMARY,
never CLIPBOARD
2. middle mouse button should paste PRIMARY, never CLIPBOARD
3. explicit cut/copy commands (i.e. menu items, toolbar buttons) should
always set CLIPBOARD to the currently-selected data (i.e.
conceptually copy PRIMARY to CLIPBOARD)
4. explicit cut/copy commands should always set both CLIPBOARD and
PRIMARY, even when copying doesn't involve a selection (e.g. a "copy
url" -option which explicitly copies an url without the url being
selected first)
5. explicit paste commands should paste CLIPBOARD, not PRIMARY
6. a selection becoming unselected should never unset PRIMARY
7. possibly contradicting the ICCCM, clients don't need to support
SECONDARY, though if anyone can figure out what it's good for they
should feel free to use it for that
8. cut buffers are evil; they only support ASCII, they don't work with
many clients, and they require data to be copied to the X
server. Therefore clients should avoid using cut buffers and use
only selections.
Setting `select-enable-clipboard' to nil violates 3, 4, and 5, while
setting `select-enable-primary' to t violates 5 and 4.
Thanks.
Re: recent change to yanking behavior of the clipboard, Lars Ingebrigtsen, 2022/02/06
- Re: recent change to yanking behavior of the clipboard, Po Lu, 2022/02/06
- Re: recent change to yanking behavior of the clipboard, Lars Ingebrigtsen, 2022/02/06
- Re: recent change to yanking behavior of the clipboard, Po Lu, 2022/02/06
- Re: recent change to yanking behavior of the clipboard, Lars Ingebrigtsen, 2022/02/06
- Re: recent change to yanking behavior of the clipboard,
Po Lu <=
- Re: recent change to yanking behavior of the clipboard, Lars Ingebrigtsen, 2022/02/06
- Re: recent change to yanking behavior of the clipboard, Po Lu, 2022/02/06
- Re: recent change to yanking behavior of the clipboard, Corwin Brust, 2022/02/06
- Re: recent change to yanking behavior of the clipboard, Po Lu, 2022/02/07
- Re: recent change to yanking behavior of the clipboard, Corwin Brust, 2022/02/07
- Re: recent change to yanking behavior of the clipboard, tomas, 2022/02/07
- Re: recent change to yanking behavior of the clipboard, Po Lu, 2022/02/07
- Re: recent change to yanking behavior of the clipboard, tomas, 2022/02/07
Re: recent change to yanking behavior of the clipboard, Eli Zaretskii, 2022/02/07
Re: recent change to yanking behavior of the clipboard, Po Lu, 2022/02/07