From: Pascal J. Bourguignon on 2 Mar 2010 19:57 "Haris Bogdanovic" <fbogdanovic(a)xnet.hr> writes: > It opens whole new menus when working with *.lisp file. > When I enetered M-x load-file in elisp, whole file was like evaluated > so I could call functions from it in *scratch*. > When I load-file and then try to call some function from *slime-repl-clisp* > it is not recognized. What to I have to do when I open file or add some code > to it > so it gets recognized by slime: save it and then load/compile or > compile ? Have you read my message Message-ID: <87wrxv7fcg.fsf(a)galatea.lan.informatimago.com> where I made a table showing the functions in emacs lisp and in Common Lisp? > I cannot like evaluate the whole file ? Yes, you cannot. But if you knew how to, you could. You could know how to by reading my above mentionned message. > It appears that slime gets disconnected sometimes so all slime menus become > greyed > and I have to enter M-x slime to get it work again. Why is that ? Communication problems. Slime has several different ways to communicate with the inferior lisp. Check the slime manual where it is explained, and select another communication method. Perhaps this will solve the problem. > Can I set default directory for emacs when I press open file or > enter M-x load-file ? Yes. In emacs, and in Common Lisp, there is a function called apropos which let you find about things. (Besides the manual of course, that you can always read profitably, try C-h i m emacs RET). (apropos "default.*directory") You can invoke it interactively with: M-x apropos RET default directory RET > Why does emacs ask me do I want another buffer *inferior-lisp* ? It's slime who asks. Because there is already one. Just say no. -- __Pascal Bourguignon__ http://www.informatimago.com
From: Pascal J. Bourguignon on 2 Mar 2010 19:58 "Haris Bogdanovic" <fbogdanovic(a)xnet.hr> writes: > It opens whole new menus when working with *.lisp file. > When I enetered M-x load-file in elisp, whole file was like evaluated > so I could call functions from it in *scratch*. > When I load-file and then try to call some function from *slime-repl-clisp* > it is not recognized. What to I have to do when I open file or add some code > to it > so it gets recognized by slime: save it and then load/compile or > compile ? Have you read my message Message-ID: <87wrxv7fcg.fsf(a)galatea.lan.informatimago.com> where I made a table showing the functions in emacs lisp and in Common Lisp? > I cannot like evaluate the whole file ? Yes, you cannot. But if you knew how to, you could. You could know how to by reading my above mentionned message. > It appears that slime gets disconnected sometimes so all slime menus become > greyed > and I have to enter M-x slime to get it work again. Why is that ? Communication problems. Slime has several different ways to communicate with the inferior lisp. Check the slime manual where it is explained, and select another communication method. Perhaps this will solve the problem. > Can I set default directory for emacs when I press open file or > enter M-x load-file ? Yes. In emacs, and in Common Lisp, there is a function called apropos which let you find about things. (Besides the manual of course, that you can always read profitably, try C-h i m emacs RET). (apropos "default.*directory") You can invoke it interactively with: M-x apropos RET default directory RET > Why does emacs ask me do I want another buffer *inferior-lisp* ? It's slime who asks. Because there is already one. Just say no. -- __Pascal Bourguignon__ http://www.informatimago.com
From: Captain Obvious on 3 Mar 2010 05:18 HB> When I load-file and then try to call some function from HB> *slime-repl-clisp* it is not recognized. You should not use load-file on Common Lisp files -- you should use M-x slime-load-file or use SLIME menu. HB> What to I have to do when I open file or add some code to it HB> so it gets recognized by slime: save it and then load/compile or compile ? Compile/Load file. It will automatically offer you to save file if necessary. HB> I cannot like evaluate the whole file ? You can. slime-load-file if file is saved on disk or slime-eval-buffer if it is in your editor. But usually there is no need to do that, compile/load file works just fine. In Common Lisp compile/load semantics is very close to eval, that is, if you've compiled a file and loaded it, in most cases it be just like you've evaluated each top-level form in this file. HB> It appears that slime gets disconnected sometimes so all slime menus HB> become greyed HB> and I have to enter M-x slime to get it work again. Why is that ? You've managed to crash CLISP, congratulations. Check *inferior-lisp* buffer, it contains output from CLISP and that might give you a clue why it have crashed. Stack overflow, infinite loop or something like that.
From: Haris Bogdanovic on 4 Mar 2010 05:02 Why does *buffer list* always open in opposite window (C-x C-b) ? Can I set that it opens in a window where my cursor is ? How can I cancel any command before I finish it (C-x and then cancel that C-x before entering anything else) ? I have a file a.lisp: (defun a (b) b) When I compile the whole file with C-c C-k I get following error: "warning: A is neither declared nor bound, it will be treated as if it were declared SPECIAL." When I compile defun with C-c C-c then it works, why ?
From: Tamas K Papp on 4 Mar 2010 06:08
On Thu, 04 Mar 2010 11:02:24 +0100, Haris Bogdanovic wrote: > Why does *buffer list* always open in opposite window (C-x C-b) ? Can I > set that it opens in a window where my cursor is ? You may want to use C-x b, and select the filename directly, completing with TAB, it is less intrusive. > How can I cancel any command before I finish it (C-x and then cancel > that C-x before entering anything else) ? Generally, C-g. > I have a file a.lisp: > > (defun a (b) > b) > > When I compile the whole file with C-c C-k I get following error: > "warning: A is neither declared nor bound, it will be treated as if it > were declared SPECIAL." > When I compile defun with C-c C-c then it works, why ? There must be something else in your file that leads to this message. You might benefit from 1. reading an Emacs tutorial, 2. reading some Slime docs (tutorials, talks, Google is your friend) 3. posting more relevant information when you are asking a question. Tamas |