From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#29323: kill-do-not-save-duplicate, FR Date: Sat, 18 Nov 2017 11:48:07 -0800 (PST) Message-ID: <1ed676b7-7f96-466b-831b-c4914b78e938@default> References: <389775cc-0e7b-ec2b-37d3-176516fc0786@easy-emacs.de> <9e1d4bed-fbe9-463a-afdd-031f3b9cb041@default> <4555a640-d432-eaad-954d-2a91078e2396@easy-emacs.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1511034558 2249 195.159.176.226 (18 Nov 2017 19:49:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Nov 2017 19:49:18 +0000 (UTC) To: Andreas =?UTF-8?Q?R=C3=B6hler?= , 29323@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 18 20:49:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eG970-0008LG-M6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Nov 2017 20:49:10 +0100 Original-Received: from localhost ([::1]:50984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eG974-00081C-Pk for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Nov 2017 14:49:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eG96w-000816-5B for bug-gnu-emacs@gnu.org; Sat, 18 Nov 2017 14:49:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eG96r-0004Q2-W4 for bug-gnu-emacs@gnu.org; Sat, 18 Nov 2017 14:49:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37885) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eG96r-0004Pk-Sq for bug-gnu-emacs@gnu.org; Sat, 18 Nov 2017 14:49:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eG96r-0000cm-J7 for bug-gnu-emacs@gnu.org; Sat, 18 Nov 2017 14:49:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Nov 2017 19:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29323 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29323-submit@debbugs.gnu.org id=B29323.15110345032352 (code B ref 29323); Sat, 18 Nov 2017 19:49:01 +0000 Original-Received: (at 29323) by debbugs.gnu.org; 18 Nov 2017 19:48:23 +0000 Original-Received: from localhost ([127.0.0.1]:46566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eG96F-0000bs-AM for submit@debbugs.gnu.org; Sat, 18 Nov 2017 14:48:23 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:30027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eG96D-0000bc-Uz for 29323@debbugs.gnu.org; Sat, 18 Nov 2017 14:48:22 -0500 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vAIJmAXc031193 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 18 Nov 2017 19:48:12 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vAIJmAQV013638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 18 Nov 2017 19:48:10 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vAIJm9wv011948; Sat, 18 Nov 2017 19:48:09 GMT In-Reply-To: <4555a640-d432-eaad-954d-2a91078e2396@easy-emacs.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4615.0 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140066 Archived-At: > >> Currently variable kill-do-not-save-duplicates checks only the (car > >> kill-ring) as docu explains: Do not add a new string to =E2=80=98kill-= ring=E2=80=99 > >> if it duplicates the last one. The comparison is done using > >> =E2=80=98equal-including-properties=E2=80=99. AFAIU it would be trivia= l replace this > >> check by a call of "member", thus checking > the whole kill-ring. > > > > Why do that? Why not just prevent duplicates in the first place, which > > is what the option currently does? If you for some reason get > > duplicate entries somehow, in spite of using the option to prevent > > them, you can always remove them. I don't understand how that would be > > something that would happen normally. What is the problem that this > > would try to solve/prevent? --- >=20 > Currently not a check for duplicates is implemented, but for a repeat. >=20 > When having alternating strings to copy, they go into the kill-ring one > after one. That way it ended up having just two strings in the > kill-ring, and previous content lost. Sorry; my bad. I don't use that variable. Clearly you are right. The option should perhaps have 3 values: one to do nothing special, one to not push when the car is the same, and one to not push when the same is on the right somewhere. > BTW implementing it would be a way more complicated as thought because > of text properties. Not a big deal, I think. It just uses predicate `equal-including-properties', which is coded in C. But now that this has come up... Perhaps the predicate to test equality should be the value of a variable, to give users the ability to control the behavior better. Or barring that (which I'd prefer), perhaps it could at least let a user choose whether to distinguish entries if they are the same other than their properties. > > BTW - it's a pain to remove all of the formatting of your mails to > > such lists. >=20 > Hmm, don't you see a formatting when sending. >=20 > > Please consider using plain text, or at a minimum not using a colored > > (i.e. non-white) background. >=20 > Switched on "Readers Default Colors", which should help. Whatever you're doing now works, for me at least. Thanks.