From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: Copy variable to system clipboard (as simpleclip) Date: Mon, 7 Aug 2017 17:15:07 -0800 Organization: AkWebsoft Message-ID: <20170808011507.GC3447@mail.akwebsoft.com> References: <20170807231147.GA3447@mail.akwebsoft.com> <864ltiuctg.fsf@zoho.com> <20170808005821.GB3447@mail.akwebsoft.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1502154975 29639 195.159.176.226 (8 Aug 2017 01:16:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Aug 2017 01:16:15 +0000 (UTC) User-Agent: Mutt/1.7.0 (2016-08-17) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 08 03:15:57 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1det7j-0006rp-GI for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Aug 2017 03:15:55 +0200 Original-Received: from localhost ([::1]:40307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1det7p-0004Ui-La for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Aug 2017 21:16:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1det7M-0004Ti-5K for help-gnu-emacs@gnu.org; Mon, 07 Aug 2017 21:15:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1det7G-0002Sg-Ql for help-gnu-emacs@gnu.org; Mon, 07 Aug 2017 21:15:32 -0400 Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:35444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1det7G-0002Py-I9 for help-gnu-emacs@gnu.org; Mon, 07 Aug 2017 21:15:26 -0400 Original-Received: by linus.johnson.com (Postfix, from userid 1000) id 89716200674; Mon, 7 Aug 2017 17:15:07 -0800 (AKDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <20170808005821.GB3447@mail.akwebsoft.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.4.232.191 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:113954 Archived-At: * Tim Johnson [170807 17:01]: > * Emanuel Berg [170807 16:36]: > > Tim Johnson wrote: > > > > > I use simpleclip routinely so that I can copy > > > and paste from the system clipboard without > > > affecting the emacs kill ring. However, > > > I could use a function that would copy any > > > string variable (such as output from > > > buffer-file-name) to the system clipboard. > > > > > > Is such function available? > > > > Yes, use xsel(1x) as I did here - one of the > > first things I wrote in Elisp by the way - > > could probably benefit from an upgrade, but > > hey, if it ain't broke, fix it, to make sure > > it is! > > > > http://user.it.uu.se/~embe8573/emacs-init/xsel.el > > Thanks Emanuel. I just installed xsel and will play with your code > later (or tomorrow). Update: Seems to work. I owe you a beer. :) -- Tim http://www.akwebsoft.com, http://www.tj49.com