[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copy variable to system clipboard (as simpleclip)
From: |
Tim Johnson |
Subject: |
Re: Copy variable to system clipboard (as simpleclip) |
Date: |
Tue, 8 Aug 2017 15:49:17 -0800 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
* Emanuel Berg <moasen@zoho.com> [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