GNU bug report logs - #21058
25.0.50; delete-dups doesn't delete all duplicates

Previous Next

Package: emacs;

Reported by: Ari Roponen <ari.roponen <at> gmail.com>

Date: Wed, 15 Jul 2015 05:41:01 UTC

Severity: normal

Tags: patch

Merged with 20534

Found in version 25.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21058 in the body.
You can then email your comments to 21058 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21058; Package emacs. (Wed, 15 Jul 2015 05:41:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ari Roponen <ari.roponen <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 15 Jul 2015 05:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ari Roponen <ari.roponen <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; delete-dups doesn't delete all duplicates
Date: Wed, 15 Jul 2015 08:40:06 +0300
Tags: patch

Function delete-dups doesn't delete all duplicates from long
lists:

(delete-dups (mapcar (lambda (x) (% x 3)) (number-sequence 0 102)))
=> (0 1 2 1 0 2 1 0 2 1 0 2 ...)

The following patch seems to fix the problem.


	* lisp/subr.el (delete-dups): Fix paren typo.

diff --git a/lisp/subr.el b/lisp/subr.el
index 5bd4bb4..e2c1bae 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -426,8 +426,8 @@ one is kept."
             (let ((elt (car retail)))
               (if (gethash elt hash)
                   (setcdr tail (cdr retail))
-                (puthash elt t hash)))
-            (setq tail retail)))
+                (puthash elt t hash)
+                (setq tail retail)))))
       (let ((tail list))
         (while tail
           (setcdr tail (delete (car tail) (cdr tail)))


In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.17.4)
 of 2015-07-14 on arirop
Repository revision: 6a7e718916d00dbacaa765669f389b86f33075f5
Windowing system distributor `Fedora Project', version 11.0.11702000
System Description:	Fedora release 23 (Rawhide)

-- 
Ari Roponen




Added indication that bug 21058 blocks19759 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 15 Jul 2015 06:13:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21058; Package emacs. (Wed, 15 Jul 2015 09:32:02 GMT) Full text and rfc822 format available.

Message #10 received at 21058 <at> debbugs.gnu.org (full text, mbox):

From: Vaidheeswaran C <vaidheeswaran.chinnaraju <at> gmail.com>
To: Ari Roponen <ari.roponen <at> gmail.com>, 21058 <at> debbugs.gnu.org
Subject: Re: bug#21058: 25.0.50; delete-dups doesn't delete all duplicates
Date: Wed, 15 Jul 2015 11:44:26 +0530
On Wednesday 15 July 2015 11:10 AM, Ari Roponen wrote:
> Tags: patch
> 
> Function delete-dups doesn't delete all duplicates from long
> lists:

I had issues with delete-dups as well.

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20721#26









Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Thu, 16 Jul 2015 14:56:02 GMT) Full text and rfc822 format available.

Notification sent to Ari Roponen <ari.roponen <at> gmail.com>:
bug acknowledged by developer. (Thu, 16 Jul 2015 14:56:02 GMT) Full text and rfc822 format available.

Message #15 received at 21058-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Ari Roponen <ari.roponen <at> gmail.com>
Cc: 21058-done <at> debbugs.gnu.org
Subject: Re: 25.0.50; delete-dups doesn't delete all duplicates
Date: Thu, 16 Jul 2015 07:55:44 -0700
Thanks for the bug report and patch.  I installed it in your name as master 
commit 572cd26f3f03995dbb3689b8a6f0a575ec9b9cb6.




Forcibly Merged 20534 21058. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 16 Jul 2015 15:47:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 14 Aug 2015 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.