From: Tim Cross <theophilusx@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: recent change to yanking behavior of the clipboard
Date: Mon, 07 Feb 2022 12:11:36 +1100 [thread overview]
Message-ID: <87pmnz4geo.fsf@gmail.com> (raw)
In-Reply-To: <87o83kphri.fsf@yahoo.com>
Po Lu <luangruo@yahoo.com> writes:
> Noah Friedman <noah@splode.com> writes:
>
>> This change in master:
>>
>> 2022-02-01 10:13:15 +0800 Po Lu <luangruo@yahoo.com> 99c637499e
>>
>> Only apply last change to the clipboard
>>
>> * lisp/select.el (gui--selection-value-internal): Only return
>> nil if we own the clipboard.
>>
>> Means that yanking never pastes the clipboard if I've programmatically set
>> the clipboard selection (which I do for both emacs and the sake of other
>> program windows that use it)
>
> If you assert ownership of CLIPBOARD from another program, then
> `gui-selection-value' (which is the interprogram-paste-function) will
> not return nil. If not, that program is buggy and should be fixed.
>
> Unless you are setting the clipboard inside Emacs via `x-set-selection',
> in which case see below:
>
>> But, curiously, you didn't make this change for the primary selection.
>
> Because, typically, Emacs does not keep a local ring for text stored
> into the primary selection. `select-enable-primary' is a violation of
> the XDG clipboard spec, and is unlikely to be used by many people, so I
> didn't enable that code there.
>
>> That means when I yank, I don't get the thing I've most recently copied to
>> the clipboard. I get some old thing from the primary selection.
>>
>> I don't understand how this new behavior is meant to be useful.
>
> It is meant to be useful by providing a visible performance improvement
> when Emacs is run over a network with moderate latency, by not querying
> the X server for the value of CLIPBOARD when text was last killed inside
> Emacs. And yes, that is what motivated me to install that change.
>
Just a question. What about Wayland? I ask this because recently there
was a post on the orgmode list where someone was getting inconsistent
behaviour between Emacs, emacsclient and other applications running the
pgtk version of Emacs under Wayland.
Given that Fedora has moved to defaulting to Wayland, Debian is
beginning to support Wayland and Ubuntu are moving in that direction,
combined with Emacs supporting a pure GTK implementation which (I
assume) means you could run Wayland without the legacy X integration,
should any refactoring of Emacs interaction with the clipboard also be
factoring in Wayland as another 'platform'?
Tim
P.S. Do many people still run Emacs remotely over X? I did this for a
long time (until things became very slow with font-locking). These days,
I find things like X2Go have become so good, I just use that and avoid
the performance hit of remote X and all that xauth merging etc.
next prev parent reply other threads:[~2022-02-07 1:11 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
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 ` Tim Cross [this message]
2022-02-07 2:31 ` recent change to yanking behavior of the clipboard 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
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=87pmnz4geo.fsf@gmail.com \
--to=theophilusx@gmail.com \
--cc=emacs-devel@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).