unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* clear-kill-ring function
@ 2015-10-27 18:24 Sharon Kimble
  0 siblings, 0 replies; 9+ messages in thread
From: Sharon Kimble @ 2015-10-27 18:24 UTC (permalink / raw)
  To: help-emacs

[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-10-29  2:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1159.1445970298.7904.help-gnu-emacs@gnu.org>
2015-10-27 18:49 ` clear-kill-ring function Barry Margolin
2015-10-27 19:29   ` Sharon Kimble
2015-10-27 20:18     ` Michael Heerdegen
2015-10-28  6:06       ` Sharon Kimble
     [not found]       ` <mailman.1186.1446012388.7904.help-gnu-emacs@gnu.org>
2015-10-28 10:37         ` Joost Kremers
2015-10-28 12:46           ` Michael Heerdegen
2015-10-29  2:34           ` Emanuel Berg
2015-10-28  2:14     ` Emanuel Berg
2015-10-27 18:24 Sharon Kimble

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).