From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help Subject: Re: Need help with emacs clipboard. Date: Tue, 13 Jan 2015 21:46:51 -0700 Message-ID: <20150113212722522787447@bob.proulx.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1421210833 10785 80.91.229.3 (14 Jan 2015 04:47:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2015 04:47:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: cplum984@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 14 05:47:07 2015 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 1YBFrH-0000PO-D6 for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jan 2015 05:47:07 +0100 Original-Received: from localhost ([::1]:42655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBFrG-0007l8-GI for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jan 2015 23:47:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBFr5-0007l0-P8 for help-gnu-emacs@gnu.org; Tue, 13 Jan 2015 23:46:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBFr2-00018w-IS for help-gnu-emacs@gnu.org; Tue, 13 Jan 2015 23:46:55 -0500 Original-Received: from joseki.proulx.com ([216.17.153.58]:54379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBFr2-00018s-A4 for help-gnu-emacs@gnu.org; Tue, 13 Jan 2015 23:46:52 -0500 Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 767802186F; Tue, 13 Jan 2015 21:46:51 -0700 (MST) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id 38C092DC42; Tue, 13 Jan 2015 21:46:51 -0700 (MST) Mail-Followup-To: cplum984@gmail.com, help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 216.17.153.58 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:102063 Archived-At: cplum984@gmail.com wrote: > I've switched from xemacs to emacs, and I'm trying to get > undo/cut/copy/paste all working again. I assume you are using emacs with a graphical interface? Such as the GTK or Lucid libraries? > ... Also, the clipboard is properly imported and exported with > other X apps. ... > ... Still no import or export of the clipboards. I see exactly the opposite behavior. Emacs by default uses the clipboard for cut-and-paste. But on my system nothing else uses the clipboard as Firefox and Chromium both use the X primary selection. Therefore to make Emacs compatible with Firefox and Chromium I need to configure emacs to use the primary selection (as it used to do) too. In the Emacs NEWS (seen with C-h n) find this: * Editing Changes in Emacs 24.1 ... ** Selection changes. The default handling of clipboard and primary selections has been changed to conform with modern X applications. In short, most commands for killing and yanking text now use the clipboard, while mouse commands use the primary selection. So I am surprised that you need to configure emacs to use the clipboard since that is now the default. Try running emacs with: emacs -Q emacs -q Then check the behavior again. That will avoid running any of your personal configuration (-q) and the local system config (-Q) and if those work then you know some personal configuration is affecting this. > The only way I seem to be able to import the clipboard is if I first > paste into an xemacs buffer, and then use the xemacs Copy menu item > (not f4, which won't work), and then switch to emacs and use the > emacs Paste menu item (not f4 or C-v, which won't work). f4 and C-v > work after using the Paste menu item however. For exporting the > clipboard from emacs, I'm forced to paste into a clipboard file that > I save and open from xemacs so I can then copy the contents to the > clipboard. Are you familiar with the "xclip" command? It is a useful utility for working with cut and paste. Works with either the primary selection or the clipboard. xclip -selection clipboard -o # paste from clipboard xclip -selection primary -o # paste from primary selection If nothing else it will allow you to verify what is where. > So this is getting very frustrating since I interact with emacs > sessions using the clipboard a lot, and the above workaround just > isn't going to cut it. There's got to be a better solution. I'm > hoping someone here can help. This won't help you because you want the opposite but just to post my example this is what I do to configure emacs to be usable on the X desktop using the primary selection. (setq transient-mark-mode nil) (setq select-active-regions nil) ; default is nil in 23, t in 24 (setq mouse-drag-copy-region t) ; default is t in 23, nil in 24 (setq x-select-enable-primary t) ; default is nil in 23, t in 24 (setq x-select-enable-clipboard nil) ; default is nil in 23, t in 24 (setq x-select-enable-clipboard-manager nil) ; new in 24, default is t Bob