<div dir="ltr">Most often I edit several functions within a particular lisp file in order to add a feature or fix a bug. I would then like to save and load the whole file in order to test it.<div><br></div><div>I don't like to pass each function to lisp when I am done editing it (^X^E) because I often bounce back and forth between several functions while programming. When I am ready to test, it is too burdensome for me to remember which functions I passed to lisp, which I have not, and which were passed to lisp _after_ my last edit of it. Re-loading the whole file when I am done is perfect.</div><div><br></div><div>I don't like to be forced to re-compile it in order to load it for the following reasons:</div><div><br></div><div>1. Some lisp's take longer to compile/load than to just load</div><div><br></div><div>2. Compiling often creates a bunch of junk files that I don't want to see when developing</div><div><br></div><div>3. (I imagine) some lisp's can provide better debugging information on interpreted code rather than compiled code</div><div><br></div><div>4. When developing, the run-time speed of the particular module I am working on almost never matters. If other parts need to be fast, I can compile those. (Of course I would compile the whole thing for production use.)</div><div><br></div><div>I appreciate this dialog because my development process makes a lot of sense to me. But I recognize that, out of ignorance, I may not be doing the best thing. If I am right, clearly slime needs a key bound to a slime-save-and-load function as described below. If I am wrong, I just need to understand it, and learn to use the correct procedure.</div><div><br></div><div>Thanks.</div><div><br></div><div>Blake McBride</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 15, 2015 at 12:49 AM, Jeff Cunningham <span dir="ltr"><<a href="mailto:jeffrey@jkcunningham.com" target="_blank">jeffrey@jkcunningham.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
<br>
<br>
<div>On 07/14/2015 06:15 PM, Blake McBride
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I had to take the "P" argument out, and then
everything worked perfectly. Thanks!!
<div><br>
</div>
<div>(I am using GNU Emacs 24.3.1)</div>
<div><br>
</div>
<div>I am surprised this sequence isn't a pre-configured feature
of standard slime with a keyboard shortcut. It is my most
used sequence.</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>Blake</div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jul 14, 2015 at 6:17 PM,
edgar <span dir="ltr"><<a href="mailto:edgar-rft@web.de" target="_blank">edgar-rft@web.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Tue,
14 Jul 2015 16:58:31 -0500<br>
schrieb Blake McBride <<a href="mailto:blake@mcbride.name" target="_blank">blake@mcbride.name</a>>:<br>
<span><br>
> Greetings,<br>
><br>
> Long-time lisp user, short time slime user here.
There is something<br>
> I like to do frequently but seems to be a real
hassle with slime.<br>
> I'm sure either there is a command to do what I
want, or it is easy<br>
> for me to write one. I thought rather than going
doen an ignorant<br>
> path, I'd ask the list. Sure appreciate any help.<br>
><br>
> What I would like is a keyboard command that would:<br>
><br>
> 1. save the current file being edited<br>
><br>
> 2. load (not compile) that file without asking
it's name<br>
<br>
</span>A basic Emacs function doing both could look like
this:<br>
<br>
(defun slime-save-and-load-file ()<br>
(interactive "P")<br>
(let ((filename (buffer-file-name)))<br>
(if (not filename)<br>
(message "Buffer %s is not associated with a
file."<br>
(buffer-name))<br>
(save-buffer)<br>
(slime-load-file filename))))<br>
<span><font color="#888888"><br>
- edgar<br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<br></div></div>
Just out of curiosity, why do you do this all the time? What's the
scenario?<span class="HOEnZb"><font color="#888888"><br>
<br>
--Jeff<br>
<br>
</font></span></div>
</blockquote></div><br></div></div>