From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Improving X selection? Date: Mon, 15 Oct 2007 08:19:41 +0200 Message-ID: <4713067D.2060504@swipnet.se> References: <20071012105022.6c8b174a@tweety> <874pgtfw1y.fsf@jbms.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1192429247 26111 80.91.229.12 (15 Oct 2007 06:20:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2007 06:20:47 +0000 (UTC) Cc: Tom Horsley , rms@gnu.org, emacs-devel@gnu.org To: Jeremy Maitin-Shepard Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 15 08:20:37 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IhJJc-0007KA-0m for ged-emacs-devel@m.gmane.org; Mon, 15 Oct 2007 08:20:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IhJJV-0002ii-2A for ged-emacs-devel@m.gmane.org; Mon, 15 Oct 2007 02:20:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IhJJS-0002iV-6L for emacs-devel@gnu.org; Mon, 15 Oct 2007 02:20:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IhJJQ-0002iF-P9 for emacs-devel@gnu.org; Mon, 15 Oct 2007 02:20:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IhJJQ-0002i6-Lb for emacs-devel@gnu.org; Mon, 15 Oct 2007 02:20:24 -0400 Original-Received: from av12-1-sn2.hy.skanova.net ([81.228.8.185]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IhJJN-0004KP-9E; Mon, 15 Oct 2007 02:20:21 -0400 Original-Received: by av12-1-sn2.hy.skanova.net (Postfix, from userid 502) id ADE6537EDB; Mon, 15 Oct 2007 08:20:19 +0200 (CEST) Original-Received: from smtp4-2-sn2.hy.skanova.net (smtp4-2-sn2.hy.skanova.net [81.228.8.93]) by av12-1-sn2.hy.skanova.net (Postfix) with ESMTP id 91DE237EA1; Mon, 15 Oct 2007 08:20:19 +0200 (CEST) Original-Received: from husetbladh.homeip.net (90-231-102-24-no59.tbcn.telia.com [90.231.102.24]) by smtp4-2-sn2.hy.skanova.net (Postfix) with ESMTP id 1ABE137E49; Mon, 15 Oct 2007 08:20:19 +0200 (CEST) User-Agent: Thunderbird 2.0.0.6 (X11/20070728) In-Reply-To: <874pgtfw1y.fsf@jbms.ath.cx> X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80897 Archived-At: Jeremy Maitin-Shepard skrev: > Richard Stallman 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.