[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
clear-kill-ring function
From: |
Sharon Kimble |
Subject: |
clear-kill-ring function |
Date: |
Tue, 27 Oct 2015 18:24:43 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
For a long time I have wanted to have some way of clearing the
kill-ring, and I have recently started using the "cliphist" package,
like this -
--8<---------------cut here---------------start------------->8---
#+begin_src emacs-lisp
(require 'cliphist)
(global-set-key (kbd "s-,") 'cliphist-select-item)
(global-set-key (kbd "s-.") 'cliphist-paste-item)
#+end_src
--8<---------------cut here---------------end--------------->8---
which is working very well to use data from "parcellite".
And I seem to have found a way of clearing the kill-ring, at
http://qdot.github.io/conf_emacs/
--8<---------------cut here---------------start------------->8---
#+begin_src emacs-lisp
(defun qdot/clear-kill-ring ()
"Clear the kill ring variable"
(setq kill-ring nil))
(global-set-key (kbd "s-/") 'qdot/clear-kill-ring)
#+end_src
--8<---------------cut here---------------end--------------->8---
However when I do "s-/" emacs replied with
╭────
│(wrong-type-argument commandp qdot/clear-kill-ring) in
ad-Advice-call-interactively
╰────
So what should I have in my function please to get it working properly?
Thanks
Sharon.
--
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.1
signature.asc
Description: PGP signature
- clear-kill-ring function,
Sharon Kimble <=
- Re: clear-kill-ring function, Barry Margolin, 2015/10/27
- Re: clear-kill-ring function, Sharon Kimble, 2015/10/27
- Re: clear-kill-ring function, Michael Heerdegen, 2015/10/27
- Re: clear-kill-ring function, Sharon Kimble, 2015/10/28
- Message not available
- Re: clear-kill-ring function, Joost Kremers, 2015/10/28
- Re: clear-kill-ring function, Michael Heerdegen, 2015/10/28
- Re: clear-kill-ring function, Emanuel Berg, 2015/10/28
- Re: clear-kill-ring function, Emanuel Berg, 2015/10/27