unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#2406: ewoc-collect doesn't match documentatino
@ 2009-02-20  8:04 ` David Kågedal
  2009-02-21  3:45   ` bug#2406: marked as done (ewoc-collect doesn't match documentatino) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: David Kågedal @ 2009-02-20  8:04 UTC (permalink / raw)
  To: bug-gnu-emacs

Ths documentation for the ewoc-collect function says "The elements on
the returned list will appear in the same order as in the buffer", but
this is not true.

  (ewoc--set-buffer-bind-dll-let* ewoc
      ((header (ewoc--header ewoc))
       (node (ewoc--node-nth dll -2))
       result)
    (while (not (eq node header))
      (if (apply predicate (ewoc--node-data node) args)
	  (push (ewoc--node-data node) result))
      (setq node (ewoc--node-prev dll node)))
    (nreverse result)))

As you can see, it goes throuth the nodes backwards and conses a list,
which will thus be in the correct order. But then it ends with a call
to nreverse that reverses the order so that the return result has the
nodes completely backwards.

Replacing "(nreverse result)" with "result" produces the expected
result.


In GNU Emacs 22.2.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2008-09-05 on yellow, modified by Ubuntu
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
configured using `configure  '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

-- 
David Kågedal







^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#2406: marked as done (ewoc-collect doesn't match documentatino)
  2009-02-20  8:04 ` bug#2406: ewoc-collect doesn't match documentatino David Kågedal
@ 2009-02-21  3:45   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2009-02-21  3:45 UTC (permalink / raw)
  To: Glenn Morris

[-- Attachment #1: Type: text/plain, Size: 882 bytes --]


Your message dated Fri, 20 Feb 2009 22:37:23 -0500
with message-id <o5eixsfojw.fsf@fencepost.gnu.org>
and subject line Re: bug#2406: ewoc-collect doesn't match documentatino
has caused the Emacs bug report #2406,
regarding ewoc-collect doesn't match documentatino
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
2406: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2406
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4565 bytes --]

From: "David Kågedal" <davidk@lysator.liu.se>
To: bug-gnu-emacs@gnu.org
Subject: ewoc-collect doesn't match documentatino
Date: Fri, 20 Feb 2009 09:04:54 +0100
Message-ID: <87prhdlejd.fsf@krank.kagedal.org>

Ths documentation for the ewoc-collect function says "The elements on
the returned list will appear in the same order as in the buffer", but
this is not true.

  (ewoc--set-buffer-bind-dll-let* ewoc
      ((header (ewoc--header ewoc))
       (node (ewoc--node-nth dll -2))
       result)
    (while (not (eq node header))
      (if (apply predicate (ewoc--node-data node) args)
	  (push (ewoc--node-data node) result))
      (setq node (ewoc--node-prev dll node)))
    (nreverse result)))

As you can see, it goes throuth the nodes backwards and conses a list,
which will thus be in the correct order. But then it ends with a call
to nreverse that reverses the order so that the return result has the
nodes completely backwards.

Replacing "(nreverse result)" with "result" produces the expected
result.


In GNU Emacs 22.2.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2008-09-05 on yellow, modified by Ubuntu
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
configured using `configure  '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

-- 
David Kågedal




[-- Attachment #3: Type: message/rfc822, Size: 1965 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 2406-done@emacsbugs.donarmstrong.com
Subject: Re: bug#2406: ewoc-collect doesn't match documentatino
Date: Fri, 20 Feb 2009 22:37:23 -0500
Message-ID: <o5eixsfojw.fsf@fencepost.gnu.org>

David Kågedal wrote:

> Ths documentation for the ewoc-collect function says "The elements on
> the returned list will appear in the same order as in the buffer", but
> this is not true.

Thanks, this has already been fixed.

2008-04-09  Alexandre Julliard  <julliard@winehq.org>

  * emacs-lisp/ewoc.el (ewoc-collect): Return results in the
  correct order.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-21  3:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <o5eixsfojw.fsf@fencepost.gnu.org>
2009-02-20  8:04 ` bug#2406: ewoc-collect doesn't match documentatino David Kågedal
2009-02-21  3:45   ` bug#2406: marked as done (ewoc-collect doesn't match documentatino) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).