GNU bug report logs -
#14568
24.3.50; ring.el: Subtle issue with duplicate "value" entries
Previous Next
Reported by: Jambunathan K <kjambunathan <at> gmail.com>
Date: Thu, 6 Jun 2013 17:27:01 UTC
Severity: minor
Found in version 24.3.50
Done: Jambunathan K <kjambunathan <at> gmail.com>
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 14568 in the body.
You can then email your comments to 14568 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14568
; Package
emacs
.
(Thu, 06 Jun 2013 17:27:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jambunathan K <kjambunathan <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 06 Jun 2013 17:27:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
`search-mark-ring' is a variable that I have in my private library.
This is a ring that is created using ring.el and is used to store
markers.
M-: search-mark-ring
(0 5 .
[
#<marker at 4503 in textprop.c>
#<marker at 109654 in editfns.c>
#<marker at 16866 in lisp.h>
#<marker at 109654 in editfns.c>
#<marker at 16863 in lisp.h> nil nil nil nil nil nil nil
nil nil nil nil])
M-: search-mark-ring-current
#<marker at 16863 in lisp.h>
M-: (setq search-mark-ring-current (ring-next search-mark-ring
search-mark-ring-current))
When the last form is repeatedly evaluated, you will see that there is
no way I can hit the oldest marker - the one at 4503 - in the ring.
This is because there are duplicate entries in 109654.
Possible solutions:
1. `ring-member' should use `eq' instead of `equal'.
2. `ring-insert' should check for duplicate entries before insertion.
I would prefer solution (1).
ring.el is probably one of the oldest libraries and so (1) may break
existing behaviours. Possible bugfix.
1. Augment the structure and allow for a predicate.
2. Check if the ring is a ring of markers and use `eq' instead of
`equal'.
ps: It is a requirement that ring be robust in presence of duplicate
entries.
In GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
of 2013-06-06 on debian-6.05
Bzr revision: 112866 acm <at> muc.de-20130605205709-0cwqswy801vgkyx8
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Important settings:
value of $LANG: en_IN
locale-coding-system: iso-latin-1-unix
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Reply sent
to
Jambunathan K <kjambunathan <at> gmail.com>
:
You have taken responsibility.
(Fri, 15 Nov 2013 04:59:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jambunathan K <kjambunathan <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 15 Nov 2013 04:59:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 14568-done <at> debbugs.gnu.org (full text, mbox):
OP here. Closed.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 13 Dec 2013 12:24:24 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 192 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.