emacs-devel
[Top][All Lists]
Advanced

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

Re: ewoc patch


From: Tom Breton (Tehom)
Subject: Re: ewoc patch
Date: Wed, 9 Dec 2009 15:57:35 -0500
User-agent: SquirrelMail/1.4.19

> 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:

Yes, I meant entries that print nothing and have no separator.

>> * 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).

I bet it was messy.  That was the first approach I tried.

>>  * 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.

Fair enough.  But ISTM that while `ewoc-for-each' can have the same
signature as `ewoc-map' has now, `ewoc-do' would be expected to have a
signature like dolist and dotimes.  Ie, to be used like:

(ewoc-do (element ewoc)
  (do-stuff-to element))

So ewoc-for-each was just an alias but ewoc-do would require more.

>>  * 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.

I added it so that other packages that wanted or needed a variable
separator could tell whether it was available.  Otherwise they would make
errors if an old ewoc.el was loaded.  If you have a better way in mind,
I'll use 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.

Yes, I think so too.

>> 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).

Sure.  But it uses my tester package rtest; there is an old version of
rtest  out there but I'm using my new version that is still in flux. 
(Which, circularly, is the reason I wanted to make ewoc more flexible)

>> diff -c -b /home/tehom/emacs-21.4/lisp/emacs-lisp/ewoc.el
>> /home/tehom/projects/emtest/lisp/viewe

Will emacs 22.2 be sufficient?

Tom Breton (Tehom)






reply via email to

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