emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#14568: closed (24.3.50; ring.el: Subtle issue with


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#14568: closed (24.3.50; ring.el: Subtle issue with duplicate "value" entries)
Date: Fri, 15 Nov 2013 04:59:01 +0000

Your message dated Fri, 15 Nov 2013 10:27:59 +0530
with message-id <address@hidden>
and subject line Re: bug#14568: 24.3.50; ring.el: Subtle issue with duplicate 
"value" entries
has caused the debbugs.gnu.org bug report #14568,
regarding 24.3.50; ring.el: Subtle issue with duplicate "value" entries
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
14568: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14568
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.50; ring.el: Subtle issue with duplicate "value" entries Date: Thu, 06 Jun 2013 22:54:40 +0530
`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 address@hidden
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




--- End Message ---
--- Begin Message --- Subject: Re: bug#14568: 24.3.50; ring.el: Subtle issue with duplicate "value" entries Date: Fri, 15 Nov 2013 10:27:59 +0530 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
OP here.  Closed.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]