From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeremy Maitin-Shepard Newsgroups: gmane.emacs.devel Subject: Re: Improving X selection? Date: Sun, 14 Oct 2007 13:25:13 -0400 Message-ID: <874pgtfw1y.fsf@jbms.ath.cx> References: <20071012105022.6c8b174a@tweety> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1192382764 21914 80.91.229.12 (14 Oct 2007 17:26:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2007 17:26:04 +0000 (UTC) Cc: Tom Horsley , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 14 19:25:54 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 1Ih7Da-00020v-EA for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2007 19:25:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ih7DT-0006oK-FT for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2007 13:25:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ih7DQ-0006o3-6E for emacs-devel@gnu.org; Sun, 14 Oct 2007 13:25:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ih7DM-0006ni-Oo for emacs-devel@gnu.org; Sun, 14 Oct 2007 13:25:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ih7DM-0006nf-JX for emacs-devel@gnu.org; Sun, 14 Oct 2007 13:25:20 -0400 Original-Received: from smtp.andrew.cmu.edu ([128.2.10.83]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ih7DJ-0005NR-5I; Sun, 14 Oct 2007 13:25:17 -0400 Original-Received: from localhost (c-67-163-202-228.hsd1.pa.comcast.net [67.163.202.228]) (user=jmaitins mech=GSSAPI (0 bits)) by smtp.andrew.cmu.edu (8.13.8/8.13.8) with ESMTP id l9EHPDgh029058 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sun, 14 Oct 2007 13:25:13 -0400 In-Reply-To: (Richard Stallman's message of "Sun\, 14 Oct 2007 12\:29\:01 -0400") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.990 (gnu/linux) X-Habeas-SWE-9: mark in spam to . X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-1: winter into spring X-Scanned-By: MIMEDefang 2.60 on 128.2.10.83 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:80855 Archived-At: Richard Stallman 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