[Top][All Lists]

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

Re: Improving X selection?

From: Jan Djärv
Subject: Re: Improving X selection?
Date: Mon, 15 Oct 2007 08:19:41 +0200
User-agent: Thunderbird (X11/20070728)

Jeremy Maitin-Shepard skrev:
Richard Stallman <address@hidden> writes:

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.

There is a model for this already. Selecting text with the mouse puts it in PRIMARY selection. Copying/cutting it with keys (C-c/C-x usually) or tool bar button (in the case of Emacs, tool bar button only) puts it in CLIPBOARD. Pasting by using the middle mouse button pastes the PRIMARY selection. Pasting with keys (C-y usually) or tool bar button pastes CLIPBOARD.

Gnome and presumable KDE as well conform to this.

AFAIK, Emacs conforms to this model. However, C-y and M-w does not. C-y pastes PRIMARY, and M-w puts text in PRIMARY. I guess this is historical.

The change, if any, I'd like is that C-y and M-w operates on CLIPBOARD, and that PRIMARY is left to mouse operations.

I am very opposed to any solution that drags in any selection I explicitly does not paste into Emacs. For example, if I want to paste CLIPBOARD, PRIMARY may be a very large selection. Over a slow link, getting PRIMARY also makes Emacs unresponsive for several seconds. But we have had this discussion before. I think that instead of trying to work around the problem by automatically fetching unwanted selections, we should make Emacs conform to a model that makes it very clear what selection Emacs pastes. AFAIK, this is already possible now (middle mouse PRIMARY, tool bar paste CLIPBOARD), but may need more user information.

        Jan D.

reply via email to

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