From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: how to get subsequent text copies to emacs kill ring? Date: Thu, 16 May 2013 13:16:03 -0700 Message-ID: <2D114A341A214863AF76E9C5CC2D145B@us.oracle.com> References: <871u967myb.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1368735397 24208 80.91.229.3 (16 May 2013 20:16:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 May 2013 20:16:37 +0000 (UTC) Cc: 'help-gnu-emacs Help' To: "'Michael Heerdegen'" , "'Peter Dyballa'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 16 22:16:35 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ud4bL-0002IJ-5j for geh-help-gnu-emacs@m.gmane.org; Thu, 16 May 2013 22:16:35 +0200 Original-Received: from localhost ([::1]:45194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud4bK-0002Ub-Iy for geh-help-gnu-emacs@m.gmane.org; Thu, 16 May 2013 16:16:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud4b5-0002UQ-8r for help-gnu-emacs@gnu.org; Thu, 16 May 2013 16:16:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ud4au-0008Js-D6 for help-gnu-emacs@gnu.org; Thu, 16 May 2013 16:16:19 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:41575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud4au-0008Jo-61 for help-gnu-emacs@gnu.org; Thu, 16 May 2013 16:16:08 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r4GKG5kq008273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 May 2013 20:16:05 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4GKG5v8026059 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 16 May 2013 20:16:06 GMT Original-Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4GKG5Et029814; Thu, 16 May 2013 20:16:05 GMT Original-Received: from dradamslap1 (/130.35.178.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 16 May 2013 13:16:05 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <871u967myb.fsf@web.de> Thread-Index: Ac5SajiaiHLU+KhERFC7f/09YhLInQAAbL/A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90857 Archived-At: > > > Is it possible??? > > > > No. GNU Emacs fills its kill-ring with snippets from within. Firefox > > and X11 have their own cut&paste boards. Both are not > > synchronised. Maybe xclipboard can be useful for you as an interim > > storage. > > Having something like that in Emacs indeed would be really useful. > > I think this is not trivial to implement. Emacs has access to the > primary selection, but doesn't notice if it changes. Any ideas? I have often wished that I could access more items from the Windows clipboard via the kill ring. (But see also #6 below, which is a stronger wish.) However: 1. Dunno whether recuperating the entire MS Windows clipboard (or another external clipboard) - all entries - is feasible or easily realized. (The Windows Systems clipboard holds only one entry, but the MS Office clipboard holds up to 24. So I guess I should say Office, not Windows, clipboard.) 2. Even if it can be easily realized, sometimes a user might want to pull in all of the external clipboard entries, and sometimes s?he might want to pull in only the latest entry. 3. A user option could express a user's general preference for adding to the kill ring either the whole external clipboard or just its latest entry. 4. But even with such a preference, a user might want to override the preference on the fly sometimes. For instance, although I am sometimes annoyed that I cannot get to more than one external clipboard entry from the kill ring, it is also the case that I would not _always_ want all of the external clipboard to be prepended to my kill ring. 5. Such overriding could maybe be implemented by adding the external clipboard entries to a separate Emacs list, which could be used together with the kill ring. IOW, add everything external to the separate list, but have `yank' etc. handle the items on that list according to the user setting (#3), by default. You would have to have a way to specify override behavior on the fly. A prefix key for `yank' already has another meaning, so that cannot be used to flip the preference behavior (unless we designate a specific prefix, such as plain `C-u C-u', for that). An "alternate-yank" key (different from `C-y') could be one way to get the opposite behavior to the one defined by the option. 6. To change the subject a bit, I find that what annoys me the most is not an inability to access multiple external clipboard items from Emacs, but an inability to access the latest external clipboard item after I have copied something else (from Emacs) onto the kill ring. IOW, if you want to yank the externally copied text then you must do so immediately. For example: a. I hit `C-c' in a Windows app, copying selected text to the Windows clipboard. b. In Emacs, I use `C-w' or `M-w' somewhere, adding some Emacs text to the kill ring. c. I want to be able to use `C-y M-y' to yank the Windows clipboard item. Too late. I don't have a good answer for this, but it does annoy me from time to time. Essentially, I have to remember to either (i) not copy or kill anything from Emacs to the kill ring after I've copied in Windows or (ii) yank the Windows copy immediately, then undo, then copy/kill text from Emacs etc., then later, e.g., `C-y M-y...' to yank the Windows copy.