emacs-devel
[Top][All Lists]
Advanced

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

Re: Improving X selection?


From: Jeremy Maitin-Shepard
Subject: Re: Improving X selection?
Date: Sun, 14 Oct 2007 13:25:13 -0400
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.990 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     My question is this: If I were to change the possible return
>     values for the interprogram-paste-function so that it is
>     allowed to return a list of strings, and I modified all the
>     callers so they could expect a list of strings, and I made the
>     whole list get pushed on the kill ring, would such a change
>     likely be accepted?

> Sure.  That can't do any harm.

> It might also be good to install the rest of your change, rewritten to
> use that hook:

>     Anyone who attempts to interact with a mix of older (xterm for
>     instance) and newer (gtk apps) with emacs while doing cut &
>     paste operations has undoubtedly noticed the persistent problem
>     of never winding up with the selection you actually want (now
>     that we have some folks using CLIPBOARD and others using
>     PRIMARY). Yes, you can set x-select-enable-clipboard, but all
>     that does is invert the set of incorrect text you get back.

>     I have just implemented a quick hack (definitely not suitable
>     for prime time) to the x-cut-buffer-or-selection-value
>     function. This hack observes when there is more than one "new"
>     selection and goes ahead and pushes the new ones it isn't
>     planning to return to the caller onto the kill ring.

> But more people would have to study and try it
> before we could decide on that.

What we really want is to always paste the most recently set selection,
be it PRIMARY, SECONDARY or CLIPBOARD.  I realize this is a problem that
actually affects all programs, not just Emacs, but perhaps we can find a
solution (and then perhaps other programs can make use of the technique
as well).

Maybe the only solution is to patch all other programs to always just
set all of them, since it seems that these days no one wants to specify
a particular selection.  Since X does not let you determine how "recent"
the selection is, it may be that the only other possibility would be to
use a clipboard manager program.  The problem with that, though, is that
it would not be able to support all types of selection content.

-- 
Jeremy Maitin-Shepard




reply via email to

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