From unknown Mon Jun 23 16:48:07 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2406: ewoc-collect doesn't match documentatino Reply-To: David =?UTF-8?Q?K=C3=A5gedal?= , 2406@debbugs.gnu.org Resent-From: David =?UTF-8?Q?K=C3=A5gedal?= Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 20 Feb 2009 08:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 2406 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123511725926428 (code B ref -1); Fri, 20 Feb 2009 08:15:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 20 Feb 2009 08:07:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: *** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=3.0 required=4.0 tests=RCVD_IN_SBLXBL, RCVD_IN_SBLXBL_CBL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1K87ZEL026422 for ; Fri, 20 Feb 2009 00:07:36 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LaQQ2-0001Gv-Vz for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:07:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LaQQ0-0001Gj-4l for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:07:33 -0500 Received: from [199.232.76.173] (port=33842 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaQPz-0001Gg-Vk for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:07:32 -0500 Received: from mx20.gnu.org ([199.232.41.8]:19351) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LaQPz-00049P-FL for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:07:31 -0500 Received: from mail.lysator.liu.se ([130.236.254.3]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LaQOW-0008V9-AF for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:06:00 -0500 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 7E8AA40005; Fri, 20 Feb 2009 09:04:51 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1674) id 742654000D; Fri, 20 Feb 2009 09:04:51 +0100 (CET) Received: from krank (unknown [80.251.192.3]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTP id 7EDA040005; Fri, 20 Feb 2009 09:04:50 +0100 (CET) Received: by krank (Postfix, from userid 1000) id 50E01DC4BC; Fri, 20 Feb 2009 09:04:54 +0100 (CET) To: bug-gnu-emacs@gnu.org From: David =?UTF-8?Q?K=C3=A5gedal?= Date: Fri, 20 Feb 2009 09:04:54 +0100 Message-ID: <87prhdlejd.fsf@krank.kagedal.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: ClamAV using ClamSMTP Content-Transfer-Encoding: quoted-printable X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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.1050200= 0 configured using `configure '--build=3Dx86_64-linux-gnu' '--host=3Dx86_6= 4-linux-gnu' '--prefix=3D/usr' '--sharedstatedir=3D/var/lib' '--libexecdi= r=3D/usr/lib' '--localstatedir=3D/var' '--infodir=3D/usr/share/info' '--m= andir=3D/usr/share/man' '--with-pop=3Dyes' '--enable-locallisppath=3D/etc= /emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/shar= e/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-l= isp:/usr/share/emacs/22.2/leim' '--with-x=3Dyes' '--with-x-toolkit=3Dathe= na' '--with-toolkit-scroll-bars' 'build_alias=3Dx86_64-linux-gnu' 'host_a= lias=3Dx86_64-linux-gnu' 'CFLAGS=3D-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=3D5= 000 -g -O2' 'LDFLAGS=3D-g -Wl,--as-needed' 'CPPFLAGS=3D'' --=20 David K=C3=A5gedal From unknown Mon Jun 23 16:48:07 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: David =?UTF-8?Q?K=C3=A5gedal?= Subject: bug#2406 closed by Glenn Morris (Re: bug#2406: ewoc-collect doesn't match documentatino) Message-ID: References: <87prhdlejd.fsf@krank.kagedal.org> X-Emacs-PR-Message: they-closed 2406 X-Emacs-PR-Package: emacs Reply-To: 2406@debbugs.gnu.org Date: Sat, 21 Feb 2009 03:45:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1235187904-19141-1" This is a multi-part message in MIME format... ------------=_1235187904-19141-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #2406: ewoc-collect doesn't match documentatino It has been closed by Glenn Morris . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Glenn Morris by replying to this email. --=20 2406: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D2406 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1235187904-19141-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 2406-done) by emacsbugs.donarmstrong.com; 21 Feb 2009 03:39:37 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.0 required=4.0 tests=HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1L3dY9x017871 for <2406-done@emacsbugs.donarmstrong.com>; Fri, 20 Feb 2009 19:39:36 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Laig7-0000pi-8I; Fri, 20 Feb 2009 22:37:23 -0500 From: Glenn Morris To: 2406-done@debbugs.gnu.org Subject: Re: bug#2406: ewoc-collect doesn't match documentatino References: <87prhdlejd.fsf@krank.kagedal.org> X-Spook: encryption Adriatic ANC SCUD missile morse Noriega X-Ran: tZ<>0w|YL.%b@Oh{Vbn{1u>EUAJG-HxU{B9i3X0 (David =?iso-8859-1?Q?K=E5?= =?iso-8859-1?Q?gedal's?= message of "Fri, 20 Feb 2009 09:04:54 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable David K=E5gedal 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 * emacs-lisp/ewoc.el (ewoc-collect): Return results in the correct order. ------------=_1235187904-19141-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 20 Feb 2009 08:07:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: *** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=3.0 required=4.0 tests=RCVD_IN_SBLXBL, RCVD_IN_SBLXBL_CBL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1K87ZEL026422 for ; Fri, 20 Feb 2009 00:07:36 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LaQQ2-0001Gv-Vz for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:07:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LaQQ0-0001Gj-4l for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:07:33 -0500 Received: from [199.232.76.173] (port=33842 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaQPz-0001Gg-Vk for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:07:32 -0500 Received: from mx20.gnu.org ([199.232.41.8]:19351) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LaQPz-00049P-FL for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:07:31 -0500 Received: from mail.lysator.liu.se ([130.236.254.3]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LaQOW-0008V9-AF for bug-gnu-emacs@gnu.org; Fri, 20 Feb 2009 03:06:00 -0500 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 7E8AA40005; Fri, 20 Feb 2009 09:04:51 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1674) id 742654000D; Fri, 20 Feb 2009 09:04:51 +0100 (CET) Received: from krank (unknown [80.251.192.3]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTP id 7EDA040005; Fri, 20 Feb 2009 09:04:50 +0100 (CET) Received: by krank (Postfix, from userid 1000) id 50E01DC4BC; Fri, 20 Feb 2009 09:04:54 +0100 (CET) To: bug-gnu-emacs@gnu.org Subject: ewoc-collect doesn't match documentatino From: =?utf-8?Q?David_K=C3=A5gedal?= Date: Fri, 20 Feb 2009 09:04:54 +0100 Message-ID: <87prhdlejd.fsf@krank.kagedal.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: ClamAV using ClamSMTP Content-Transfer-Encoding: quoted-printable X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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.1050200= 0 configured using `configure '--build=3Dx86_64-linux-gnu' '--host=3Dx86_6= 4-linux-gnu' '--prefix=3D/usr' '--sharedstatedir=3D/var/lib' '--libexecdi= r=3D/usr/lib' '--localstatedir=3D/var' '--infodir=3D/usr/share/info' '--m= andir=3D/usr/share/man' '--with-pop=3Dyes' '--enable-locallisppath=3D/etc= /emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/shar= e/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-l= isp:/usr/share/emacs/22.2/leim' '--with-x=3Dyes' '--with-x-toolkit=3Dathe= na' '--with-toolkit-scroll-bars' 'build_alias=3Dx86_64-linux-gnu' 'host_a= lias=3Dx86_64-linux-gnu' 'CFLAGS=3D-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=3D5= 000 -g -O2' 'LDFLAGS=3D-g -Wl,--as-needed' 'CPPFLAGS=3D'' --=20 David K=C3=A5gedal ------------=_1235187904-19141-1--