On Tue, 2004-05-18 at 11:16, Marco Baringer wrote:
Martin Elster martin@1103.org writes:
I haven't looked hard, but I couldn't find equivalents for :processes (list all processes), :signal (send a signal to process), :sh (run shell command), and :kill.
see slime-list-threads. it doesn't allow you to send arbitrary signals to a thread, but you can kill it attach a repl to a thread or open a debugger in a thread.
what should :sh return?
I don't know. As long as they print to *standard-output* what would have gone to stdout, I'm happy. It could either return 0 or 1 according to the result of running the command, as ACL does, or just NIL, as aclrepl does.
of course, i'd just tell you to use eshell, but i'm not that much of an emacs fascist yet.
:-)
I also use the :cd <dir>, :pwd, :ld, and :cl commands all the time in Allegro and sbcl, and they have almost become second nature.
there are slime shortcuts for all of those, except :pwd, but for that you can just do M-x pwd anyway.
I'm probably missing something obvious, but how do you change directory using shortcuts?
When I type , (comma) and help, this is what I get:
=============== force-compile-system Recompile (but not load) an ASDF system. force-load-system Recompile and load an ASDF system. help (aka ?) Display the help. load-system Compile (as needed) and load an ASDF system. pop-directory (aka -d) Pop the current directory. pop-package (aka -p) Pop the top of the package stack. push-directory (aka +d, pushd) Push a new directory onto the directory stack. push-package (aka +p) Push a package onto the package stack. resend-form Resend the last form. sayoonara Quit the lisp and close all SLIME buffers. ===============
Should there be more shortcuts?
BTW, I can't seem to get the load-system shortcut to work either.
I type ,load-system and then I get the following error message:
cannot supply a type without a name: #<PATHNAME (with no namestring) :HOST #<SB-IMPL::UNIX-HOST {5012CE9}> :DEVICE NIL :DIRECTORY (:ABSOLUTE "home" "melster" ".sbcl" "systems") :NAME NIL :TYPE "asd" :VERSION :NEWEST> [Condition of type SIMPLE-ERROR]
Restarts: 0: [ABORT] Abort handling SLIME request. 1: [ABORT] Reduce debugger level (leaving debugger, returning to toplevel). 2: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
Backtrace: 0: (SB-IMPL::%ENUMERATE-MATCHES 4 #<PATHNAME (with no namestring) :HOST #<SB-IMPL::UNIX-HOST {5012CE9}> :DEVICE NIL :DIRECTORY (:ABSOLUTE "home" "melster" ".sbcl" "systems") :NAME NIL :TYPE "asd" :VERSION :NEWEST> T T #<FUNCTION "CLOSURE" {9827FB5}>)[:EXTERNAL] 1: ("LABELS SB!IMPL::DO-DIRECTORY" #<PATHNAME (with no namestring) :HOST #<SB-IMPL::UNIX-HOST {5012CE9}> :DEVICE NIL :DIRECTORY (:ABSOLUTE "home" "melster" ".sbcl" "systems") :NAME NIL :TYPE "asd" :VERSION :NEWEST>) 2: (DIRECTORY 1 #<PATHNAME (with no namestring) :HOST #<SB-IMPL::UNIX-HOST {5012CE9}> :DEVICE NIL :DIRECTORY (:ABSOLUTE "home" "melster" ".sbcl" "systems") :NAME NIL :TYPE "asd" :VERSION :NEWEST>)[:EXTERNAL] 3: (SWANK:LIST-ALL-SYSTEMS-IN-CENTRAL-REGISTRY) 4: (SB-INT:EVAL-IN-LEXENV 2 (SWANK:LIST-ALL-SYSTEMS-IN-CENTRAL-REGISTRY) #S(SB-KERNEL:LEXENV :FUNS NIL :VARS NIL :BLOCKS NIL :TAGS NIL :TYPE-RESTRICTIONS NIL :LAMBDA NIL :CLEANUP NIL :POLICY ((SPEED . 1) (SPACE . 1) (SAFETY . 1) (INHIBIT-WARNINGS . 1) (DEBUG . 1) (COMPILATION-SPEED . 1))))[:EXTERNAL] 5: (SWANK::EVAL-FOR-EMACS (SWANK:LIST-ALL-SYSTEMS-IN-CENTRAL-REGISTRY) NIL 5) 6: (SWANK::READ-FROM-EMACS) 7: ("#'(LAMBDA NIL (LET # #))") 8: (SWANK::CALL-WITH-REDIRECTED-IO #S(SWANK::CONNECTION :SOCKET-IO #<FILE-STREAM for #1="a constant string" {9E06F09}> :DEDICATED-OUTPUT #2=#<FILE-STREAM for #1# {9E139C1}> :USER-INPUT #3=#<SWANK-BACKEND::SLIME-INPUT-STREAM {944E291}> :USER-OUTPUT #2# :USER-IO #<TWO-WAY-STREAM :INPUT-STREAM #3# :OUTPUT-STREAM #2#> :CONTROL-THREAD NIL :READER-THREAD NIL :REPL-THREAD NIL :READ #<FUNCTION SWANK::READ-FROM-SOCKET-IO> :SEND #<FUNCTION SWANK::SEND-TO-SOCKET-IO> :SERVE-REQUESTS #<FUNCTION SWANK::INSTALL-SIGIO-HANDLER> :CLEANUP #<FUNCTION SWANK::DEINSTALL-SIGIO-HANDLER> :INDENTATION-CACHE #<HASH-TABLE :TEST EQ :COUNT 167 {9E0C889}> :INDENTATION-CACHE-PACKAGES (#<PACKAGE "SWANK-COMPLETION-TEST"> #<PACKAGE "SWANK-IO-PACKAGE"> #<PACKAGE "SWANK"> #<PACKAGE "SB-POSIX-INTERNAL"> #<PACKAGE "SB-POSIX"> #<PACKAGE "SB-POSIX-SYSTEM"> #<PACKAGE "ASDF2994"> #<PACKAGE "SB-INTROSPECT"> #<PACKAGE "SB-BSD-SOCKETS"> #<PACKAGE "SB-BSD-SOCKETS-INTERNAL"> #<PACKAGE "SB-BSD-SOCKETS-SYSTEM"> #<PACKAGE "SB-GROVEL"> #<PACKAGE "SB-GROVEL-SYSTEM"> #<PACKAGE "ASDF2853"> #<PACKAGE "ASDF2852"> #<PACKAGE "NREGEX"> #<PACKAGE "SWANK-BACKEND"> #<PACKAGE "SWANK-LOADER"> #<PACKAGE "SB-ACLREPL"> #<PACKAGE "SB-ACLREPL-SYSTEM"> #<PACKAGE "ASDF2729"> #<PACKAGE "ASDF"> #<PACKAGE "COMMON-LISP-USER"> #<PACKAGE "SB-LOOP"> #<PACKAGE "SB-IMPL"> #<PACKAGE "KEYWORD"> #<PACKAGE "SB-WALKER"> #<PACKAGE "SB-PROFILE"> #<PACKAGE "SB-PRETTY"> #<PACKAGE "SB-MOP"> #<PACKAGE "SB-INT"> #<PACKAGE "SB-GRAY"> #<PACKAGE "SB-FORMAT"> #<PACKAGE "SB-FASL"> #<PACKAGE "SB-DISASSEM"> #<PACKAGE "SB-DEBUG"> #<PACKAGE "SB-C"> #<PACKAGE "SB-BIGNUM"> #<PACKAGE "SB-ASSEM"> #<PACKAGE "SB-ALIEN-INTERNALS"> #<PACKAGE "SB-SYS"> #<PACKAGE "SB-ALIEN"> #<PACKAGE "SB-PCL"> #<PACKAGE "SB-UNIX"> #<PACKAGE "SB-VM"> #<PACKAGE "SB-THREAD"> #<PACKAGE "SB-DI"> #<PACKAGE "SB-KERNEL"> #<PACKAGE "SB-EXT"> #<PACKAGE "COMMON-LISP">)) #<FUNCTION "#'(LAMBDA NIL (LET # #))" {908C84D}>) 9: (SWANK::HANDLE-REQUEST #S(SWANK::CONNECTION :SOCKET-IO #<FILE-STREAM for #1="a constant string" {9E06F09}> :DEDICATED-OUTPUT #2=#<FILE-STREAM for #1# {9E139C1}> :USER-INPUT #3=#<SWANK-BACKEND::SLIME-INPUT-STREAM {944E291}> :USER-OUTPUT #2# :USER-IO #<TWO-WAY-STREAM :INPUT-STREAM #3# :OUTPUT-STREAM #2#> :CONTROL-THREAD NIL :READER-THREAD NIL :REPL-THREAD NIL :READ #<FUNCTION SWANK::READ-FROM-SOCKET-IO> :SEND #<FUNCTION SWANK::SEND-TO-SOCKET-IO> :SERVE-REQUESTS #<FUNCTION SWANK::INSTALL-SIGIO-HANDLER> :CLEANUP #<FUNCTION SWANK::DEINSTALL-SIGIO-HANDLER> :INDENTATION-CACHE #<HASH-TABLE :TEST EQ :COUNT 167 {9E0C889}> :INDENTATION-CACHE-PACKAGES (#<PACKAGE "SWANK-COMPLETION-TEST"> #<PACKAGE "SWANK-IO-PACKAGE"> #<PACKAGE "SWANK"> #<PACKAGE "SB-POSIX-INTERNAL"> #<PACKAGE "SB-POSIX"> #<PACKAGE "SB-POSIX-SYSTEM"> #<PACKAGE "ASDF2994"> #<PACKAGE "SB-INTROSPECT"> #<PACKAGE "SB-BSD-SOCKETS"> #<PACKAGE "SB-BSD-SOCKETS-INTERNAL"> #<PACKAGE "SB-BSD-SOCKETS-SYSTEM"> #<PACKAGE "SB-GROVEL"> #<PACKAGE "SB-GROVEL-SYSTEM"> #<PACKAGE "ASDF2853"> #<PACKAGE "ASDF2852"> #<PACKAGE "NREGEX"> #<PACKAGE "SWANK-BACKEND"> #<PACKAGE "SWANK-LOADER"> #<PACKAGE "SB-ACLREPL"> #<PACKAGE "SB-ACLREPL-SYSTEM"> #<PACKAGE "ASDF2729"> #<PACKAGE "ASDF"> #<PACKAGE "COMMON-LISP-USER"> #<PACKAGE "SB-LOOP"> #<PACKAGE "SB-IMPL"> #<PACKAGE "KEYWORD"> #<PACKAGE "SB-WALKER"> #<PACKAGE "SB-PROFILE"> #<PACKAGE "SB-PRETTY"> #<PACKAGE "SB-MOP"> #<PACKAGE "SB-INT"> #<PACKAGE "SB-GRAY"> #<PACKAGE "SB-FORMAT"> #<PACKAGE "SB-FASL"> #<PACKAGE "SB-DISASSEM"> #<PACKAGE "SB-DEBUG"> #<PACKAGE "SB-C"> #<PACKAGE "SB-BIGNUM"> #<PACKAGE "SB-ASSEM"> #<PACKAGE "SB-ALIEN-INTERNALS"> #<PACKAGE "SB-SYS"> #<PACKAGE "SB-ALIEN"> #<PACKAGE "SB-PCL"> #<PACKAGE "SB-UNIX"> #<PACKAGE "SB-VM"> #<PACKAGE "SB-THREAD"> #<PACKAGE "SB-DI"> #<PACKAGE "SB-KERNEL"> #<PACKAGE "SB-EXT"> #<PACKAGE "COMMON-LISP">))) 10: ("#'(LAMBDA NIL (SWANK::HANDLE-REQUEST SWANK::CONNECTION))") 11: (SWANK::PROCESS-AVAILABLE-INPUT #<FILE-STREAM for "a constant string" {9E06F09}> #<FUNCTION "CLOSURE" {982747D}>) 12: ("FLET SWANK::HANDLER") 13: (SWANK-BACKEND::SIGIO-HANDLER #<unused argument> #<unused argument> #<unused argument>) 14: ("#'(LAMBDA (SIGNAL SWANK-BACKEND::CODE SWANK-BACKEND::SCP) (SWANK-BACKEND::SIGIO-HANDLER SIGNAL SWANK-BACKEND::CODE ...))" 29 #.(SB-SYS:INT-SAP #X402504D8) #.(SB-SYS:INT-SAP #X40250558)) 15: ("foreign function call land: ra=#x8055BC1") 16: ("foreign function call land: ra=#x8055A9A") 17: ("foreign function call land: ra=#x8050A17") 18: ("foreign function call land: ra=#x80521E7") 19: ("foreign function call land: ra=#x420277B0") 20: ("hairy arg processor for top level local call SB!SYS:WAIT-UNTIL-FD-USABLE" 0 :INPUT NIL) 21: (SB-IMPL::FROB-INPUT 1 #<FILE-STREAM for "standard input" {9003259}>)[:EXTERNAL] 22: (SB-IMPL::INPUT-CHARACTER 3 #<FILE-STREAM for "standard input" {9003259}> NIL :EOF)[:EXTERNAL] 23: ("hairy arg processor for top level local call READ-CHAR" #<FILE-STREAM for "standard input" {9003259}> NIL :EOF #<unused argument>) 24: ("hairy arg processor for top level local call PEEK-CHAR" NIL #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {5028D49}> NIL :EOF #<unused argument>) 25: ("hairy arg processor for SB-ACLREPL::PEEK-CHAR-NON-WHITESPACE" #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {5028D49}>) 26: (SB-ACLREPL::READ-CMD #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {5028D49}>) 27: (SB-ACLREPL::REPL-READ-FORM-FUN #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {5028D49}> #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDOUT* {500F721}>) 28: (SB-ACLREPL::REP-ONE) 29: ("varargs entry for SB-ACLREPL::REPL" :BREAK-LEVEL 0 :NOPRINT NIL :INSPECT NIL :CONTINUABLE NIL) 30: ("#'(LAMBDA (SB-ACLREPL::NOPRINT) (LET # #))" NIL) 31: ("#'(LAMBDA NIL (LOOP # #))") 32: ("XEP for #'(LAMBDA NIL (LOOP # #))" 0)[:EXTERNAL] 33: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX 1 #<FUNCTION "CLOSURE" {92A8205}>)[:EXTERNAL] 34: (SB-IMPL::TOPLEVEL-REPL 1 NIL)[:EXTERNAL] 35: (SB-IMPL::TOPLEVEL-INIT 0)[:EXTERNAL] 36: ("FLET SB!IMPL::RESTART-LISP")
This is on sbcl 0.8.10 with the latest FAIRLY-STABLE slime.
Any tips?
martin