Here's a workflow issue that I run into periodically:
1. While working on SBCL I instrument some internal operation to see what is going on -- let's say with BREAK.
2. Before I can run my test-case I need to page my way thru a number of debugger entries (sometimes a HUGE number) due to eg. cursor movement in a Lisp buffer causing the instrumented operation to be used.
I'm not looking for a 100% solution, because I doubt anything like that exists. Hacking a live system is always tricky that way...
An 80% solution might be being able to tell Slime to stop talking to the lisp, except for communications triggered by explicit REPL evaluations. Does this sound like a feasible idea? Any other suggestions?
Cheers,
-- Nikodemus
* Nikodemus Siivola [2008-12-01 09:50+0100] writes:
Here's a workflow issue that I run into periodically:
- While working on SBCL I instrument some internal operation to see
what is going on -- let's say with BREAK.
- Before I can run my test-case I need to page my way thru a number
of debugger entries (sometimes a HUGE number) due to eg. cursor movement in a Lisp buffer causing the instrumented operation to be used.
I'm not looking for a 100% solution, because I doubt anything like that exists. Hacking a live system is always tricky that way...
An 80% solution might be being able to tell Slime to stop talking to the lisp, except for communications triggered by explicit REPL evaluations. Does this sound like a feasible idea? Any other suggestions?
I'm not sure that I understand your problem. One problem that I encountered is that calling BREAK inside the compiler isn't very feasible because SLIME calls the compiler for other reasons too.
For this situation I use this special break function:
(defvar *break-in-compiler* nil)
(defun compiler-break (&rest args) (when *break-in-compiler* (apply #'break (or args (list "compiler-break")))))
(compile 'compiler-break)
(defun debug-compile-defun (s) (let ((*break-in-compiler* t) (c::*check-consistency* t)) (with-input-from-string (in s) (ext:compile-from-stream in :trace-stream *standard-output* :verbose t :print t :progress t :byte-compile nil))))
COMPILER-BREAK invokes BREAK only if *BREAK-IN-COMPILER* is true. To actually invoke the breakpoint I invoke the compiler via DEBUG-COMPILE-DEFUN. Usually with this Emacs side command:
(defun slime-debug-compile-defun () (interactive) (let ((s (apply #'buffer-substring-no-properties (slime-region-for-defun-at-point)))) (slime-eval-async `(cl-user::debug-compile-defun ,s) (lambda (x) (message "debug-compile finished")))))
Are you are searching this kind of thing?
Helmut.
"Nikodemus Siivola" nikodemus@random-state.net writes:
An 80% solution might be being able to tell Slime to stop talking to the lisp, except for communications triggered by explicit REPL evaluations. Does this sound like a feasible idea? Any other suggestions?
Do not use the slime-autodoc contrib, or alternatively, set `slime-use-autodoc-mode' to nil.
(Arglists will now be displayed only when you press SPACE. If that's still too much magic for you, set `slime-space-information-p' to nil.)
HTH,
-T.
* "Tobias C. Rittweiler" 87bpvwqk1r.fsf@freebits.de : Wrote on Mon, 01 Dec 2008 11:14:24 +0100:
| Do not use the slime-autodoc contrib, or alternatively, set | `slime-use-autodoc-mode' to nil.
Shouldn't `slime-autodoc-mode' be buffer local? I'm used to eldoc which you turn explicitly in one buffer. You toggle it off using the same function.
With slime-autodoc the global value gets toggled each time you call M-x slime-autodoc-mode. This behaviour was very confusing.
BTW You need the following chane if you want to allow M-x set-variable slime-use-autodoc-mode
-- Madhu
index 5ecb5c9..03c98b2 100644 --- a/contrib/slime-autodoc.el +++ b/contrib/slime-autodoc.el @@ -20,7 +20,7 @@ (require 'slime-enclosing-context)
(defvar slime-use-autodoc-mode t - "When non-nil always enable slime-autodoc-mode in slime-mode.") + "*When non-nil always enable slime-autodoc-mode in slime-mode.")
(defun slime-fontify-string (string) "Fontify STRING as `font-lock-mode' does in Lisp mode."
Madhu enometh@meer.net writes:
- "Tobias C. Rittweiler" 87bpvwqk1r.fsf@freebits.de :
Wrote on Mon, 01 Dec 2008 11:14:24 +0100:
| Do not use the slime-autodoc contrib, or alternatively, set | `slime-use-autodoc-mode' to nil.
Shouldn't `slime-autodoc-mode' be buffer local? I'm used to eldoc which you turn explicitly in one buffer. You toggle it off using the same function.
With slime-autodoc the global value gets toggled each time you call M-x slime-autodoc-mode. This behaviour was very confusing.
Patch welcome!
-T.
* "Tobias C. Rittweiler" 874p1io355.fsf@freebits.de : Wrote on Fri, 05 Dec 2008 20:03:50 +0100:
| Madhu enometh@meer.net writes: | |> * "Tobias C. Rittweiler" 87bpvwqk1r.fsf@freebits.de : |> Wrote on Mon, 01 Dec 2008 11:14:24 +0100: |> |> | Do not use the slime-autodoc contrib, or alternatively, set |> | `slime-use-autodoc-mode' to nil. |> |> Shouldn't `slime-autodoc-mode' be buffer local? I'm used to eldoc which |> you turn explicitly in one buffer. You toggle it off using the same |> function. |> |> With slime-autodoc the global value gets toggled each time you call M-x |> slime-autodoc-mode. This behaviour was very confusing. | | Patch welcome!
This is hardly fair! :) I never use the mode, but made the observation when it was turned on. But since you asked! Here is a patch that removes the timer business and uses the eldoc mechanism instead by setting eldoc-documentation-function to a modified slime-autodoc. You can toggle it off per buffer with M-x eldoc-mode
Now I can complain how slime devs always reject ALL my patches. :)
[I noticed some deps on autodoc other slime contribs like typeout frame which I have not checked. Also this does not fix a bug which causes the value of `slime-modeline-update-timer' to be displayed in the minibuffer. If I were to fix that, I'd rewrite the update-modeline mechanism too. So this is just a proof of concept patch]
-- Madhu :)
Madhu enometh@meer.net writes:
This is hardly fair! :) I never use the mode, but made the observation when it was turned on. But since you asked! Here is a patch that removes the timer business and uses the eldoc mechanism instead by setting eldoc-documentation-function to a modified slime-autodoc. You can toggle it off per buffer with M-x eldoc-mode
Thanks for the suggestion. Slime's autodoc is now implemented on top of Emacs' ElDoc.
-T.
* "Nikodemus Siivola" 633d72b0812010050l11be3cd8p871f0e2a8dbe38c7@mail.gmail.com : Wrote on Mon, 1 Dec 2008 10:50:07 +0200:
| An 80% solution might be being able to tell Slime to stop talking to | the lisp, except for communications triggered by explicit REPL | evaluations. Does this sound like a feasible idea? Any other | suggestions?
Using NIL for *COMMUNICATION-STYLE* might work, i.e. by specifying the `"read and process requests sequentially" communication style.' in SETUP-SERVER. -- Madhu