Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8148353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:37:54+00:00 2026-06-06T14:37:54+00:00

I started using emacs and slime to develop some little service. I have found

  • 0

I started using emacs and slime to develop some little service.

I have found a way to reload the code after changes but I want this a lot more convenient and faster.

This is how I doo it now:

  • 1) start emacs, start slime, then in slime:

    2) (load “init.lisp”) ; load some initialisation code that does not
    change

    3) (load “myseervice.lisp”); this containts the code that i am
    working on

    4) (myservice:start)

    5) At this point the seeervice is runing and i can test it. then I
    make changes to myseervice.lisp, to modify it. To swap the code to
    the new version I do this:

    6) (myservice:stop)

    7) (load “myservice.lisp”)

    8) go to 4) to start it again…


This works so far. But it is no fun to manually stop, reload and start. And there is a lot of output in slime between the calls, so it is not easy to reuse the previously typed commands 4)-7).

To have a solution I started a devhelper package which should do this for me in only one command, but it does not work:

(defpackage :devhelper
  (:use :common-lisp :myservice)
  (:export :start :reload))

(in-package :devhelper)

(defun start ()
  (myservice:start))

(defun reload ()
  (myservice:stop)
  (load "myservice.lisp") ;I think it is not possible to load it here, 
                          ;because this module is using the file that it is just loading
                          ;But it does not have to work this way, 
                          ;I just like any good solution
  (myservice:start))

And I thought I could do it like this now:

  • 1) start emacs, start slime, then in slime:

    2) (load “init.lisp”) ; load some initialisation code that does not
    change

    3a) (load “myseervice.lisp”); this containts the code that i am
    working on

    3b) (load “devhelper.lisp”)

    4) (devhelper:start)

    5) At this point the seeervice is runing and i can test it. then I
    make changes to myseervice.lisp, to modify it. To swap the code to
    the new version I jussst dreamed I could:

    6) (devhelper:reload)

But it freezes at this point.

And I am not sticking to this devhelper idea, I just want a smoother development cycle.

How would a real lisper do it? I am very new to all this and I come from conventional programming background 😉 with IDEs and imports.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:37:55+00:00Added an answer on June 6, 2026 at 2:37 pm

    History

    Reusing previous commands is not difficult in SLIME/Emacs.

    The commands M-p and M-n get the previous or next input. M-r and M-s allows you to search (using a regular expression) in the input.

    Execution from a buffer

    Another way is to write down the commands into a Lisp file, open the file in a buffer and then you can execute them from there.

    Reload

    Your reload idea is okay. You could shutdown a service, load new code and start the service again. You should find out why it freezes. You should debug that. One of the differences between your manual and your coded version is this: the time between stopping, loading and starting is in the coded version much shorter. You should check if there is some problem.

    More advanced organization of code

    Typically when you have more than one file it makes sense to use one or more systems to organize the code. Also it makes sense if your code is in files that you use the file compiler to compile your code. This way you get warnings and errors early on. Often in Common Lisp developers use ASDF as a system tool. Many implementations additionally have their own (with more or less features).

    A system tool provides you some commands that you can use on a system:

    • load: load compiled or source code if necessary (or forced)
    • compile: compile code if necessary (or forced)
    • compile and load: compiles and loads code if necessary (or forced)…

    Usually it will issue the smallest amount of commands necessary to compile or load the code. But you can force it to reload or recompile everything.

    Typically a system can have subsystems. A subsystem could for example be a compile service. If you change the code, save it and compile and load the subsystem. ASDF (or a similar tool) will compile the changed files and load them.

    More advanced: write your own commands for the system tool, which then stops a running service, compiles/loads the changes and then starts the service.

    Recommendation:

    Get your version going, find out why it hangs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started using emacs org-mode recently to maintain my TODO lists. I have
I have just started using Emacs for the specific purpose of editing latex documents.
I have recently started using doc-view in Emacs, but I am having quite a
I am a fairly new user of R and have started using Emacs Speaks
I just started using emacs after having used vi for a long time. :)
I have installed some Emacs packages such as the starter-kit using M-x package-install .
I started using Emacs (ESS) as a default R editor (yes, @Dirk, as you've
I recently started using Emacs for editing. When I edit english-language files (like program
How can I change the initial directory on emacs? I started using it today
I have been using emacs for a while for mainly python programming, and have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.