From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Annoying kill-ring behavior Date: 4 Apr 2014 04:34:25 GMT Message-ID: References: <21e35a20-5eec-4f1b-a376-d9d2fe034840@googlegroups.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1396586132 26805 80.91.229.3 (4 Apr 2014 04:35:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Apr 2014 04:35:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 04 06:35:25 2014 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 1WVvqe-0006tB-Uv for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Apr 2014 06:35:25 +0200 Original-Received: from localhost ([::1]:47555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVvqe-0008B6-6h for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Apr 2014 00:35:24 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-X-Trace: individual.net MucfOaWOBf0zGVvXN5EQAQR416MnefYl3T35XXRBCnceqLl2HE Cancel-Lock: sha1:iC7CKJ2bZWC9gsKBdm2zEkioUnI= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/pre1.0.0-18 (Linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:204691 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:96961 Archived-At: Smith_RS wrote: > On Thursday, April 3, 2014 9:52:17 AM UTC-7, Smith_RS wrote: >> When I try to update the kill-ring "by hand" I find that when I try to access yank-menu it is no longer in sync with the kill-ring. >> >> How do I fix that? The code in menu-bar.el doesn't really explain how it's kept in sync. What am I missing? Is there a hook somewhere? > > Never mind, I figured it out. Did you check the doc string of `kill-ring'? There, you'll find the warning not to use that variable directly. There are functions to update the kill ring that you should use instead: ,---- | List of killed text sequences. | Since the kill ring is supposed to interact nicely with cut-and-paste | facilities offered by window systems, use of this variable should | interact nicely with `interprogram-cut-function' and | `interprogram-paste-function'. The functions `kill-new', | `kill-append', and `current-kill' are supposed to implement this | interaction; you may want to use them instead of manipulating the kill | ring directly. `---- And although it doesn't say so, looking at the source shows that the yank menu is also updated. HTH -- Joost Kremers joostkremers@fastmail.fm Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)