emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recent change to yanking behavior of the clipboard


From: Tim Cross
Subject: Re: recent change to yanking behavior of the clipboard
Date: Mon, 07 Feb 2022 12:11:36 +1100
User-agent: mu4e 1.7.7; emacs 28.0.91

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]