slime on github

Paul Bowyer pbowyer at olynet.com
Mon Jan 27 18:03:12 UTC 2014


On 01/26/2014 03:19 PM, João Távora wrote:
> Paul Bowyer <pbowyer at olynet.com> writes:
>
>> Do I have some configuration issues, or is there some reason I can no
>> longer use the *inferior-lisp* buffer for direct entry of lisp
>> commands?
> Hi Paul,
>
> I still can't reproduce. To be sure, let's agree on the test case
>
>      (setq inferior-lisp-program "sbcl")
>      (add-to-list 'load-path "/path/to/slime")
>      (require 'slime-autoloads)
>      (setq slime-contribs '(slime-fancy)) ;; or do you have slime-repl?
>      M-x slime
>      switch to *inferior lisp* buffer
>      type (sb-ext:describe-compiler-policy) and RET
>
> I'm doing this with emacs 23 and everything works as expected. Are you
> using the very latest slime? Some days ago I fixed some failing repl
> tests.
>
> That said, my best bet is that some strange interaction might be trying
> to overwrite the REPL prompt in slime-repl.el, which has been recently
> marked as read-only.
>
> Maybe this fix is in order, It simply binds inhibit-read-only to nil
> around slime-repl-emit's activities.
>
> But I would like to reproduce before I push it.
>
> diff --git a/contrib/slime-repl.el b/contrib/slime-repl.el
> index 2d74e94..77bc0eb 100644
> --- a/contrib/slime-repl.el
> +++ b/contrib/slime-repl.el
> @@ -262,22 +262,23 @@ This is set to nil after displaying the buffer.")
>   
>   (defun slime-repl-emit (string)
>     ;; insert the string STRING in the output buffer
> -  (with-current-buffer (slime-output-buffer)
> -    (save-excursion
> -      (goto-char slime-output-end)
> -      (slime-save-marker slime-output-start
> -        (slime-propertize-region '(face slime-repl-output-face
> -                                        slime-repl-output t
> -                                        rear-nonsticky (face))
> -          (insert-before-markers string)
> -          (when (and (= (point) slime-repl-prompt-start-mark)
> -                     (not (bolp)))
> -            (insert-before-markers "\n")
> -            (set-marker slime-output-end (1- (point)))))))
> -    (when slime-repl-popup-on-output
> -      (setq slime-repl-popup-on-output nil)
> -      (display-buffer (current-buffer)))
> -    (slime-repl-show-maximum-output)))
> +  (let ((inhibit-read-only t))
> +    (with-current-buffer (slime-output-buffer)
> +      (save-excursion
> +	(goto-char slime-output-end)
> +	(slime-save-marker slime-output-start
> +	  (slime-propertize-region '(face slime-repl-output-face
> +					  slime-repl-output t
> +					  rear-nonsticky (face))
> +	    (insert-before-markers string)
> +	    (when (and (= (point) slime-repl-prompt-start-mark)
> +		       (not (bolp)))
> +	      (insert-before-markers "\n")
> +	      (set-marker slime-output-end (1- (point)))))))
> +      (when slime-repl-popup-on-output
> +	(setq slime-repl-popup-on-output nil)
> +	(display-buffer (current-buffer)))
> +      (slime-repl-show-maximum-output))))
>   
>   (defun slime-repl-emit-result (string &optional bol)
>     ;; insert STRING and mark it as evaluation result
>
>
>
>
>
Hi João,

I tried exactly what you said and when I entered 
(sb-ext:describe-compiler-policy) in the *inferior lisp* buffer, the 
output from that command showed up in the REPL, not in the *inferior 
lisp* buffer where I thought it should go.
Also, I can no longer clear the *inferior lisp* buffer by selecting 
everything and pressing the Delete key, which I was able to do with my 
original .emacs file.

My Emacs is a package that comes with Linux Mint 14 and looks like it 
originated with Debian. The startup page shows:
"This is GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12) of 
2012-09-22 on allspice, modified by Debian"
There might be something non-standard about my Emacs-23 package...
I also have Emacs-24-something available, but I'm semi-familiar with 
Emacs-23 so I stay with it rather than relearning the idiosyncrasies of 
Emacs-24.

There must be something going on with my original .emacs file that was 
causing the problem with the error messages. Rather than having you look 
at it, I'll fiddle with it using what you sent as the starting point and 
add things a little at a time to see where the error occurs.

Thanks,

Paul Bowyer







More information about the slime-devel mailing list