Re: problem with slime-edit-definition
Helmut Eller <[email protected]> Wed, 19 Aug 2015 09:47:18 +0200
| Newsgroups | gmane.lisp.slime.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 18 2015, Peter Münster wrote: > On Tue, Aug 18 2015, Helmut Eller wrote: > >> 2. load the source file into the Lisp process with slime-load-file or >> a similar command. > > I open the file with C-x C-f (buffer is in slime-mode then). > With slime-load-file, the file would be executed and that should be > avoided. > > Is it possible, that slime-load-file wasn't needed about one year ago? That's almost impossible. The Lisp process wouldn't have known about your code; perhaps you had something in the core file. > Nevertheless, thanks for you answer. I'll use this workaround now: > > 1.) open the lisp-file > 2.) remove first line (#!/usr/bin/sbcl --script) > 3.) remove last lines (execution of functions) > 4.) slime-load-file the lisp-file > 5.) undo 2.) and 3.) > > But whenever I add functions to the script, I have to repeat 2.) to 5.), > that's not very comfortable. Or perhaps I should switch to gtags... Instead of #! you could try the ":"; trick: ":"; exec sbcl --load "$0" --eval '(main)' "$@" (print "hello") (defun main () (format t "args: ~s" sb-ext:*posix-argv*) (sb-ext:exit :code 123)) For Bash ":"; is essentially a no-op, and for Lisp everything after the ; is a comment. Helmut