[slime-devel] [Patch] Re: Inspector: inspect-bigger-piece and inspect-whole-thing broken.
Madhu
enometh at meer.net
Sat Jun 16 07:29:21 UTC 2007
* Madhu <m3odjgs9zc.fsf at robolove.meer.net> :
| Here are two test cases for exposing the bugs:
|
| ;; In ~/.swank.lisp:
| (setq SWANK::*SLIME-INSPECT-CONTENTS-LIMIT* 10)
|
| ;;
| ;; CASE I
| ;;
| (defvar *ht* (make-hash-table :test #'eql))
| (loop for i below 20 do (setf (gethash i *ht*) (princ i)))
|
| Then M-x slime-inspect *ht* (C-c I *ht*) :
|
| The inspector window show:
| |Contents:
| |10 elements shown. Prompt for how many to inspect...
| |Inspect all 20 elements.
|
| Choosing either of these two (bigger pieces action and entering the
| value in the REPL) or inspect whole pieces action, does not change the
| contents displayed in the inspector window, i.e. the number of items
| displayed does not change.
|
| ;;
| ;; CASE II
| ;;
| (defvar *array* (make-array 100 :initial-element nil))
| Then M-x slime-inspect *array* (C-c I *array*)
|
| The variable SWANK::*SLIME-INSPECT-CONTENTS-LIMIT* is not respected
| and the whole contents of the array is printed.
The CASE II problem CMUCL specific and a result of a method
(METHOD INSPECT-FOR-EMACS (SIMPLE-VECTOR SWANK-BACKEND::CMUCL-INSPECTOR))
in slime/swank-cmucl.lisp which does not honour *SLIME-INSPECT-CONTENTS-LIMIT*.
I'll retract CASE II from my report.
| I'm guessing the following Changelog entry may apply, but haven't checked
| or fixed the problem against HEAD.
|
<snip>
The Changelog entry reported as relevant is incorrect. I believe the
correct entry is
>2007-04-09 Marco Baringer <mb at bese.it>
>
> * swank.lisp (inspector-content-for-emacs): Look for refresh
> keyword argument in :action links.
> (inspect-whole-thing-action, inspect-show-more-action): Update for
> new :action argument handling.
> (inspect-for-emacs stream, inspect-for-emacs stream-error): Pass
> :refresh nil on :action links.
> (action-part-for-emacs): Set both lambda and refresh in the
> *inspectee-actions* array.
> (inspector-call-nth-action): *inspectee-actions* now holds both
> the function and the boolean specifying whether to refresh or not.
>
> * swank-backend.lisp (inspect-for-emacs): Docstring update.
>
> * slime.el (slime-inspector-operate-on-point): Allow the action
> calls to return nil.
I confess not understanding the new protocol. However I Attach a
quick fix which reverts the earlier hack for inspecting arrays and
hashtables using the :replace keyword. (It also includes 2 minor
cleanups)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slime-inspector-more-whole.patch
Type: application/octet-stream
Size: 2660 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20070616/d9fc7336/attachment.obj>
More information about the slime-devel
mailing list