Custom Search
|
Date: February 27, 2006
From: Didier Verna <didier@xxxxxxxxxxxxx>
Hi !
I was wondering about the status of the slime stepper: I've seen one or two
posts about it on this list, but it was like 17 weeks ago. So is it still an
active project ? Is it usable ?
Thanks a lot.
--
Didier Verna, didier@xxxxxxxxxxxxx, http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France Fax.+33 (1) 53 14 59 22 didier@xxxxxxxxxx
Date: February 26, 2006
From: Antonio Menezes Leitao <aml@xxxxxxxxxxxxxx>
Hi,
I would like to report a small problem in Slime. Here is the
scenario:
1. On a lisp file, change one definition and slime-compile-defun it
(C-c C-c).
2. Save the changed buffer.
3. Kill the saved buffer.
4. slime-edit-definition for the changed definition.
5. Emacs complains that it is trying to set-buffer on a non-existent
buffer.
This occurs with, at least, SBCL, CMUCL, and Allegro.
As far as I can see, the problem is that the implementation of
swank-compile-string (which is used by slime-compile-defun) ignores
the buffer's filename-directory and this makes it impossible for emacs
to recover the correct file. I agree that when we are using a buffer
that is not connected to a file, that's the proper behavior. However,
IMHO, that's not a frequent situation.
To solve this problem for Allegro, I made the following quick (and
ugly) hack in swank-allegro.lisp:
(defimplementation swank-compile-string (string &key buffer position directory)
;; We store the source buffer in excl::*source-pathname* as a string
;; of the form <buffername>;<start-offset>. Quite ugly encoding, but
;; the fasl file is corrupted if we use some other datatype.
(with-compilation-hooks ()
(let ((*buffer-name* buffer)
(*buffer-start-position* position)
(*buffer-string* string)
(*default-pathname-defaults*
(if directory
(merge-pathnames (pathname directory))
*default-pathname-defaults*)))
(compile-from-temp-file
(format nil "~S ~S~%~A"
`(in-package ,(package-name *package*))
`(eval-when (:compile-toplevel :load-toplevel)
(setq excl::*source-pathname*
,(format nil "~A~A;~D" (or directory "") buffer position)))
string)))))
Then, to recover the source pathname, I changed the following
function:
(defun find-definition-in-buffer (filename)
(let ((directory-p (find #\/ filename :from-end t)))
(let ((pos (position #\; filename :from-end t)))
(multiple-value-bind (name position)
(values (subseq filename 0 pos) (parse-integer (subseq filename (1+
pos))))
(make-location
(if directory-p (list :file name) (list :buffer name))
(list :position position))))))
As I said before, it's not a pretty solution :-)
Best regards,
António Leitão.
Date: February 26, 2006
From: Marco Baringer <mb@xxxxxxx>
References:
<dtpkkq$g2c$1@xxxxxxxxxxxxx> <871wxrlbj6.fsf@xxxxxxxxxxxxxxx>
Helmut Eller <heller@xxxxxxxxxxxxxxx> writes: > * Marco Baringer [2006-02-25 14:04+0100] writes: > >> hi, >> >> the attached patch provides a function, slmie-macroexpand-in-place, > > I think you forgot the attachment :-) oops. >> which does exactly what slmie-macroexpand-1 does but replaces the text >> of the form with its expansion. i've found this very usefull in a *SLME >> Macroexpansion* buffer and i plan on commiting it. however i don't know >> what keys to bind it to. >> >> is there a way to create a minor-mode such that the >> slime-macroexpand-1-in-place and slime-macroexpand-all-in-place are >> bound to the same keys as what the user has bound slime-macroexpand-1 >> and slmie-macroexpand-all to? > > Not that I know of. But `where-is' or `where-is-internal' may be > good enough to do it yourself. the attached patch attempts to do this, tell me what you think.
? changes
? macroexpand-inplace.diff
? slime-patch.el
? swank-loader.fas
? swank-loader.lib
? doc/contributors.texi
? doc/slime.aux
? doc/slime.cp
? doc/slime.dvi
? doc/slime.fn
? doc/slime.info
? doc/slime.ky
? doc/slime.log
? doc/slime.pdf
? doc/slime.pg
? doc/slime.ps
? doc/slime.toc
? doc/slime.tp
? doc/slime.vr
Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot//slime/slime.el,v
retrieving revision 1.588
diff -u -r1.588 slime.el
--- slime.el 25 Feb 2006 15:15:55 -0000 1.588
+++ slime.el 26 Feb 2006 13:58:43 -0000
@@ -7118,7 +7118,14 @@
nil
" temp"
'(("q" . slime-temp-buffer-quit)
- ("g" . slime-macroexpand-again)))
+ ("g" . slime-macroexpand-again))
+ (flet ((remap (from to)
+ (dolist (mapping (where-is-internal from slime-mode-map))
+ (define-key slime-macroexpansion-minor-mode-map
+ mapping
+ to))))
+ (remap 'slime-macroexpand-1 'slime-macroexpand-1-inplace)
+ (remap 'slime-macroexpand-all 'slime-macroexpand-all-inplace)))
(defvar slime-eval-macroexpand-expression nil
"Specifies the last macroexpansion preformed. This variable
@@ -7138,6 +7145,26 @@
(insert expansion)
(font-lock-fontify-buffer))))))
+(defun slime-eval-macroexpand-inplace (expander)
+ "Substitutes the current sexp at place with its macroexpansion.
+
+NB: Does not affect *slime-eval-macroexpand-expression*"
+ (interactive)
+ (lexical-let* ((string (slime-sexp-at-point-or-error))
+ (package (slime-current-package))
+ (start (point))
+ (end (+ start (length string)))
+ (buffer (current-buffer)))
+ (slime-eval-async
+ `(,expander ,string)
+ (lambda (expansion)
+ (with-current-buffer buffer
+ (let ((buffer-read-only nil))
+ (goto-char start)
+ (delete-region start end)
+ (insert expansion)
+ (goto-char start)))))))
+
(defun slime-macroexpand-1 (&optional repeatedly)
"Display the macro expansion of the form at point. The form is
expanded with CL:MACROEXPAND-1 or, if a prefix argument is given, with
@@ -7146,11 +7173,21 @@
(slime-eval-macroexpand
(if repeatedly 'swank:swank-macroexpand 'swank:swank-macroexpand-1)))
+(defun slime-macroexpand-1-inplace (&optional repeatedly)
+ (interactive "P")
+ (slime-eval-macroexpand-inplace
+ (if repeatedly 'swank:swank-macroexpand 'swank:swank-macroexpand-1)))
+
(defun slime-macroexpand-all ()
"Display the recursively macro expanded sexp at point."
(interactive)
(slime-eval-macroexpand 'swank:swank-macroexpand-all))
+(defun slime-macroexpand-all-inplace ()
+ "Display the recursively macro expanded sexp at point."
+ (interactive)
+ (slime-eval-macroexpand-inplace 'swank:swank-macroexpand-all))
+
(defun slime-compiler-macroexpand ()
"Display the compiler-macro expansion of sexp at point."
(interactive)
Index: doc/slime.texi
===================================================================
RCS file: /project/slime/cvsroot//slime/doc/slime.texi,v
retrieving revision 1.42
diff -u -r1.42 slime.texi
--- doc/slime.texi 14 Oct 2005 18:28:07 -0000 1.42
+++ doc/slime.texi 26 Feb 2006 13:58:44 -0000
@@ -123,6 +123,13 @@
* Inspector::
* Profiling::
+Programming Helpers
+
+* Completion::
+* Macro Expansion::
+* Accessing Documentation::
+* Disassembly::
+
REPL: the ``top level''
* REPL commands::
@@ -140,6 +147,7 @@
* slime-selector::
* slime-autodoc-mode::
+* slime-macroexpansion-minor-mode::
* Multiple connections::
* Typeout frames::
@@ -166,7 +174,7 @@
@SLIME{} is the ``Superior Lisp Interaction Mode for Emacs.''
@SLIME{} extends Emacs with new support for interactive programming in
-Common Lisp. The features are centred around @code{slime-mode}, an Emacs
+Common Lisp. The features are centered around @code{slime-mode}, an Emacs
minor-mode that complements the standard @code{lisp-mode}. While
@code{lisp-mode} supports editing Lisp source files, @code{slime-mode}
adds support for interacting with a running Common Lisp process for
@@ -620,6 +628,16 @@
@node Programming Helpers, Recovery, Documentation, Commands
@subsection Programming Helpers
+@menu
+* Completion::
+* Macro Expansion::
+* Accessing Documentation::
+* Disassembly::
+@end menu
+
+@node Completion, Macro Expansion, Programming Helpers, Programming Helpers
+@subsubsection Completion
+
@table @kbd
@kbditem{M-TAB, slime-complete-symbol}
Complete the symbol at point. Note that three styles of completion are
@@ -638,10 +656,6 @@
selected as the method of completion used for
@code{slime-complete-symbol}.
-@kbditem{SPC, slime-space}
-The space key inserts a space and also looks up and displays the
-argument list for the function at point, if there is one.
-
@kbditem{C-c C-s, slime-complete-form}
Looks up and inserts into the current buffer the argument list for the
function at point, if there is one. More generally, the command
@@ -669,7 +683,14 @@
(make-instance 'foo <C-c C-s>
--inserts--> :bar bar :blub blub initargs...)
@end example
+@end table
+
+@node Macro Expansion, Accessing Documentation, Completion, Programming Helpers
+@subsubsection Macro Expansion
+
+@xref{slime-macroexpansion-minor-mode}.
+@table @kbd
@kbditem{C-c C-m, slime-macroexpand-1}
Macroexpand the expression at point once. If invoked with a prefix
argument, use macroexpand instead of macroexpand-1.
@@ -681,10 +702,23 @@
Toggle tracing of the function at point. If invoked with a prefix
argument, read additional information, like which particular method
should be traced.
+@end table
+@node Accessing Documentation, Disassembly, Macro Expansion, Programming
Helpers
+@subsubsection Accessing Documentation
+
+@table @kbd
+@kbditem{SPC, slime-space}
+The space key inserts a space and also looks up and displays the
+argument list for the function at point, if there is one.
+@end table
+
+@node Disassembly, , Accessing Documentation, Programming Helpers
+@subsubsection Disassembly
+
+@table @kbd
@kbditem{C-c M-d, slime-disassemble-symbol}
Disassemble the function definition of the symbol at point.
-
@end table
@node Recovery, Cross-reference, Programming Helpers, Commands
@@ -1094,6 +1128,7 @@
@menu
* slime-selector::
* slime-autodoc-mode::
+* slime-macroexpansion-minor-mode::
* Multiple connections::
* Typeout frames::
@end menu
@@ -1133,7 +1168,7 @@
The macro @code{def-slime-selector-method} can be used to define new
buffers for @code{slime-selector} to find.
-@node slime-autodoc-mode, Multiple connections, slime-selector, Extras
+@node slime-autodoc-mode, slime-macroexpansion-minor-mode, slime-selector,
Extras
@section @code{slime-autodoc-mode}
@code{slime-autodoc-mode} is an additional minor-mode for
@@ -1149,7 +1184,26 @@
(slime-setup :autodoc t)
@end example
-@node Multiple connections, Typeout frames, slime-autodoc-mode, Extras
+@node slime-macroexpansion-minor-mode, Multiple connections,
slime-autodoc-mode, Extras
+@section slime-macroexpansion-minor-mode
+
+Within a slime macroexpansion buffer some extra commands are provided
+(these commands are always available but are only bound to keys in a
+macroexpansion buffer).
+
+@table @kbd
+@kbditem{C-c C-m, slime-macroexpand-1-inplace}
+Just like slime-macroexpand-1 but the original form is replaced with the
expansion.
+
+@kbditem{g, slime-macroexpand-1-inplace}
+The last macroexpansion is performed again, the current contents of
+the macroexpansion buffer are replaced with the new expansion.
+
+@kbditem{q, slime-temp-buffer-quit}
+Close the expansion buffer.
+@end table
+
+@node Multiple connections, Typeout frames, slime-macroexpansion-minor-mode,
Extras
@section Multiple connections
@SLIME{} is able to connect to multiple Lisp processes at the same
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
Date: February 25, 2006
From: Jonathon McKitrick <jcm@xxxxxxxxxxxxxxxxx>
Hi all, I'm just wondering... there are a handful of functions SLIME provides that are not implemented under sbcl. Is this going to happen anytime soon or at all? Several would be useful, but if sbcl ever implementes single-stepping, that feature would be invaluable. -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??"
Date: February 25, 2006
From: Austin Haas <austin@xxxxxxxxxxxxx>
In-reply-to:
<43FD0C27.40809@xxxxxxxxxxxxx>
References:
<43FD0C27.40809@xxxxxxxxxxxxx>
My bad. I didn't have "threads" in my Gentoo USE flags, so sbcl wasn't compiled with threads.
-austin Austin Haas wrote:
When starting slime (latest from CVS), the repl buffer is being shown with name:*slime-repl nil* It's also showing: ; Adding fd handler: 5 at the end of the *inferior-lisp* buffer, and: ; Adding fd handler: 6 CL-USER> CL-USER> at the start of the repl. I am using SBCL 0.9.9 on a Xen server.Is this a sign of a problem? I'm having trouble running a tbnl application (which runs fine on my local server) and this seemed to be the first clue towards something unusual.Thanks. -austin _______________________________________________ slime-devel site list slime-devel@xxxxxxxxxxxxxxx http://common-lisp.net/mailman/listinfo/slime-devel
Date: February 25, 2006
From: Helmut Eller <heller@xxxxxxxxxxxxxxx>
In-reply-to:
<dtpkkq$g2c$1@xxxxxxxxxxxxx> (Marco Baringer's message of "Sat, 25 Feb 2006 14:04:28 +0100")
References:
<dtpkkq$g2c$1@xxxxxxxxxxxxx>
* Marco Baringer [2006-02-25 14:04+0100] writes: > hi, > > the attached patch provides a function, slmie-macroexpand-in-place, I think you forgot the attachment :-) > which does exactly what slmie-macroexpand-1 does but replaces the text > of the form with its expansion. i've found this very usefull in a *SLME > Macroexpansion* buffer and i plan on commiting it. however i don't know > what keys to bind it to. > > is there a way to create a minor-mode such that the > slime-macroexpand-1-in-place and slime-macroexpand-all-in-place are > bound to the same keys as what the user has bound slime-macroexpand-1 > and slmie-macroexpand-all to? Not that I know of. But `where-is' or `where-is-internal' may be good enough to do it yourself. Helmut.
Date: February 25, 2006
From: "Tobias C. Rittweiler" <tcr@xxxxxxxxxxx>
References:
<dtpkkq$g2c$1@xxxxxxxxxxxxx>
Marco Baringer <mb@xxxxxxx> writes: > the attached patch provides a function, slmie-macroexpand-in-place, > which does exactly what slmie-macroexpand-1 does but replaces the text > of the form with its expansion. i've found this very usefull in a *SLME > Macroexpansion* buffer and i plan on commiting it. however i don't know > what keys to bind it to. Hey Marco, that sounds really great! I made a request for something on that line about a month ago in january: http://common-lisp.net/pipermail/slime-devel/2006-January/004525.html Personally, I'd like that `C-c C-m' or `C-c RET' respectively works in-place within the Macroexpansion buffer, and when prefixed a new Macroexpansion buffer is created as hinted at in my post above. -T.
Date: February 25, 2006
From: Marco Baringer <mb@xxxxxxx>
In-reply-to:
<8764n3602g.fsf@xxxxxxxxxxxxxxxxxxxxxxx>
References:
<dtpkkq$g2c$1@xxxxxxxxxxxxx> <8764n3602g.fsf@xxxxxxxxxxxxxxxxxxxxxxx>
Nikodemus Siivola wrote:
> Marco Baringer <mb@xxxxxxx> writes:
>
>> the attached patch provides a function, slmie-macroexpand-in-place,
>> which does exactly what slmie-macroexpand-1 does but replaces the text
>> of the form with its expansion. i've found this very usefull in a *SLME
>> Macroexpansion* buffer and i plan on commiting it. however i don't know
>> what keys to bind it to.
>
> Prefix argument to slime-macroexpand?
>
> So that C-c RET is slime-macroexpand, and
> C-u C-c RET is the new thing?
my plan, which may be a bit drastic, was to not bind these in slime-mode
and replace the bindings of slime-macroexand-(1|all) with the new things
in the slime-macroexpansion mode.
i'm guesing that if you're in a lisp buffer and you macroexpand you
don't ever want your code replaced with the expansion, and if you're
already in a macroexpansion buffer it's more helpfull to see the
expansion within the context of the outer macro. though this changing of
keybindings may be really counter-intuitive.
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
Date: February 25, 2006
From: Nikodemus Siivola <nikodemus@xxxxxxxxxxxxxxxx>
In-reply-to:
<dtpkkq$g2c$1@xxxxxxxxxxxxx> (Marco Baringer's message of "Sat, 25 Feb 2006 14:04:28 +0100")
References:
<dtpkkq$g2c$1@xxxxxxxxxxxxx>
Marco Baringer <mb@xxxxxxx> writes:
> the attached patch provides a function, slmie-macroexpand-in-place,
> which does exactly what slmie-macroexpand-1 does but replaces the text
> of the form with its expansion. i've found this very usefull in a *SLME
> Macroexpansion* buffer and i plan on commiting it. however i don't know
> what keys to bind it to.
Prefix argument to slime-macroexpand?
So that C-c RET is slime-macroexpand, and
C-u C-c RET is the new thing?
Just a though.
Cheers,
-- Nikodemus Schemer: "Buddha is small, clean, and serious."
Lispnik: "Buddha is big, has hairy armpits, and laughs."
Date: February 25, 2006
From: Marco Baringer <mb@xxxxxxx>
hi,
the attached patch provides a function, slmie-macroexpand-in-place,
which does exactly what slmie-macroexpand-1 does but replaces the text
of the form with its expansion. i've found this very usefull in a *SLME
Macroexpansion* buffer and i plan on commiting it. however i don't know
what keys to bind it to.
is there a way to create a minor-mode such that the
slime-macroexpand-1-in-place and slime-macroexpand-all-in-place are
bound to the same keys as what the user has bound slime-macroexpand-1
and slmie-macroexpand-all to?
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
Date: February 25, 2006
From: Mikel Bancroft <mutandiz@xxxxxxxxx>
In-reply-to:
<upsldirgw.fsf@xxxxxxxxxx>
References:
<dtlc2j$dkn$1@xxxxxxxxxxxxx> <uy801itl5.fsf@xxxxxxxxxx> <0798DCA8-8D98-4C78-A16F-6DA60E7B5E27@xxxxxxx> <upsldirgw.fsf@xxxxxxxxxx>
For the record, we've compiled a page on using SLIME and Allegro CL at http://www.franz.com/emacs/slime.lhtml -Mikel Bancroft Edi Weitz wrote:
On Thu, 23 Feb 2006 14:47:20 -0800, mikel evins <mevins@xxxxxxx> wrote:Thanks very much, Edi. I'll start with this.Bill Clementson reminded me that I forgot to post the contents of my ~/.slime.lisp file, so here it is: (load "c:/emacs/site-lisp/slime/swank-loader.lisp") #-clisp (swank::create-swank-server 4005 :spawn #'swank::simple-announce-function t) #+clisp (swank::create-swank-server 4005) The first line loads the stock swank-loader.lisp from SLIME. Thanks Bill... :)
Date: February 23, 2006
From: "Steven E. Harris" <seh@xxxxxxxxx>
References:
<dtlc2j$dkn$1@xxxxxxxxxxxxx> <uy801itl5.fsf@xxxxxxxxxx>
Edi Weitz <edi@xxxxxxxxxx> writes:
> I have this in my ~/.emacs file (basically copying from and old
> suggestion by Luke Gorrie) and it seems to work fine:
These are some refinements I was using with Allegro CL 7 and XEmacs on
Cygwin, but note that the allegro-ansi.exe program is not present in
the Trial Edition. The function slime-connect signals a file-error,
but there were other errors that were not to be ignored in such a
loop.
(defun start-allegro ()
(interactive)
(shell-command "/mnt/c/Program\\ Files/Allegro\\ Common\\ Lisp\\
7/allegro-ansi.exe +B +cm -L \"U:/start-slime.lisp\" &" nil)
(delete-other-windows)
(loop repeat 5
do (condition-case c
(progn (slime-connect "localhost" 4005)
(return t))
(file-error (sit-for 0.2)))
finally (message "Unable to connect to SLIME server.")))
The referenced file start-slime.lisp contained the following:
,----[ start-slime.lisp ]
| (load "C:/Program
Files/cygwin/usr/local/lib/common-lisp/slime-cvs/swank-loader.lisp")
| ;(asdf:operate 'asdf:load-op :swank)
| (swank:create-server :dont-close t)
`----
Note that I had given up trying to get ASDF to work with Allegro,
probably for lack of symlink support.
--
Steven E. Harris
Date: February 23, 2006
From: Edi Weitz <edi@xxxxxxxxxx>
In-reply-to:
<0798DCA8-8D98-4C78-A16F-6DA60E7B5E27@xxxxxxx> (mikel evins's message of "Thu, 23 Feb 2006 14:47:20 -0800")
References:
<dtlc2j$dkn$1@xxxxxxxxxxxxx> <uy801itl5.fsf@xxxxxxxxxx> <0798DCA8-8D98-4C78-A16F-6DA60E7B5E27@xxxxxxx>
On Thu, 23 Feb 2006 14:47:20 -0800, mikel evins <mevins@xxxxxxx> wrote: > Thanks very much, Edi. I'll start with this. Bill Clementson reminded me that I forgot to post the contents of my ~/.slime.lisp file, so here it is: (load "c:/emacs/site-lisp/slime/swank-loader.lisp") #-clisp (swank::create-swank-server 4005 :spawn #'swank::simple-announce-function t) #+clisp (swank::create-swank-server 4005) The first line loads the stock swank-loader.lisp from SLIME. Thanks Bill... :)
Date: February 23, 2006
From: "Bill Clementson" <billclem@xxxxxxxxx>
In-reply-to:
<8757cb490602231524s2c0f1259ld52df7036e782155@xxxxxxxxxxxxxx>
References:
<dtlc2j$dkn$1@xxxxxxxxxxxxx> <uy801itl5.fsf@xxxxxxxxxx> <8757cb490602231524s2c0f1259ld52df7036e782155@xxxxxxxxxxxxxx>
Hi Edi, > (start-lisp-and-wait "c:/PROGRA~1/acl80/alisp.exe +B +cm -L > ~/.slime.lisp&")) You neglected to mention the contents of the .slime.lisp file. It should contain at least the following 2 lines: (load "/path/to/slime/swank-loader.lisp") (swank::create-swank-server 4005) Cheers, Bill
Date: February 23, 2006
From: Edi Weitz <edi@xxxxxxxxxx>
In-reply-to:
<dtlc2j$dkn$1@xxxxxxxxxxxxx> (mikel@xxxxxxxxx's message of "Thu, 23 Feb 2006 14:13:39 -0800")
References:
<dtlc2j$dkn$1@xxxxxxxxxxxxx>
On Thu, 23 Feb 2006 14:13:39 -0800, mikel <mikel@xxxxxxxxx> wrote:
> Franz wants Peter Seibel's Lispbox to work with acl on Windows. The
> obstacle is that acl is not a console application on Windows, and
> doesn't provide a connection to standard input and standard output
> in the normal way. I've agreed to do a little legwork to find a way
> around this problem, and the first thing it occurred to me to do was
> to ask SLIME-devel what sort of connection support SLIME would need
> to connect to acl. Is it sufficient for the running acl to provide
> sockets, so that the lisp-side server can respond to the emacs-side
> SLIME protocol?
>
> What issues am I not thinking of in my naive view of this problem?
I have this in my ~/.emacs file (basically copying from and old
suggestion by Luke Gorrie) and it seems to work fine:
(defun start-lisp-and-wait (command-string)
(delete-other-windows)
(shell-command command-string)
(while (not (ignore-errors (slime-connect "localhost" 4005)))
(sit-for 0.2)))
(defun alisp ()
(interactive)
(start-lisp-and-wait "c:/PROGRA~1/acl80/alisp.exe +B +cm -L
~/.slime.lisp&"))
HTH,
Edi.
Date: February 23, 2006
From: Ian Eslick <eslick@xxxxxxxxxxxxx>
In-reply-to:
<dtlc2j$dkn$1@xxxxxxxxxxxxx>
References:
<dtlc2j$dkn$1@xxxxxxxxxxxxx>
When I used to work on Windows I always just launched ACL in a window and used slime-connect from emacs or xemacs. It's not as pretty as launching via M-x slime but I always work that way so I can restart emacs or my lisp separately (I have many long-running jobs). That's the quick & dirty answer to working on Windows. Ian mikel wrote: > Franz wants Peter Seibel's Lispbox to work with acl on Windows. The > obstacle is that acl is not a console application on Windows, and > doesn't provide a connection to standard input and standard output in > the normal way. I've agreed to do a little legwork to find a way > around this problem, and the first thing it occurred to me to do was > to ask SLIME-devel what sort of connection support SLIME would need to > connect to acl. Is it sufficient for the running acl to provide > sockets, so that the lisp-side server can respond to the emacs-side > SLIME protocol? > > What issues am I not thinking of in my naive view of this problem? > > _______________________________________________ > slime-devel site list > slime-devel@xxxxxxxxxxxxxxx > http://common-lisp.net/mailman/listinfo/slime-devel
Date: February 23, 2006
From: mikel <mikel@xxxxxxxxx>
What issues am I not thinking of in my naive view of this problem?
Date: February 23, 2006
From: Austin Haas <austin@xxxxxxxxxxxxx>
When starting slime (latest from CVS), the repl buffer is being shown with name: *slime-repl nil* It's also showing: ; Adding fd handler: 5 at the end of the *inferior-lisp* buffer, and: ; Adding fd handler: 6 CL-USER> CL-USER> at the start of the repl. I am using SBCL 0.9.9 on a Xen server.Is this a sign of a problem? I'm having trouble running a tbnl application (which runs fine on my local server) and this seemed to be the first clue towards something unusual.
Thanks. -austin
Date: February 18, 2006
From: "Tomi Neste" <tomi.neste@xxxxxxxxxx>
T. Neste
swank-ecl.diff
Description: Binary data
Date: February 18, 2006
From: "Quest NeoX" <mslugyfw@xxxxxxxxxxx>
Sometimes after the M-x slime
command, SLIME halt in the *inferior-lisp* buffer while
CLISP server is
already up. Then I must slime-abort-connection and slime-connect
manually.
The cause of halt is #'read encountered a zero-length
slime-swank-port-file
in the slime-read-swank-port function in slime.el.
The content of the port-file
has not been sync to the disk after CLISP
server create the file, but file-exists-p is T.
To avoid this problem,
we can add a file-length-gt-zero-p or sleep-for a while
after the
file-exists-p before the call.
Date: February 18, 2006
From: "Quest NeoX" <mslugyfw@xxxxxxxxxxx>
I'm running CLisp 2.38 + XEmacs + WinXP + SLIME(checkout form cvs yestoday).
The first time SLIME will compile, load and work properly.
But the
second time it will stop in the loading phase and
complain about can't
find source on "#P"D:\\XEmacs\\...".
The excerpt from swank-loader.lisp
>> (defun swank-source-files
(source-directory)
>> (mapcar (lambda
(name)
>>
(make-pathname :name name :type
"lisp"
>>
:directory (pathname-directory
>>
source-directory)))
>>
`("swank-backend" ,@*sysdep-files* "swank")))
need a part ":device
(pathname-device source-directory)" in CLISP.
end
Date: February 17, 2006
From: Matthias Koeppe <mkoeppe+slime@xxxxxxxxxxxxxxxxxxxxxxxxxx>
In-reply-to:
<uw5vevsi84c.fsf@xxxxxxxxxxxxxx> (Matthias Koeppe's message of "Mon, 06 Feb 2006 11:45:39 -0800")
References:
<uw5vevsi84c.fsf@xxxxxxxxxxxxxx>
I wrote: > I would like to install a new file, "sbcl-pprint-patch.lisp", into > SLIME CVS. It patches the SBCL pretty printer, so as to support > printing SLIME presentations through a pretty printing stream. The > file will only be loaded when a user loads the SLIME file > "present.lisp". I have installed it now. -- Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe (currently @math.ucdavis.edu)
Date: February 13, 2006
From: Harald Hanche-Olsen <hanche@xxxxxxxxxxxx>
In-reply-to:
<87hd73ut7r.fsf@xxxxxxxxxxxxxxx>
References:
<20060213.161335.72907102.hanche@xxxxxxxxxxxx> <87hd73ut7r.fsf@xxxxxxxxxxxxxxx>
+ Helmut Eller <heller@xxxxxxxxxxxxxxx>: | (slime-eval-async `(cl:lisp-implementation-type) | (lambda (x) (message "%S" x))) | | Note that slime-eval-async is intended to write SLIME commands and is | a bit picky what you put in the expression. Indeed, but I can live with that. It's just a question of packing it up into an elisp function that enforces the constraints. | > And, while we're at it, how about the backend lisp asking emacs to run | > some elisp code? | | swank::eval-in-emacs does that, but we use it rarely and the whole | Lisp->Emacs communication isn't very mature. E.g. | | (swank::eval-in-emacs '(emacs-version)) That works, but (swank::eval-in-emacs '(find-file "/tmp/foo")) killed the slime connection. (But it did run open a buffer on /tmp/foo first.) It also produced quite a lot of information in the *inferior-lisp* buffer. I have saved it in a file, so if anybody would like to see it, drop me a note. But I bet y'all can reproduce this yourselves. Wait, I think I see what is happening: The find-file returns the value #<buffer foo>, which is probably too hard to handle. But this works fine: (swank::eval-in-emacs '(progn (find-file "/tmp/foo") t)) Thanks for the help. - Harald
Date: February 13, 2006
From: Helmut Eller <heller@xxxxxxxxxxxxxxx>
In-reply-to:
<20060213.161335.72907102.hanche@xxxxxxxxxxxx> (Harald Hanche-Olsen's message of "Mon, 13 Feb 2006 16:13:35 +0100 (CET)")
References:
<20060213.161335.72907102.hanche@xxxxxxxxxxxx>
* Harald Hanche-Olsen [2006-02-13 16:13+0100] writes:
> Is there a convenient function for running bits of CL code (in the
> backend common lisp of course) from elisp?
>
> I've been playing around with slime-eval-with-transcript and
> slime-eval-async, with rather mixed success. Most commonly, I just
> get a protocol error and lose my slime connection.
>
> Am I looking in the wrong place, perhaps?
slime-eval-async is the recommended interface. E.g.
(slime-eval-async `(cl:lisp-implementation-type)
(lambda (x) (message "%S" x)))
Note that slime-eval-async is intended to write SLIME commands and is
a bit picky what you put in the expression. In particular you have to
package qualify all symbols (including CL symbols except nil and t).
If you forget the package, it's considered a read error and the
connection is terminated. By convention, the expression should look
like (SWANK:FUNCTION-NAME LITERAL ...) i.e. the arguments should only
be constants, but the convention isn't enforced (yet).
slime-eval is pretty much the same but waits for the result. slime-rex
is the low level interface for those few cases when you need some
special Emacs side error handling.
[Btw, those functions take a package argument which is only useful for
a few commands and I think it would be "cleaner" to include the
package in the SEXP instead.]
> And, while we're at it, how about the backend lisp asking emacs to run
> some elisp code? Most importantly, I want to be able to have the
> backend ask emacs to open a file, and perhaps move to a specified
> point in the file. I notice that the debugger seems able to do this,
> so surely, the functionality exist. But how accessible is it to the
> user?
swank::eval-in-emacs does that, but we use it rarely and the whole
Lisp->Emacs communication isn't very mature. E.g.
(swank::eval-in-emacs '(emacs-version))
Don't forget to set slime-enable-evaluate-in-emacs before you try it.
Helmut.
Date: February 13, 2006
From: Harald Hanche-Olsen <hanche@xxxxxxxxxxxx>
Is there a convenient function for running bits of CL code (in the backend common lisp of course) from elisp? I've been playing around with slime-eval-with-transcript and slime-eval-async, with rather mixed success. Most commonly, I just get a protocol error and lose my slime connection. Am I looking in the wrong place, perhaps? Why do I want this? Say I am editing some (non-lisp) file and then want to process it by feeding the filename to some function in the CL backend. I'd like to be able to just run something like (slime-eval-thing `(process-file ,(buffer-file-name)) ":cl-user") and have the backend lisp run (process-file "/foo/bar") or whatever. And, while we're at it, how about the backend lisp asking emacs to run some elisp code? Most importantly, I want to be able to have the backend ask emacs to open a file, and perhaps move to a specified point in the file. I notice that the debugger seems able to do this, so surely, the functionality exist. But how accessible is it to the user? - Harald
Date: February 13, 2006
From: Luke Gorrie <luke@xxxxxxxx>
References:
<EEF4860D-8C60-4866-9D13-5019256C2CF2@xxxxxxxxxxxxxxxx> <l3zmkwqrzt.fsf@xxxxxxxxxxxxxxx>
Luke Gorrie <luke@xxxxxxxx> writes: > Robert McAlpine <rmc@xxxxxxxxxxxxxxxx> writes: > >> ... and if at all possible I'd like to turn on syntax colouring in >> the REPL. > > Here is a sneaky way: > > (dolist (face (face-list)) > (when (string-match "^slime-repl" (symbol-name face)) > (copy-face 'default face))) *ahem*. I as thinking you wanted to turn /off/ colour in the REPL. Please disregard that message. :-)
Date: February 12, 2006
From: Luke Gorrie <luke@xxxxxxxx>
References:
<EEF4860D-8C60-4866-9D13-5019256C2CF2@xxxxxxxxxxxxxxxx>
Robert McAlpine <rmc@xxxxxxxxxxxxxxxx> writes:
> ... and if at all possible I'd like to turn on syntax colouring in
> the REPL.
Here is a sneaky way:
(dolist (face (face-list))
(when (string-match "^slime-repl" (symbol-name face))
(copy-face 'default face)))
Date: February 12, 2006
From: Taylor Campbell <campbell@xxxxxxxxxx>
The SLIME protocol currently provides, I believe, two operations for reading input from the Emacs user: the READ-STRING mechanism and a simple Y-OR-N-P device. In order to prompt the user for specific input, one must send a string to Emacs and then parse a string read from Emacs, but this is all line-oriented and provides no fancy input mechanisms on the user's side, such as completion, so it's hard to offer a convenient prompt to the user from the Lisp side, such as in restart functions. Does it sound like a good idea to define a (:PROMPT <prompt string> <input type>) RPC to be called from Lisp? For instance, a USE-VALUE restart might send (:PROMPT "Value to use instead:" EXPRESSION) to request input from the user, rather than printing the prompt directly to standard output and reading from standard input, as is usually done now. This way, Emacs would be given more leeway in presenting the prompt -- e.g., it might use the typein window instead of cluttering the REPL buffer --, and it would allow for completion, editing not restricted to lines (like the usual REPL prompt), &c. It is probably pretty easy to implement; I'll experiment with it soon, but I wondered what others thought about the matter.
Date: February 11, 2006
From: Helmut Eller <heller@xxxxxxxxxxxxxxx>
In-reply-to:
<87irrm15fl.fsf@xxxxxxxxxx> (Nicolas Lamirault's message of "Sat, 11 Feb 2006 12:49:18 +0100")
References:
<87irrm15fl.fsf@xxxxxxxxxx>
* Nicolas Lamirault [2006-02-11 12:49+0100] writes:
> but i have an error (file attached to this mail)
> someone know how can i do to use slime with detachtty ?
Apparently there's no *debug-io* if SBCL is started under detachtty.
SLIME writes the portnumber to *debug-io* but the debugger is invoked
because there's no *debug-io* but the debugger can't print anything
because there's no *debug-io* ...
Something like
detachtty --dribble-file /tmp/d --log-file /tmp/d
--pid-file /tmp/pid /tmp/socket
/usr/bin/sbcl --eval '(setq *debug-io* *standard-output*)'
--eval '(load "swank-loader.lisp")'
--eval '(swank:create-server)'
works here.
Helmut.
Date: February 11, 2006
From: Helmut Eller <heller@xxxxxxxxxxxxxxx>
In-reply-to:
<87ek2a15aa.fsf@xxxxxxxxxx> (Nicolas Lamirault's message of "Sat, 11 Feb 2006 12:52:29 +0100")
References:
<87ek2a15aa.fsf@xxxxxxxxxx>
* Nicolas Lamirault [2006-02-11 12:52+0100] writes: > hello, > > i must read a file encoded in utf-8 > if i read this file from sbcl started in an xterm, > i haven't got any error. > i try to make this operation in my SLIME environment, but i have an > error. > so i put this in my emacs's configuration : > > (setq slime-net-coding-system 'utf-8-unix) > > but after this i can't start slime > this is the error : > > Debugger entered--Lisp error: (cl-assertion-failed > default-enable-multibyte-characters) To use utf8 with SLIME you should set default-enable-multibyte-characters to t before connecting. It is true by default and if you aren't sure what it does, it's better to set it to t. Emacs uses two internal text representations and the distinction between those representation is, unfortunately, very visible at the Elisp level, e.g. weird things happen when a unibyte string is inserted in a multibyte buffer. To reduce such problems with SLIME, we enforce that default-enable-multibyte-characters is true (and that most text will be in multibyte representation). All this only applies to Emacs; XEmacs has apparently a much cleaner design in this regard. Helmut.
Date: February 11, 2006
From: Harald Hanche-Olsen <hanche@xxxxxxxxxxxx>
In-reply-to:
<87ek2a15aa.fsf@xxxxxxxxxx>
References:
<87ek2a15aa.fsf@xxxxxxxxxx>
+ Nicolas Lamirault <lam@xxxxxxxxxxxxx>:
| i must read a file encoded in utf-8
| if i read this file from sbcl started in an xterm,
| i haven't got any error.
| i try to make this operation in my SLIME environment, but i have an
| error.
You should always be able to read your utf-8 encoded file, no matter
what coding system you are using with slime. Just use
:external-format :utf-8 when opening the file. But if you wish to be
able to print bits of that file using utf-8 to the interaction stream,
you will need utf-8 support from slime, of course.
| so i put this in my emacs's configuration :
|
| (setq slime-net-coding-system 'utf-8-unix)
|
| but after this i can't start slime
FWIW, I don't use this variable in my setup. Instead I have this:
(setf slime-lisp-implementations
'((sbcl ("sbcl") :coding-system utf-8-unix)
(cmucl ("cmucl") :coding-system iso-latin-1-unix)))
and this works fine for me.
Make sure you have a recent slime (from 2006).
- Harald
Date: February 11, 2006
From: Nicolas Lamirault <lam@xxxxxxxxxxxxx>
hello, i must read a file encoded in utf-8 if i read this file from sbcl started in an xterm, i haven't got any error. i try to make this operation in my SLIME environment, but i have an error. so i put this in my emacs's configuration : (setq slime-net-coding-system 'utf-8-unix) but after this i can't start slime this is the error : Debugger entered--Lisp error: (cl-assertion-failed default-enable-multibyte-characters) signal(cl-assertion-failed (default-enable-multibyte-characters)) (or default-enable-multibyte-characters (signal (quote cl-assertion-failed) (list ...))) (progn (or default-enable-multibyte-characters (signal ... ...)) nil) (assert default-enable-multibyte-characters) (progn (assert default-enable-multibyte-characters)) (if (and (second props) (boundp ...)) (progn (assert default-enable-multibyte-characters))) (when (and (second props) (boundp ...)) (assert default-enable-multibyte-characters)) (let ((props ...)) (unless props (error "Invalid slime-net-coding-system: %s. %s" coding-system ...)) (when (and ... ...) (assert default-enable-multibyte-characters)) t) slime-check-coding-system(utf-8-unix) (let ((args ...)) (slime-check-coding-system coding-system) (when (or ... ...) (let ... ... ...))) (catch (quote --cl-block-slime-start--) (let (...) (slime-check-coding-system coding-system) (when ... ...))) (cl-block-wrapper (catch (quote --cl-block-slime-start--) (let ... ... ...))) (block slime-start (let (...) (slime-check-coding-system coding-system) (when ... ...))) (let* ((program ...) (program-args ...) (coding-system ...) (init ...) (name ...) (buffer ...)) (let (...) (while --cl-keys-- ...)) (block slime-start (let ... ... ...))) slime-start(:program "/usr/bin/sbcl" :program-args nil) apply(slime-start (:program "/usr/bin/sbcl" :program-args nil)) slime() call-interactively(slime) execute-extended-command(nil) call-interactively(execute-extended-command) have you got an idea for this problem ? thanks -- Nicolas Lamirault
Date: February 11, 2006
From: Nicolas Lamirault <lam@xxxxxxxxxxxxx>
hello, slime words very well with my Emacs configuration. I would like to use it with dettachtty, but i can't. i use : SBCL 0.9.7.1 and i have juste make a cvs update (last changelog entry 02/06/2006) so, i try to launch slime like this : $> detachtty --dribble-file /tmp/.dribble --log-file /tmp/.detachtty --pid-file /tmp/.pid /tmp/.socket \ /usr/bin/sbcl \ --eval "(push \"/home/nicolas/src/slime/\" asdf:*central-registry*)" \ --eval "(asdf:operate 'asdf:load-op :swank)" \ --eval "(setq swank:*use-dedicated-output-stream* nil)" --eval "(swank:create-swank-server 4008)" but i have an error (file attached to this mail) someone know how can i do to use slime with detachtty ? thanks for any help
dribble
Description: Binary data
-- Nicolas Lamirault
Date: February 10, 2006
From: Helmut Eller <heller@xxxxxxxxxxxxxxx>
In-reply-to:
<43E82456.2010002@xxxxxxxxxxxxx> (Ian Eslick's message of "Mon, 06 Feb 2006 23:38:46 -0500")
References:
<loom.20060207T032749-271@xxxxxxxxxxxxxx> <43E81FC1.8030706@xxxxxxxxxxxxx> <43E82456.2010002@xxxxxxxxxxxxx>
* Ian Eslick [2006-02-07 05:38+0100] writes: > In fact an even better solution, which I just employed and tested > locally, is to just create an allegro specific backend method for > inspect-for-emacs that handles the case over slot-boundp not calling > slot-boundp-using-class. We can address general MOP issues later if > enough backends have to go this route per Pascal's earlier e-mail. I did something like this in the CVS version. Helmut.
Date: February 10, 2006
From: Helmut Eller <heller@xxxxxxxxxxxxxxx>
In-reply-to:
<pan.2006.02.09.23.06.04.685454@xxxxxxxxxxxxxx> (darkness-keyword-gmane.42aa79@xxxxxxxxxxxxxx's message of "Thu, 09 Feb 2006 18:06:05 -0500")
References:
<pan.2006.02.09.23.06.04.685454@xxxxxxxxxxxxxx>
* darkness [2006-02-10 00:06+0100] writes: > The problem (as I see it) is that swank:macro-indent counts &optional as > an argument, rather than as a lambda list keyword. Below is a simple > patch against SLIME CVS. Thanks. I committed the patch. Helmut.
Date: February 10, 2006
From: Luke Gorrie <luke@xxxxxxxx>
References:
<1948894932.20060209124339@xxxxxxx>
Timofei Shatrov <grue@xxxxxxx> writes:
> I found a fix for a bug that plagued me for a long time. Whenever I
> was connected to Internet, Slime was consistently hanging Emacs cold.
> The bug apparently stems from make-network-process function of Emacs
> which demonstrates the same behavior. Anyway, there is a fix: replace
> all occurences of "127.0.0.1" in slime.el with "localhost" -
> surprisingly this solves the problem.
Can't win sometimes :-)
2004-06-30 Luke Gorrie <luke@xxxxxxxxxxxx>
* slime.el (slime-read-port-and-connect-to-running-swank)
(slime-connect, slime-open-stream-to-lisp): Replace "localhost"
with "127.0.0.1". This is believed to avoid unwanted DNS lookups
on certain operating systems. The lookups can become crippling if
the DNS server isn't available.
Which operating system are you using? Does e.g. 'telnet 127.0.0.1'
also have the same problem?
Date: February 09, 2006
From: darkness <darkness-keyword-gmane.42aa79@xxxxxxxxxxxxxx>
Greetings. I've got a macro like:
(defmacro tbf (&optional bar &body baz) ...)
With SLIME from CVS, this gets indented as:
(tbf (:arg value)
(form1)
(form2))
Whereas I think the correct indentation should be:
(tbf (:arg value)
(form1)
(form2))
The problem (as I see it) is that swank:macro-indent counts &optional as
an argument, rather than as a lambda list keyword. Below is a simple
patch against SLIME CVS.
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.360
diff -u -r1.360 swank.lisp
--- swank.lisp 6 Feb 2006 18:42:09 -0000 1.360
+++ swank.lisp 9 Feb 2006 17:16:26 -0000
@@ -4369,7 +4369,7 @@
(defun macro-indentation (arglist)
(if (well-formed-list-p arglist)
- (position '&body (clean-arglist arglist))
+ (position '&body (remove '&optional (clean-arglist arglist)))
nil))
(defun well-formed-list-p (list)
Date: February 09, 2006
From: Timofei Shatrov <grue@xxxxxxx>
I found a fix for a bug that plagued me for a long time. Whenever I was connected to Internet, Slime was consistently hanging Emacs cold. The bug apparently stems from make-network-process function of Emacs which demonstrates the same behavior. Anyway, there is a fix: replace all occurences of "127.0.0.1" in slime.el with "localhost" - surprisingly this solves the problem. -- Best regards, Timofei Shatrov mailto:grue@xxxxxxx
Date: February 08, 2006
From: Bradford W Miller <Bradford_W_Miller@xxxxxxxxxxxx>
I smell a project: http://www.rci.rutgers.edu/~cfs/472_html/Planning/PlanRecog.html Unfortunately, it's close enough to my day job I'd have IP problems doing the work. But I'd be happy to kibitz. -----Original Message----- From: slime-devel-bounces@xxxxxxxxxxxxxxx [mailto:slime-devel-bounces@xxxxxxxxxxxxxxx] On Behalf Of edi@xxxxxxxxxx Sent: Tuesday, February 07, 2006 6:49 AM To: jan@xxxxxxxxxxx Cc: slime-devel@xxxxxxxxxxxxxxx Subject: Re: [slime-devel] Re: Slime inserting an extra parenthesis On Tue, 07 Feb 2006 10:27:40 +0100, Jan Rychter <jan@xxxxxxxxxxx> wrote: > Right, well -- but shouldn't completion be smart enough to know if > the parentheses should be closed or not? At the moment I can't really imagine how SLIME should be able to always do The Right Thing[TM] unless it can read your mind. But I think patches are always welcome. _______________________________________________ slime-devel site list slime-devel@xxxxxxxxxxxxxxx http://common-lisp.net/mailman/listinfo/slime-devel
Date: February 08, 2006
From: Jeff Cunningham <jeffrey@xxxxxxxxxxxxxx>
> I don't get the described behavior in gnu-emacs. Must be an xemacs > thing. >... > Actually, I just noticed that in this case M-q does manage to do the > 'right thing' with the parenthesis. Try that. That was probably meant for the list. I don't have a problem with SLIME's handling of parentheses, the OP has. Cheers, Edi. Sorry, Edi, I thought I was mailing this to the list. -Jeff
Date: February 07, 2006
From: Edi Weitz <edi@xxxxxxxxxx>
In-reply-to:
<m27j87ldrn.fsf@xxxxxxxxxxxxxxxxxxx> (Jan Rychter's message of "Tue, 07 Feb 2006 10:27:40 +0100")
References:
<m2ek2nnotc.fsf@xxxxxxxxxxxxxxxxxxx> <uk6cf886k.fsf@xxxxxxxxxx> <m27j87ldrn.fsf@xxxxxxxxxxxxxxxxxxx>
On Tue, 07 Feb 2006 10:27:40 +0100, Jan Rychter <jan@xxxxxxxxxxx> wrote: > Right, well -- but shouldn't completion be smart enough to know if > the parentheses should be closed or not? At the moment I can't really imagine how SLIME should be able to always do The Right Thing[TM] unless it can read your mind. But I think patches are always welcome.
Date: February 07, 2006
From: Jan Rychter <jan@xxxxxxxxxxx>
References:
<m2ek2nnotc.fsf@xxxxxxxxxxxxxxxxxxx> <uk6cf886k.fsf@xxxxxxxxxx>
>>>>> "Edi" == Edi Weitz <edi@xxxxxxxxxx> writes: Edi> On Wed, 01 Feb 2006 15:20:15 +0100, Jan Rychter <jan@xxxxxxxxxxx> Edi> wrote: >> I often use insert-parentheses in XEmacs, and it seems to interact >> badly with SLIME. >> >> An example: I begin with: >> CL-USER> () >> ^point >> >> I then type asdf-u<TAB>:u<TAB> and end up with this: >> CL-USER> (asdf-upgrade:upgrade)) >> ^point >> >> Notice the extra parenthesis that SLIME inserted. >> >> My guess is that SLIME shouldn't insert this parenthesis. I can >> understand where this came from (no extra args, so the user surely >> wants to close the parenthesis), but for someone mostly working with >> balanced parentheses this isn't too useful. Edi> I think this can be controlled with Edi> slime-complete-symbol*-fancy Right, well -- but shouldn't completion be smart enough to know if the parentheses should be closed or not? --J.
Date: February 07, 2006
From: Ian Eslick <eslick@xxxxxxxxxxxxx>
In-reply-to:
<43E81FC1.8030706@xxxxxxxxxxxxx>
References:
<loom.20060207T032749-271@xxxxxxxxxxxxxx> <43E81FC1.8030706@xxxxxxxxxxxxx>
In fact an even better solution, which I just employed and tested locally, is to just create an allegro specific backend method for inspect-for-emacs that handles the case over slot-boundp not calling slot-boundp-using-class. We can address general MOP issues later if enough backends have to go this route per Pascal's earlier e-mail. Ian Ian Eslick wrote: > It sounds like this is probably related to the recent change to > (defun inspect-for-emacs ((o standard-object) inspector) > > I think perhaps it's advisable to back that recent change out until we > either take Pascal's recommendation to use Closer to MOP to implement > the slot-boundp-using-class or slowly special-case for different > versions until we have a clear working consensus for all the different > backends. > > revert to > >> collect (if (slot-boundp o slot-name) >> `(:value ,(slot-value o slot-name)) >> "#<unbound>") >> > > from: > < collect (if (swank-mop:slot-boundp-using-class > (class-of o) o slot) > < `(:value ,(swank-mop:slot-value-using-class > (class-of o) o > < > (find-effective-slot o slot-name))) > < "#<unbound>") > > Sorry if that caused problems. I'll play around on my end with the > original problem (inspecting MOP overloaded slot accessors) and suggest > a special case solution for Allegro if it is warranted. Can someone > check in this change or revert the prior change? > > Regards, > Ian > > Luke Crook wrote: > >> In the latest version of SLIME from CVS for Lispworks, I receive the >> following >> error when I attempt to inspect the values for a slot in an object: >> >> >> The slot #<STANDARD-EFFECTIVE-SLOT-DEFINITION A-METHOD 21C8CD0C> is missing >> from >> #<A-CLASS 21C8D174> (of class #<STANDARD-CLASS A-CLASS 21C4734C>), when >> reading >> the value. >> << >> >> This is for the following: >> >> CL-USER> (defclass a-class () >> ((a-method :accessor a-method))) >> #<STANDARD-CLASS A-CLASS 21C4734C> >> CL-USER> (make-instance 'a-class) >> #<A-CLASS 21C8D174> >> >> This used to work in the SLIME CVS version of perhaps a month or so ago. >> >> -Luke >> >> >> _______________________________________________ >> slime-devel site list >> slime-devel@xxxxxxxxxxxxxxx >> http://common-lisp.net/mailman/listinfo/slime-devel >> >> > _______________________________________________ > slime-devel site list > slime-devel@xxxxxxxxxxxxxxx > http://common-lisp.net/mailman/listinfo/slime-devel >
Date: February 07, 2006
From: Ian Eslick <eslick@xxxxxxxxxxxxx>
In-reply-to:
<loom.20060207T032749-271@xxxxxxxxxxxxxx>
References:
<loom.20060207T032749-271@xxxxxxxxxxxxxx>
It sounds like this is probably related to the recent change to (defun inspect-for-emacs ((o standard-object) inspector) I think perhaps it's advisable to back that recent change out until we either take Pascal's recommendation to use Closer to MOP to implement the slot-boundp-using-class or slowly special-case for different versions until we have a clear working consensus for all the different backends. revert to > collect (if (slot-boundp o slot-name) > `(:value ,(slot-value o slot-name)) > "#<unbound>") from: < collect (if (swank-mop:slot-boundp-using-class (class-of o) o slot) < `(:value ,(swank-mop:slot-value-using-class (class-of o) o < (find-effective-slot o slot-name))) < "#<unbound>") Sorry if that caused problems. I'll play around on my end with the original problem (inspecting MOP overloaded slot accessors) and suggest a special case solution for Allegro if it is warranted. Can someone check in this change or revert the prior change? Regards, Ian Luke Crook wrote: > In the latest version of SLIME from CVS for Lispworks, I receive the > following > error when I attempt to inspect the values for a slot in an object: > > > The slot #<STANDARD-EFFECTIVE-SLOT-DEFINITION A-METHOD 21C8CD0C> is missing > from > #<A-CLASS 21C8D174> (of class #<STANDARD-CLASS A-CLASS 21C4734C>), when > reading > the value. > << > > This is for the following: > > CL-USER> (defclass a-class () > ((a-method :accessor a-method))) > #<STANDARD-CLASS A-CLASS 21C4734C> > CL-USER> (make-instance 'a-class) > #<A-CLASS 21C8D174> > > This used to work in the SLIME CVS version of perhaps a month or so ago. > > -Luke > > > _______________________________________________ > slime-devel site list > slime-devel@xxxxxxxxxxxxxxx > http://common-lisp.net/mailman/listinfo/slime-devel >
Date: February 07, 2006
From: Luke Crook <luke@xxxxxxxxxxx>
In the latest version of SLIME from CVS for Lispworks, I receive the following
error when I attempt to inspect the values for a slot in an object:
>>
The slot #<STANDARD-EFFECTIVE-SLOT-DEFINITION A-METHOD 21C8CD0C> is missing
from
#<A-CLASS 21C8D174> (of class #<STANDARD-CLASS A-CLASS 21C4734C>), when reading
the value.
<<
This is for the following:
CL-USER> (defclass a-class ()
((a-method :accessor a-method)))
#<STANDARD-CLASS A-CLASS 21C4734C>
CL-USER> (make-instance 'a-class)
#<A-CLASS 21C8D174>
This used to work in the SLIME CVS version of perhaps a month or so ago.
-Luke
Date: February 06, 2006
From: Matthias Koeppe <mkoeppe+slime@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Hi,
I would like to install a new file, "sbcl-pprint-patch.lisp", into
SLIME CVS. It patches the SBCL pretty printer, so as to support
printing SLIME presentations through a pretty printing stream. The
file will only be loaded when a user loads the SLIME file
"present.lisp".
A set of equivalent changes to the pretty printer have been included
in CMUCL 19c. I have also tried to get the patch into SBCL, but it
seems the maintainers are not interested in merging it.
Any objections to installing it into SLIME CVS?
Matthias
Index: present.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/present.lisp,v
retrieving revision 1.17
diff -u -p -u -r1.17 present.lisp
--- present.lisp 21 Sep 2005 20:33:46 -0000 1.17
+++ present.lisp 6 Feb 2006 19:25:17 -0000
@@ -68,8 +68,12 @@ don't want to present anything"
;; layout.
(slime-stream-p
(pretty-print::pretty-stream-target stream))))
#+sbcl
- (and (typep stream 'sb-impl::indenting-stream)
- (slime-stream-p (sb-impl::indenting-stream-stream
stream)))
+ (or (and (typep stream 'sb-impl::indenting-stream)
+ (slime-stream-p (sb-impl::indenting-stream-stream
stream)))
+ (and (typep stream 'sb-pretty::pretty-stream)
+ (fboundp 'sb-pretty::enqueue-annotation)
+ (not *use-dedicated-output-stream*)
+ (slime-stream-p (sb-pretty::pretty-stream-target
stream))))
#+allegro
(and (typep stream 'excl:xp-simple-stream)
(slime-stream-p (excl::stream-output-handle stream)))
@@ -83,6 +87,17 @@ don't want to present anything"
(declare (ignore stream))
*enable-presenting-readable-objects*)
+;;; Get pretty printer patches for SBCL
+#+sbcl
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (handler-bind ((simple-error
+ (lambda (c)
+ (declare (ignore c))
+ (let ((clobber-it (find-restart 'sb-kernel::clobber-it)))
+ (when clobber-it (invoke-restart clobber-it))))))
+ (sb-ext:without-package-locks
+ (swank-backend::with-debootstrapping (load "sbcl-pprint-patch.lisp")))))
+
;; If we are printing to an XP (pretty printing) stream, printing the
;; escape sequences directly would mess up the layout because column
;; counting is disturbed. Use "annotations" instead.
@@ -97,7 +112,12 @@ don't want to present anything"
(fboundp 'pp::enqueue-annotation))
(pp::enqueue-annotation stream function arg)
(funcall function arg stream nil)))
-#-(or allegro cmu)
+#+sbcl
+(defun write-annotation (stream function arg)
+ (if (typep stream 'sb-pretty::pretty-stream)
+ (sb-pretty::enqueue-annotation stream function arg)
+ (funcall function arg stream nil)))
+#-(or allegro cmu sbcl)
(defun write-annotation (stream function arg)
(funcall function arg stream nil))
*** /dev/null Sun Jan 1 08:47:07 2006
--- sbcl-pprint-patch.lisp Sun Jul 24 04:19:06 2005
***************
*** 0 ****
--- 1,324 ----
+ (in-package "SB!PRETTY")
+
+ (defstruct (annotation (:include queued-op))
+ (handler (constantly nil) :type function)
+ (record))
+
+
+ (defstruct (pretty-stream (:include sb!kernel:ansi-stream
+ (out #'pretty-out)
+ (sout #'pretty-sout)
+ (misc #'pretty-misc))
+ (:constructor make-pretty-stream (target))
+ (:copier nil))
+ ;; Where the output is going to finally go.
+ (target (missing-arg) :type stream)
+ ;; Line length we should format to. Cached here so we don't have to keep
+ ;; extracting it from the target stream.
+ (line-length (or *print-right-margin*
+ (sb!impl::line-length target)
+ default-line-length)
+ :type column)
+ ;; A simple string holding all the text that has been output but not yet
+ ;; printed.
+ (buffer (make-string initial-buffer-size) :type (simple-array character
(*)))
+ ;; The index into BUFFER where more text should be put.
+ (buffer-fill-pointer 0 :type index)
+ ;; Whenever we output stuff from the buffer, we shift the remaining noise
+ ;; over. This makes it difficult to keep references to locations in
+ ;; the buffer. Therefore, we have to keep track of the total amount of
+ ;; stuff that has been shifted out of the buffer.
+ (buffer-offset 0 :type posn)
+ ;; The column the first character in the buffer will appear in. Normally
+ ;; zero, but if we end up with a very long line with no breaks in it we
+ ;; might have to output part of it. Then this will no longer be zero.
+ (buffer-start-column (or (sb!impl::charpos target) 0) :type column)
+ ;; The line number we are currently on. Used for *PRINT-LINES*
+ ;; abbreviations and to tell when sections have been split across
+ ;; multiple lines.
+ (line-number 0 :type index)
+ ;; the value of *PRINT-LINES* captured at object creation time. We
+ ;; use this, instead of the dynamic *PRINT-LINES*, to avoid
+ ;; weirdness like
+ ;; (