emacs-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Change (gui-get-selection) to default to UTF8_STRING


From: Eli Zaretskii
Subject: Re: [RFC] Change (gui-get-selection) to default to UTF8_STRING
Date: Thu, 20 Mar 2025 09:38:46 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: Konstantin Kharlamov <Hi-Angel@yandex.ru>,  manikulin@gmail.com,
>   tsdh@gnu.org,  emacs-devel@gnu.org
> Date: Thu, 20 Mar 2025 09:15:07 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Po Lu, do you agree that if a Lisp program doesn't know exactly what
> > kind of selection types to expect, it should use 'TARGETS and then
> > choose the most appropriate type from the list that returns?
> >
> > If Po Lu agrees, we could come up with doc string (or manual?) text to
> > that effect, and also mention gui-get-primary-selection there for a
> > good measure.
> 
> That's one option, but it would imply a minimum of two selection
> requests in the common case (where UTF8_STRING is available), so I
> suggest at least attempting UTF8_STRING first before consulting TARGETS.
> Selection requests are noticeably expensive over WAN connections, and
> this latency accumulates.

UTF8_STRING is only relevant to X, no?  If so, doing that will need
window-system specific conditions.  Is that better than two selection
requests, and if so, in what cases is it significantly better?

The big advantage of using TARGETS in my eyes is that it allows to
make the Lisp program completely agnostic to the underlying platform
and window-system.



reply via email to

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