all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sharon Kimble <boudiccas@skimble.plus.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: clear-kill-ring function
Date: Wed, 28 Oct 2015 06:06:10 +0000	[thread overview]
Message-ID: <87eggf4je5.fsf@skimble.plus.com> (raw)
In-Reply-To: <87twpcoyjy.fsf@web.de> (Michael Heerdegen's message of "Tue, 27 Oct 2015 21:18:25 +0100")

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

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Sharon Kimble <boudiccas@skimble.plus.com> writes:
>
>> You mean like -
>>
>> ╭────
>> │(defun qdot/clear-kill-ring (interactive)
>> ╰────
>
> More like
>
>   (defun qdot/clear-kill-ring ()
>     (interactive)
>     ...)
>
> See (info "(elisp) Using Interactive").

Thanks for this Michael, I now have -

--8<---------------cut here---------------start------------->8---
#+begin_src emacs-lisp
(defun clear-kill-ring ()
(interactive)
  "Clear the kill ring variable"
  (setq kill-ring nil))
(global-set-key (kbd "s-/") 'clear-kill-ring)
#+end_src
--8<---------------cut here---------------end--------------->8---

And have restarted emacs several times, but if I do a "s-." before hand
I can see several items on the kill-ring. So I then do "s-/" to clear
the kill-ring, and if I then do a further "s-." it shows that there
still remains the same items on the kill-ring, i.e. nothing has changed!
Or, IOW, the function isn't working!

So I'm back to my original question, what do I have to do to get it
working please?

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 --]

  reply	other threads:[~2015-10-28  6:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eggf4je5.fsf@skimble.plus.com \
    --to=boudiccas@skimble.plus.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.