GNU bug report logs - #2406
ewoc-collect doesn't match documentatino

Previous Next

Package: emacs;

Reported by: David Kågedal <davidk <at> lysator.liu.se>

Date: Fri, 20 Feb 2009 08:15:03 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

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 2406 in the body.
You can then email your comments to 2406 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2406; Package emacs. (Fri, 20 Feb 2009 08:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Kågedal <davidk <at> lysator.liu.se>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 20 Feb 2009 08:15:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: David Kågedal <davidk <at> lysator.liu.se>
To: bug-gnu-emacs <at> gnu.org
Subject: ewoc-collect doesn't match documentatino
Date: Fri, 20 Feb 2009 09:04:54 +0100
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





Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sat, 21 Feb 2009 03:45:03 GMT) Full text and rfc822 format available.

Notification sent to David Kågedal <davidk <at> lysator.liu.se>:
bug acknowledged by developer. (Sat, 21 Feb 2009 03:45:03 GMT) Full text and rfc822 format available.

Message #10 received at 2406-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 2406-done <at> debbugs.gnu.org
Subject: Re: bug#2406: ewoc-collect doesn't match documentatino
Date: Fri, 20 Feb 2009 22:37:23 -0500
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 <at> winehq.org>

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Sat, 21 Mar 2009 14:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 98 days ago.

Previous Next


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