chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: dissector: deep select error


From: Andre Kuehne
Subject: [Chicken-users] Re: dissector: deep select error
Date: Fri, 01 Dec 2006 21:07:22 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20061109)

Taylor R Campbell wrote:
   Date: Thu, 30 Nov 2006 21:45:56 +0100
   From: Andre Kuehne <address@hidden>

   Hello Taylor

   I want to report this error:

I'm afraid, actually, that I haven't been involved in the maintenance
of the dissector egg for a while, since I longer use Chicken much, and
since Reed Sheridan has taken to preventing it from bit-rot.  But
these changes are pretty small, so I looked at the old source myself
anyway.

By the way, since this is cc'd to the chicken-users list, can someone
(Felix?) update the contact information to reflect my current email
address?  I don't know for how much longer mail will still be
forwarded here from my old one.

   The documented optional deep-index-arguments to the select-command
   do not seem to work. When used i get the following error:

        Error: unbound variable: index

That is due to a typo in the definition of DISSECTION-SELECT2+ in
menu.scm, where I wrote INDEX instead of INDEX1 in the call to
STREAM-MAYBE-DROP on line 55.

The attached patch includes this fix and also fixes the following: The "up"-command with a supplied argument > 1 pops one too many elements from the history-stack.


   BTW some suggestions to the history command:

   I would like the history to be printed in a similar fashion as
   the normal dissector menu: Each history-element on a seperate line,
   prefixed by an index. Then one should be able to type "h 0" to
   pop to the top of the history-stack for example.

Changing the HISTORY command to do this is a simple exercise for the
reader, and I'm sure that Felix or Reed Sheridan would be happy to see
a change from you to improve its usability.  As for popping the
history stack, you can just use the UP command -- it accepts an
optional number of times to go back up.

   Dissector is a great egg. I love it!

Thanks!


Index: menu.scm
===================================================================
--- menu.scm    (revision 2547)
+++ menu.scm    (working copy)
@@ -52,7 +52,7 @@
                  (error "Can't dissect further into undissectable"))
                 ((stream-maybe-drop (dissection-menu-entries
                                      (dissection-menu dissection))
-                                    index)
+                                    index1)
                  => (lambda (tail)
                       (cond ((stream-null? tail)
                              (error "Dissection index out of bounds"))
Index: dissection.scm
===================================================================
--- dissection.scm      (revision 2547)
+++ dissection.scm      (working copy)
@@ -33,7 +33,7 @@
 
 (define (dissection-pop-multiple! dissection count)
   (let ((history (dissection-history dissection)))
-    (cond ((maybe-drop history count)
+    (cond ((maybe-drop history (- count 1))
            => (lambda (history*)
                 (let ((focus (car history*)))
                   (set-dissection-history! dissection (cdr history*))

reply via email to

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