From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sharon Kimble Newsgroups: gmane.emacs.help Subject: clear-kill-ring function Date: Tue, 27 Oct 2015 18:24:43 +0000 Message-ID: <87pp00goes.fsf@skimble.plus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1445970323 7899 80.91.229.3 (27 Oct 2015 18:25:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Oct 2015 18:25:23 +0000 (UTC) To: help-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 27 19:25:10 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zr8vk-0001WG-Oj for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Oct 2015 19:25:09 +0100 Original-Received: from localhost ([::1]:33630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr8vj-0002Cg-Qw for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Oct 2015 14:25:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr8vY-0002CP-Ad for help-gnu-emacs@gnu.org; Tue, 27 Oct 2015 14:24:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr8vV-0000kg-2B for help-gnu-emacs@gnu.org; Tue, 27 Oct 2015 14:24:56 -0400 Original-Received: from avasout02.plus.net ([212.159.14.17]:35685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr8vU-0000kU-Fg for help-gnu-emacs@gnu.org; Tue, 27 Oct 2015 14:24:52 -0400 Original-Received: from london.london ([212.56.101.125]) by avasout02 with smtp id aJQo1r0032iKkuk01JQp1W; Tue, 27 Oct 2015 18:24:49 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=Fa7Kv8K6 c=1 sm=1 tr=0 a=Z6vFUnHZFshV1nOgW1CWSg==:117 a=Z6vFUnHZFshV1nOgW1CWSg==:17 a=0Bzu9jTXAAAA:8 a=EBOSESyhAAAA:8 a=nfqmekj_AAAA:8 a=LlzXLoV6AAAA:8 a=iI7HsYTVAAAA:8 a=C4opN6dtn2xg1uKaC7EA:9 a=_QTZNzasO8pT380H:21 a=529xsYz4Rhpr5J-u:21 a=QEXdDO2ut3YA:10 a=p2BxrK9DdiisXfSYs0YA:9 X-AUTH: skimble@:2500 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 212.159.14.17 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107847 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 - =2D-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 =2D-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.gi= thub.io/conf_emacs/ =2D-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 =2D-8<---------------cut here---------------end--------------->8--- However when I do "s-/" emacs replied with =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82(wrong-type-argument commandp qdot/clear-kill-ring) in ad-Advice-c= all-interactively =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 So what should I have in my function please to get it working properly? Thanks Sharon. =2D-=20 A taste of linux =3D http://www.sharons.org.uk TGmeds =3D http://www.tgmeds.org.uk Debian 8.0, fluxbox 1.3.7, emacs 24.5.1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJWL8FrAAoJEDaBgBkK+INbnfcQAMAU7jVrNIoHhhl+2HBHblE0 Or3OyKbAIX+iWh0m4qgZiCOy1NdOSDqY9sjGYlWnh/Sr4SKcaDRbgsv6WIsIQGkj wMKW2qcc04d84EG1D/ZUNMjVQpkb9rvw8K23TytSy7kbLzmAcWR412KqN7UKls4J IyxzK0maiGVOUWQh4AU7zJww3usT8OhUcvbp4Qet6D1RrMXPKj1Z+4XJGk6TTyPK X9upmna7mcc1wA7TbPTsA8TQpGIITzVtW+FDG+58q/poMKKg8TttQwMntPVDLMTn 28mdPsS7ljlr6VJxvHaBv1lGHq/RtXElvpymS43zu7sryS6acQM1TQiJUtxgaUcw LEaGX3Bo87r23A2Tauo95gcjP+FSyShhdHnlm22IoE1/50BcXh4n02iXOiMBFuFH Znvt9UHHVbbkHtg+0YgUUTWcspPs4XhNLRdEStr+sz7k9AOz0bWLDnkoSrfkKd9P ZV2PUfgyXfesDdfiK0CvStOIpO+uhOW1X7gbKK5qWsKGjeUXG1ADrAIP/JPWfLQj GmGMKY7cZ9AMFbjHkFewZP4nhfFJBDgynoSzoCWEq0K0ewy939UuaIUUEr/ycwPY n4dpziV5uU1tTEDhCUkjUicCfRyWqGxGM1/EADPGNP82SXecuLqMjfNC7etY4T/8 ZxqFhyozLoai0y4W2MA3 =HnwR -----END PGP SIGNATURE----- --=-=-=--