Helmut Eller | 1 Oct 2011 11:44

Daily ChangeLog diff

Index: slime/contrib/ChangeLog
diff -u slime/contrib/ChangeLog:1.492 slime/contrib/ChangeLog:1.494
--- slime/contrib/ChangeLog:1.492	Mon Sep 12 09:23:59 2011
+++ slime/contrib/ChangeLog	Fri Sep 30 19:32:58 2011
 <at>  <at>  -1,3 +1,14  <at>  <at> 
+2011-10-01  Stas Boukarev  <stassats <at> gmail.com>
+
+	* slime-fuzzy.el (slime-fuzzy-done): Fix completion in the minibuffer.
+
+2011-10-01  Stas Boukarev  <stassats <at> gmail.com>
+
+	* swank-asdf.lisp (xref-doit): Guard against using on things
+	other than symbols and strings. slime-edit-uses may call it on
+	(setf function), and it'll pop into the debugger.
+	Report by Bart Botta.
+
 2011-09-12  Christophe Rhodes  <csr21 <at> cantab.net>

 	* slime-media.el (slime-dispatch-media-event): allow swank to

Helmut Eller | 2 Oct 2011 11:44

Daily ChangeLog diff

Index: slime/contrib/ChangeLog
diff -u slime/contrib/ChangeLog:1.494 slime/contrib/ChangeLog:1.495
--- slime/contrib/ChangeLog:1.494	Fri Sep 30 19:32:58 2011
+++ slime/contrib/ChangeLog	Sat Oct  1 12:45:54 2011
 <at>  <at>  -1,5 +1,10  <at>  <at> 
 2011-10-01  Stas Boukarev  <stassats <at> gmail.com>

+	* slime-repl.el (slime-repl-set-package): Don't redisplay the
+	prompt if it doesn't change.
+
+2011-10-01  Stas Boukarev  <stassats <at> gmail.com>
+
 	* slime-fuzzy.el (slime-fuzzy-done): Fix completion in the minibuffer.

 2011-10-01  Stas Boukarev  <stassats <at> gmail.com>

Max Mikhanosha | 3 Oct 2011 01:04

Patch: Fix defmethod arglist when using closer-mop

When inside a package that uses closer-mop, defmethod does not display
generic function arglist.

Testcase:

(defpackage :foo (:use :closer-common-lisp :sb-gray))
(in-package :foo)

Type "(defmethod stream-read-char (" into REPL

Message area displays: "(defmethod name &body body)
Expected result is: "(defmethod stream-read-char (stream) &body body)

Fix:

*** swank-arglists.lisp.~1.70.~	2011-06-06 10:02:49.000000000 -0400
--- swank-arglists.lisp	2011-10-02 19:01:11.246673986 -0400
***************
*** 1544,1547 ****
--- 1544,1551 ----
  (test-print-arglist)
  (test-arglist-ref)

+ #+closer-mop
+ (defmethod arglist-dispatch ((operator (eql 'closer-mop:defmethod)) arguments)
+   (arglist-dispatch 'cl:defmethod arguments))
+ 
  (provide :swank-arglists)

(Continue reading)

Anton Kovalenko | 3 Oct 2011 01:47
Favicon

Re: Patch: Fix defmethod arglist when using closer-mop

Max Mikhanosha <max <at> openchat.com> writes:

> Message area displays: "(defmethod name &body body)
> Expected result is: "(defmethod stream-read-char (stream) &body body)
>

The problem is real, but the fix below may be improved: as it is, it
depends on closer-mop being loaded before swank is compiled.
We could avoid this unfortunate requirement by looking up closer-mop
package dynamically (probably in :around method).

> Fix:

[...]

> + #+closer-mop
> + (defmethod arglist-dispatch ((operator (eql 'closer-mop:defmethod)) arguments)
> +   (arglist-dispatch 'cl:defmethod arguments))

[...]

--

-- 
Regards, Anton Kovalenko
+7(916)345-34-02 | Elektrostal' MO, Russia

Max Mikhanosha | 3 Oct 2011 02:36

Re: Patch: Fix defmethod arglist when using closer-mop

Anton Kovalenko wrote:
> 
> Max Mikhanosha <max <at> openchat.com> writes:
> 
> > Message area displays: "(defmethod name &body body)
> > Expected result is: "(defmethod stream-read-char (stream) &body body)
> >
> 
> The problem is real, but the fix below may be improved: as it is, it
> depends on closer-mop being loaded before swank is compiled.
> We could avoid this unfortunate requirement by looking up closer-mop
> package dynamically (probably in :around method).

Redone using around method, works when closer-mop is loaded after
slime... See next email also that implements same thing for (def
(method flags)) type packages, not for inclusion but just as a snippet
if someone has same problem.

*** swank-arglists.lisp.~1.70.~	2011-06-06 10:02:49.000000000 -0400
--- swank-arglists.lisp	2011-10-02 20:29:03.348728948 -0400
***************
*** 1544,1547 ****
--- 1544,1556 ----
  (test-print-arglist)
  (test-arglist-ref)

+ (defmethod arglist-dispatch :around ((operator t) arguments)
+   (let* ((closer-package (find-package :closer-mop))
+          (closer-defmethod (when closer-package
+                              (find-symbol (symbol-name 'cl:defmethod)
(Continue reading)

Max Mikhanosha | 3 Oct 2011 02:42

(def (method ...)) arglist

For folks using cl-def, definer, and other packages that have the (def
(method flags) method-name) syntax, the following snippet added to
~/.swank.lisp will start using method arguments in the message
area. Replace demacs:def with the correct package name, if you are not
using demacs.

(swank:swank-require :swank-arglists)
(in-package :swank)

(defmethod arglist-dispatch ((operator (eql 'demacs:def)) arguments)
  (flet ((is-method (elem)
           (or (eq elem 'method)
               (and (consp elem)
                    (eq (car elem) 'method)))))
    (match (cons operator arguments)
      (('demacs:def (#'is-method elem) (#'function-exists-p gf-name) . rest)
       (let ((gf (fdefinition gf-name)))
         (when (typep gf 'generic-function)
           (with-available-arglist (arglist) (decode-arglist (arglist gf))
             (let ((qualifiers (loop for x in rest
                                  until (or (listp x) (empty-arg-p x))
                                  collect x)))
               (return-from arglist-dispatch
                 (make-arglist :provided-args `(method ,gf-name , <at> qualifiers)
                               :required-args `(,arglist)
                               :rest "body" :body-p t)))))))
      (_))                              ; Fall through
    )
  (call-next-method))

(Continue reading)

ishi soichi | 6 Oct 2011 11:08
Picon

Error: Searching for program: no such file or directory, sbcl

my environment:

MacOSX SnowLeopard
Cocoa Emacs 23.2
SBCL 1.0.51.0-a546163
Slime latest (I think...)

The installation of sbcl is fine.  I can launch sbcl in terminal.
But when launching slime in Emacs, it give an error 

Searching for program: no such file or directory, sbcl

Can anyone tell my what's wrong with my setting?

in .emacs file, I have written the following.
;;-------------
(setq inferior-lisp-program "/usr/local/bin/sbcl --noinform")
(setq slime-lisp-implementations
      '((sbcl ("sbcl") :coding-system utf-8-unix)
(cmucl ("cmucl") :coding-system iso-latin-1-unix)))
(add-to-list 'load-path "~/.emacs.d/slime")
(add-hook 'lisp-mode-hook (lambda ()
                            (slime-mode t)
                            (show-paren-mode)))
(require 'slime) 
(slime-setup) 
;;-----------

Thanks in advance,

soichi
<div>
<p>my environment:</p>
<div>MacOSX SnowLeopard</div>
<div>Cocoa Emacs 23.2</div>
<div><div>SBCL 1.0.51.0-a546163</div></div>
<div>Slime latest (I think...)</div>
<div><br></div>
<div>The installation of sbcl is fine. &nbsp;I can launch sbcl in terminal.</div>
<div>But when launching slime in Emacs, it give an error&nbsp;</div>
<div><br></div>
<div><div>Searching for program: no such file or directory, sbcl</div></div>
<div><br></div>
<div>Can anyone tell my what's wrong with my setting?</div>
<div><br></div>
<div>in .emacs file, I have written the following.</div>
<div>;;-------------</div>
<div>
<div>(setq inferior-lisp-program "/usr/local/bin/sbcl --noinform")</div>
<div>(setq slime-lisp-implementations</div>
<div>&nbsp; &nbsp; &nbsp; '((sbcl ("sbcl") :coding-system utf-8-unix)</div>
<div>
<span class="Apple-tab-span">	</span>(cmucl ("cmucl") :coding-system iso-latin-1-unix)))</div>
<div>(add-to-list 'load-path "~/.emacs.d/slime")</div>
<div>(add-hook 'lisp-mode-hook (lambda ()</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (slime-mode t)</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (show-paren-mode)))</div>
<div>(require 'slime)&nbsp;</div>
<div>(slime-setup)&nbsp;</div>
<div>
;;-----------</div>
</div>
<div><br></div>
<div>Thanks in advance,</div>
<div><br></div>
<div>soichi</div>
</div>
Helmut Eller | 6 Oct 2011 11:44

Daily ChangeLog diff

Index: slime/ChangeLog
diff -u slime/ChangeLog:1.2217 slime/ChangeLog:1.2218
--- slime/ChangeLog:1.2217	Wed Sep 28 09:49:53 2011
+++ slime/ChangeLog	Wed Oct  5 04:58:00 2011
 <at>  <at>  -1,3 +1,8  <at>  <at> 
+2011-10-05  Stas Boukarev  <stassats <at> gmail.com>
+
+	* swank.lisp (clear-repl-variables): New functions, clears *, /,
+	and + variables.
+
 2011-09-28  Stas Boukarev  <stassats <at> gmail.com>

 	* slime.el: Remove (require 'hideshow), it's not used anymore.
Index: slime/contrib/ChangeLog
diff -u slime/contrib/ChangeLog:1.495 slime/contrib/ChangeLog:1.498
--- slime/contrib/ChangeLog:1.495	Sat Oct  1 12:45:54 2011
+++ slime/contrib/ChangeLog	Wed Oct  5 07:17:59 2011
 <at>  <at>  -1,3 +1,24  <at>  <at> 
+2011-10-05  Stas Boukarev  <stassats <at> gmail.com>
+
+	* slime-autodoc.el (slime-autodoc): Don't cache variable values.
+	(slime-autodoc-global-at-point): Remove, unused.
+
+2011-10-05  Stas Boukarev  <stassats <at> gmail.com>
+
+	* slime-repl.el (slime-clear-repl-variables): New function, clears *, /,
+	and + variables.
+	(slime-repl-clear-buffer-hook): Add `slime-clear-repl-variables'
+	to it, now C-c M-o clears variables, allowing bound objects to be GCed.
+
+2011-10-05  Anton Kovalenko  <anton <at> sw4me.com>
+
+	* swank-asdf.lisp (asdf-system-directory): preserve
+	pathname-device and use NAMESTRING for final conversion, so both
+	device and directory are passed to SLIME. It is required e.g. on
+	MS Windows with implementations using PATHNAME-DEVICE for drive
+	letters (SBCL); intended to be portable and useful on every
+	platform where DEVICE is important.
+
 2011-10-01  Stas Boukarev  <stassats <at> gmail.com>

 	* slime-repl.el (slime-repl-set-package): Don't redisplay the

Zach Kost-Smith | 7 Oct 2011 02:25
Picon

Tramp + slime + multiple connections bug

Well, I don't know if you consider it a but, but it sure seems like it.  If you have a Tramp translations set up via Slime, it matches the translation off of the value given by (machine-instance).  All is fine and good except that if you try to start a new local connection with `M-x slime' and your computer doesn't have the same (machine-instance) as the remote Lisp, Tramp gets confused as it uses the current connection to evaluate (machine-instance), then uses that to calculate the translation and it uses that translation to change the value used in the Swank load form for the new local Lisp image:

(progn (load <<some-tramp-mangled-path>> :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") <<some-other-mangled-path>> :coding-system "utf-8-unix"))

This makes the slime startup die at:

debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread #<THREAD
                                                           "initial thread" RUNNING
                                                            {1002941271}>:
  Couldn't load <<mangled>>: file does not exist.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(LOAD
 <<mangled>> :VERBOSE
 T
 :PRINT
 NIL
 :IF-DOES-NOT-EXIST
 T
 :EXTERNAL-FORMAT
 :DEFAULT)
0]

It would be nice if Slime by-passed Tramp completely on startup when invoked via `M-x Slime' (and perhaps always?).  I did this by wrapping the SLIME body with a binding setting SLIME-FILENAME-TRANSLATIONS to nil, and I think it works.  Here is a patch (this is my first time doing this, but I generated with M-x diff-buffer-with-file from Emacs;  It is diffed against the probably pretty dated Slime, sorry):

diff -c /home/smithzv/quicklisp/dists/quicklisp/software/slime-20110829-cvs/slime.el /tmp/buffer-content-14752oJk
*** /home/smithzv/quicklisp/dists/quicklisp/software/slime-20110829-cvs/slime.el    2011-09-02 13:42:13.982182004 -0600
--- /tmp/buffer-content-14752oJk    2011-10-06 18:21:02.031020994 -0600
***************
*** 1076,1082 ****
  (defun slime (&optional command coding-system)
    "Start an inferior^_superior Lisp and connect to its Swank server."
    (interactive)
!   (let ((inferior-lisp-program (or command inferior-lisp-program))
          (slime-net-coding-system (or coding-system slime-net-coding-system)))
      (slime-start* (cond ((and command (symbolp command))
                           (slime-lisp-options command))
--- 1076,1083 ----
  (defun slime (&optional command coding-system)
    "Start an inferior^_superior Lisp and connect to its Swank server."
    (interactive)
!   (let ((slime-filename-translations nil)
!         (inferior-lisp-program (or command inferior-lisp-program))
          (slime-net-coding-system (or coding-system slime-net-coding-system)))
      (slime-start* (cond ((and command (symbolp command))
                           (slime-lisp-options command))

Diff finished.  Thu Oct  6 18:21:02 2011

<div><p>Well, I don't know if you consider it a but, but it sure seems like it.&nbsp; If you have a Tramp translations set up via Slime, it matches the translation off of the value given by (machine-instance).&nbsp; All is fine and good except that if you try to start a new local connection with `M-x slime' and your computer doesn't have the same (machine-instance) as the remote Lisp, Tramp gets confused as it uses the current connection to evaluate (machine-instance), then uses that to calculate the translation and it uses that translation to change the value used in the Swank load form for the new local Lisp image:<br><br>(progn (load &lt;&lt;some-tramp-mangled-path&gt;&gt; :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") &lt;&lt;some-other-mangled-path&gt;&gt; :coding-system "utf-8-unix"))<br><br>This makes the slime startup die at:<br><br>debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread #&lt;THREAD<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "initial thread" RUNNING<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {1002941271}&gt;:<br>

&nbsp; Couldn't load &lt;&lt;mangled&gt;&gt;: file does not exist.<br><br>Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.<br><br>restarts (invokable by number or by possibly-abbreviated name):<br>&nbsp; 0: [ABORT] Exit debugger, returning to top level.<br><br>(LOAD<br>&nbsp;&lt;&lt;mangled&gt;&gt; :VERBOSE<br>&nbsp;T<br>&nbsp;:PRINT<br>&nbsp;NIL<br>&nbsp;:IF-DOES-NOT-EXIST<br>&nbsp;T<br>&nbsp;:EXTERNAL-FORMAT<br>&nbsp;:DEFAULT)<br>0] <br><br>It would be nice if Slime by-passed Tramp completely on startup when invoked via `M-x Slime' (and perhaps always?).&nbsp; I did this by wrapping the SLIME body with a binding setting SLIME-FILENAME-TRANSLATIONS to nil, and I think it works.&nbsp; Here is a patch (this is my first time doing this, but I generated with M-x diff-buffer-with-file from Emacs;&nbsp; It is diffed against the probably pretty dated Slime, sorry):<br><br>diff -c /home/smithzv/quicklisp/dists/quicklisp/software/slime-20110829-cvs/slime.el /tmp/buffer-content-14752oJk<br>*** /home/smithzv/quicklisp/dists/quicklisp/software/slime-20110829-cvs/slime.el&nbsp;&nbsp;&nbsp; 2011-09-02 13:42:13.982182004 -0600<br>

--- /tmp/buffer-content-14752oJk&nbsp;&nbsp;&nbsp; 2011-10-06 18:21:02.031020994 -0600<br>***************<br>*** 1076,1082 ****<br>&nbsp; (defun slime (&amp;optional command coding-system)<br>&nbsp;&nbsp;&nbsp; "Start an inferior^_superior Lisp and connect to its Swank server."<br>

&nbsp;&nbsp;&nbsp; (interactive)<br>!&nbsp;&nbsp; (let ((inferior-lisp-program (or command inferior-lisp-program))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (slime-net-coding-system (or coding-system slime-net-coding-system)))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (slime-start* (cond ((and command (symbolp command))<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (slime-lisp-options command))<br>--- 1076,1083 ----<br>&nbsp; (defun slime (&amp;optional command coding-system)<br>&nbsp;&nbsp;&nbsp; "Start an inferior^_superior Lisp and connect to its Swank server."<br>

&nbsp;&nbsp;&nbsp; (interactive)<br>!&nbsp;&nbsp; (let ((slime-filename-translations nil)<br>!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (inferior-lisp-program (or command inferior-lisp-program))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (slime-net-coding-system (or coding-system slime-net-coding-system)))<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (slime-start* (cond ((and command (symbolp command))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (slime-lisp-options command))<br><br>Diff finished.&nbsp; Thu Oct&nbsp; 6 18:21:02 2011<br><br></p></div>
Anton Kovalenko | 7 Oct 2011 03:02
Favicon

Re: Tramp + slime + multiple connections bug

Zach Kost-Smith <zachkostsmith <at> gmail.com> writes:

> Well, I don't know if you consider it a but, but it sure seems like
> it.  If you have a Tramp translations set up via Slime, it matches the
> translation off of the value given by (machine-instance).  All is fine
> and good except that if you try to start a new local connection with
> `M-x slime' and your computer doesn't have the same (machine-instance)
> as the remote Lisp, Tramp gets confused as it uses the current
> connection to evaluate (machine-instance), then uses that to calculate
> the translation and it uses that translation to change the value used
> in the Swank load form for the new local Lisp image:

For anyone who decides the fate of this bug report:

I've filed a bug report on this issue 6 months ago
<https://bugs.launchpad.net/slime/+bug/756691>. Please adjust its status
to reflect your decision also.

--

-- 
Regards, Anton Kovalenko
+7(916)345-34-02 | Elektrostal' MO, Russia

_______________________________________________
slime-devel site list
slime-devel <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/slime-devel

Gmane