From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: kill-new may replace the wrong item Date: Wed, 2 Jun 2010 22:33:28 +0100 Message-ID: References: <87d3wasfpf.fsf@mail.jurta.org> <87y6exp5zi.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1275514513 29114 80.91.229.12 (2 Jun 2010 21:35:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Jun 2010 21:35:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 02 23:35:11 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OJvag-0001Kh-JO for ged-emacs-devel@m.gmane.org; Wed, 02 Jun 2010 23:35:11 +0200 Original-Received: from localhost ([127.0.0.1]:36060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJvaf-00032N-Qh for ged-emacs-devel@m.gmane.org; Wed, 02 Jun 2010 17:35:09 -0400 Original-Received: from [140.186.70.92] (port=41323 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJvZ5-0001xH-Gt for emacs-devel@gnu.org; Wed, 02 Jun 2010 17:33:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJvZ3-0005yU-Nc for emacs-devel@gnu.org; Wed, 02 Jun 2010 17:33:31 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:44862) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJvZ3-0005yP-IN for emacs-devel@gnu.org; Wed, 02 Jun 2010 17:33:29 -0400 Original-Received: by wyb39 with SMTP id 39so3333606wyb.0 for ; Wed, 02 Jun 2010 14:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WIWHN91QEmXXn3zV826GfQB2L9daTTT8kTBO+qA7+lg=; b=NOXDRMiSizSDUcZr+cdlX4eO8lEmdT9BDPNEfeBuyH1CXWkas+RZeTIRmVA7cF39xn oQudkOz8+nRTvOhhB+0wfB7HYW8W8Rc8Cuyh4a/s2T0z3tDW2xrz2wKx77tvnM/Zd06A lHwsgRaP5uH1+90qDRdcdOhXIr8GjffBRJQIo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=unbYfu1hhcs7OU55/e/qEbb3F72KzRouRBiIz8rW56vizFXBnWg2srneZhd5bglYQk +7/Bmt3eCNNvwpQecRfPXc2iCxtxmcRi0obGwLkMlwFQcexdJqMgq4l1o6dz6I6x1+SD FBsW5WcchM+f4euBw4xiPsL6JnEq1QsQe83tU= Original-Received: by 10.227.137.67 with SMTP id v3mr8361999wbt.92.1275514408658; Wed, 02 Jun 2010 14:33:28 -0700 (PDT) Original-Received: by 10.216.179.75 with HTTP; Wed, 2 Jun 2010 14:33:28 -0700 (PDT) In-Reply-To: <87y6exp5zi.fsf@mail.jurta.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125466 Archived-At: On 2 June 2010 20:53, Juri Linkov wrote: > Do you think `kill-do-not-save-duplicates' should take into account > clipboard strings too and don't allow duplicates from clipboard? > Maybe. =A0But should the same logic apply to the menu items of yank-menu? > Should `menu-bar-update-yank-menu' use the value of `(car kill-ring)' > that was *before* pushing clipboard into kill-ring, but the value of > `replace' that is *after* pushing clipboard into kill-ring and > comparing it with the new value of `(car kill-ring)'? All I am trying to point out is there's something incorrect there. When it detects the CAR is the same as the 'STRING' arg, there's enough information to do something about it already, i.e.: (when (and kill-do-not-save-duplicates (equal string (car kill-ring))) - (setq replace t)) + (pop kill-ring)) (if (fboundp 'menu-bar-update-yank-menu) (menu-bar-update-yank-menu string (and replace (car kill-ring)))) (when save-interprogram-paste-before-kill is the old way of setting REPLACE to T is for the convenience of menu-bar-update-yank-menu? > -- > Juri Linkov > http://www.jurta.org/emacs/ Leo