From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: ewoc patch Date: Tue, 08 Dec 2009 23:40:47 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260333714 11613 80.91.229.12 (9 Dec 2009 04:41:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Dec 2009 04:41:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Tom Breton \(Tehom\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 09 05:41:47 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NIEMw-0002GH-Mc for ged-emacs-devel@m.gmane.org; Wed, 09 Dec 2009 05:41:43 +0100 Original-Received: from localhost ([127.0.0.1]:59110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIEMw-0006ym-DO for ged-emacs-devel@m.gmane.org; Tue, 08 Dec 2009 23:41:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIEMA-0006Ml-7X for emacs-devel@gnu.org; Tue, 08 Dec 2009 23:40:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIEM5-0006H2-95 for emacs-devel@gnu.org; Tue, 08 Dec 2009 23:40:53 -0500 Original-Received: from [199.232.76.173] (port=37865 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIEM5-0006Gr-4c for emacs-devel@gnu.org; Tue, 08 Dec 2009 23:40:49 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:35984 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIEM4-0007W9-Ss for emacs-devel@gnu.org; Tue, 08 Dec 2009 23:40:49 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArEEALK4HkvO+INN/2dsb2JhbACBTNYAhCwEiho X-IronPort-AV: E=Sophos;i="4.47,366,1257138000"; d="scan'208";a="51077911" Original-Received: from 206-248-131-77.dsl.teksavvy.com (HELO ceviche.home) ([206.248.131.77]) by ironport2-out.pppoe.ca with ESMTP; 08 Dec 2009 23:40:47 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 78CF5B4214; Tue, 8 Dec 2009 23:40:47 -0500 (EST) In-Reply-To: (Tom Breton's message of "Tue, 8 Dec 2009 23:03:12 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118433 Archived-At: > I like the ewoc package, but I found it somewhat inflexible. I am > submitting this diff (attached) in the hope of improving it. > In particular: > * ewoc always wants every entry to be separated from the other > entries by a newline. > * It does not work properly with blank entries. These become a real > problem when a blank separator is allowed. Nodes often get printed > out of order. Not sure what you mean by "blank" entries. If you mean entries which don't get printed (i.e. "invisilbe" entries), then yes, it's a limitation that it would be good to lift. IIUC you lift it by: > * Design: Nodes that have no text have no start marker. which I think is a good solution (when I tried to lift that limitation it didn't occur to me, so I tried to manually separate the markers that needed to move from those that needed to stay put and it was messy). > * ewoc-map is slightly misnamed; it doesn't map, it's more like > for-each. It's the historical name. To fit with other macros (like dotimes, dolist), we could call it ewoc-do rather than ewoc-foreach. > * Added a version number. I didn't have much to go on, so I just > said it was "2.0". I will gladly change it to correspond to an > official version number. The Emacs package generally doesn't like version numbers, so I'd rather not introduce one here, unless there's really a good reason for it. > * Added a new field to the ewoc, "separator". That's the string that > separates entries. It defaults to "\n". IIUC it can also be the empty string, right? IIUC, the current ewoc.el already makes it possible to get rid of the separator. Making it an argument might be a good idea as well. > Testing: > * Created a test suite. The suite relies on rtest, which > unfortunately is still between releasable versions. We still don't have a testsuite in Emacs, but we'll gladly add the testsuite to our repository (we have a `test' subdirectory for that). > diff -c -b /home/tehom/emacs-21.4/lisp/emacs-lisp/ewoc.el /home/tehom/projects/emtest/lisp/viewers/ewoc.el > --- /home/tehom/emacs-21.4/lisp/emacs-lisp/ewoc.el 2001-07-16 08:22:59.000000000 -0400 > +++ /home/tehom/projects/emtest/lisp/viewers/ewoc.el 2009-12-08 22:57:46.000000000 -0500 > @@ -129,6 +129,8 @@ Emacs-21.4 is rather old. ewoc hasn't seen much development, but it's still substantially different. Could you try and adapt your changes to our latest code? Stefan