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 16:58:21 -0800 Organization: AkWebsoft Message-ID: <20170808005821.GB3447@mail.akwebsoft.com> References: <20170807231147.GA3447@mail.akwebsoft.com> <864ltiuctg.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1502153973 7693 195.159.176.226 (8 Aug 2017 00:59:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Aug 2017 00:59:33 +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 02:59:15 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 1desrb-0001A0-6n for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Aug 2017 02:59:15 +0200 Original-Received: from localhost ([::1]:40238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1desrh-0007bp-4P for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Aug 2017 20:59:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1desr4-0007b2-Sa for help-gnu-emacs@gnu.org; Mon, 07 Aug 2017 20:58:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1desqz-0008RB-U4 for help-gnu-emacs@gnu.org; Mon, 07 Aug 2017 20:58:42 -0400 Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:35391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1desqz-0008Qa-Lk for help-gnu-emacs@gnu.org; Mon, 07 Aug 2017 20:58:37 -0400 Original-Received: by linus.johnson.com (Postfix, from userid 1000) id 2F88F200674; Mon, 7 Aug 2017 16:58:21 -0800 (AKDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <864ltiuctg.fsf@zoho.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:113953 Archived-At: * 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). cheers -- Tim http://www.akwebsoft.com, http://www.tj49.com