all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Noah Friedman <noah@splode.com>,  emacs-devel@gnu.org
Subject: Re: recent change to yanking behavior of the clipboard
Date: Mon, 07 Feb 2022 11:48:45 +0800	[thread overview]
Message-ID: <87a6f3jq02.fsf@yahoo.com> (raw)
In-Reply-To: <87h79bz6kb.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 07 Feb 2022 04:41:56 +0100")

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.



  reply	other threads:[~2022-02-07  3:48 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-06  3:39 recent change to yanking behavior of the clipboard Noah Friedman
2022-02-06  7:37 ` Po Lu
2022-02-06  9:20   ` Eli Zaretskii
2022-02-06  9:34     ` Po Lu
2022-02-06 10:18   ` Po Lu
2022-02-06 16:09   ` Óscar Fuentes
2022-02-07  1:11     ` Po Lu
2022-02-07  2:05       ` Óscar Fuentes
2022-02-07  2:59         ` Po Lu
2022-02-07  5:04           ` Óscar Fuentes
2022-02-07  5:17             ` Yuri Khan
2022-02-07  5:23               ` Óscar Fuentes
2022-02-07  5:31             ` Po Lu
2022-02-06 22:39   ` Lars Ingebrigtsen
2022-02-07  1:12     ` Po Lu
2022-02-07  2:53       ` Lars Ingebrigtsen
2022-02-07  3:11         ` Po Lu
2022-02-07  3:41           ` Lars Ingebrigtsen
2022-02-07  3:48             ` Po Lu [this message]
2022-02-07  4:05               ` Lars Ingebrigtsen
2022-02-07  4:44                 ` Po Lu
2022-02-07  4:57                   ` Corwin Brust
2022-02-07  5:29                     ` Po Lu
2022-02-07  5:47                       ` Corwin Brust
2022-02-07  5:52                       ` tomas
2022-02-07  6:43                         ` Po Lu
2022-02-07  6:57                           ` tomas
2022-02-07 13:17                       ` Eli Zaretskii
2022-02-07 13:18                         ` Po Lu
2022-02-07 12:49               ` Eli Zaretskii
2022-02-07 12:56                 ` Po Lu
2022-02-07 13:14               ` Stefan Monnier
2022-02-07 13:17                 ` Po Lu
2022-02-07 13:50                   ` Don't change `select-enable-primary` (was: recent change to yanking behavior of the clipboard) Stefan Monnier
2022-02-07 13:55                     ` Don't change `select-enable-primary` Po Lu
2022-02-07  1:11   ` recent change to yanking behavior of the clipboard Tim Cross
2022-02-07  2:31     ` Michael Welsh Duggan
2022-02-06  9:17 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2022-02-06 11:07 xenodasein--- via Emacs development discussions.
2022-02-06 11:21 ` Po Lu
2022-02-06 11:37   ` xenodasein--- via Emacs development discussions.
2022-02-06 11:47     ` Po Lu
2022-02-06 11:55       ` xenodasein--- via Emacs development discussions.
2022-02-06 12:01         ` Po Lu
2022-02-06 12:06           ` xenodasein--- via Emacs development discussions.
2022-02-06 12:08         ` Eli Zaretskii
2022-02-06 12:15           ` xenodasein--- via Emacs development discussions.
2022-02-06 12:30             ` Eli Zaretskii
2022-02-06 12:15         ` tomas
2022-02-06 12:20           ` xenodasein--- via Emacs development discussions.
2022-02-06 15:20   ` Stefan Monnier
2022-02-07  1:18     ` Po Lu
2022-02-07 13:04       ` Stefan Monnier
2022-02-07 13:15         ` Po Lu
2022-02-07 19:47           ` James Cloos
2022-02-07 19:53             ` tomas
2022-02-06 15:17 ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6f3jq02.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=noah@splode.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.