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: Tue, 8 Aug 2017 15:49:17 -0800 Organization: AkWebsoft Message-ID: <20170808234917.GA22742@mail.akwebsoft.com> References: <20170807231147.GA3447@mail.akwebsoft.com> <864ltiuctg.fsf@zoho.com> <20170808005821.GB3447@mail.akwebsoft.com> <20170808011507.GC3447@mail.akwebsoft.com> <86wp6erkwd.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 1502236234 13005 195.159.176.226 (8 Aug 2017 23:50:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Aug 2017 23:50:34 +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 Wed Aug 09 01:50:24 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 1dfEGR-0002YW-B3 for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Aug 2017 01:50:19 +0200 Original-Received: from localhost ([::1]:44946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfEGX-0005AE-HT for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Aug 2017 19:50:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfEG1-00059m-Hm for help-gnu-emacs@gnu.org; Tue, 08 Aug 2017 19:49:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfEFx-0000n2-Lu for help-gnu-emacs@gnu.org; Tue, 08 Aug 2017 19:49:53 -0400 Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:40860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfEFx-0000f6-Dj for help-gnu-emacs@gnu.org; Tue, 08 Aug 2017 19:49:49 -0400 Original-Received: by linus.johnson.com (Postfix, from userid 1000) id 3B03D2007C0; Tue, 8 Aug 2017 15:49:17 -0800 (AKDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <86wp6erkwd.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:113962 Archived-At: * Emanuel Berg [170808 10:22]: > Tim Johnson wrote: > > > Update: Seems to work. I owe you a beer. :) > > Owe me a beer? Have you never heard of free > software, with "free" as in free beer? > > Anyway I went thru the code today after all > these years, and found a couple of small things > to change: > > http://user.it.uu.se/~embe8573/emacs-init/xsel.el > > I also added this: > > (defun x-copy-symbol (sym) > "Copy the value of SYM to the X clipboard." > (interactive "S Symbol: ") > (let*((val (symbol-value sym)) > (str (format "%s" val)) ) > (set-X-clipboard-to-string str) )) > ;; Test: > ;; (progn (x-copy-symbol 'fill-column) (insert-X-clipboard)) > ;; (progn (call-interactively #'x-copy-symbol) (insert-X-clipboard)) > > Keep it up :) Thanks again! -- Tim http://www.akwebsoft.com, http://www.tj49.com