I often find my self starting some long running process from the REPL and then wish I could carry on using the REPL for other tasks while it was running. Can I use slime to background the current thread or start a new REPL control thread? Starting an additional REPL buffer would be fine as well.
Can I background a running thread in the Slime (Swank Emacs)
443 views Asked by Arthur Ulfeldt At
3
There are 3 answers
0
Alex Stoddard
On
Please forgive me for a somewhat trite and non-slime specific answer; on the upside it will work with any clojure REPL.
When I know in advance I am starting a long running task from the REPL then I start the computation using future and check with future-done? before deref-ing it.
0
Matthias Benkard
On
This might not answer your question, but it might be helpful to realize that as long as (slime-communication-style) is :spawn, evaluations done using C-x C-e always spawn their own thread and can run in parallel to whatever is happening in the REPL thread. Output (from println etc.) will appear in the REPL buffer.
Related Questions in EMACS
- EMACS-Live + Slime error at startup
- Auto complete of braces in emacs
- tmux + emacs : ctrl is not reconized
- yasnippet weird-input when org-mode :tag: on same line
- Error in Dired sorting on Windows (with Cygwin Emacs)
- ESS produces "Variable binding depth exceeds max-specpdl-size"
- How to simplify the mode-line, and enter evil-insert-state depending on buffer name
- MELPA pointing to non-existent version of multi-term?
- Mark-up for bold and italic in emacs org-mode
- How to get C-` key combo recognized in Emacs under Mac?
- how to install Emacs Prelude system-wide on windows/MinGW?
- Emacs on Windows 8: write-error, bad file descriptor
- Emacs and Skim not in Sync fails to open
- Emacs web mode selection word delimiters include _
- Error loading D:\cygdrive\d\path\to\my\file.pdf
Related Questions in CLOJURE
- core.logic CLP(FD) with ClojureScript
- clojure worker-only app on heroku fails with Error R10
- How do persistent data structures help make Om faster
- Union in HoneySQL
- Reduce memory consumption in development
- twitter response: "error 32: Could not authenticate you" from Heroku, but not desktop
- How can I create a global object, and attach a string and a function to that object, in ClojureScript?
- AngularJS $http GET method to backend server: Request Method:OPTIONS 405
- Clojure : event listener on domina library
- Why is my streamparse topology definition complaining about a wrong number of arguments to thrift$mk-topology?
- Clojure defn name as multiplier
- clojure quoting inside let
- Build macro result with loops
- How do I unit test clojure.core.async go macros?
- Datomic and HornetQException "unable to validate user"
Related Questions in LISP
- Intercept and modify user input in Common Lisp
- Read next line when loading file in Common Lisp
- Calling CCL + Quicklisp script as executable with command line arguments and achieving the desired output
- Avoiding echos in Clozure lisp (noob)
- Backquote String Interpolation
- Structuring large Lisp applications
- If strings are vectors, why are they immutable?
- Invalid specialized parameter in method lambda list
- Emacs init.el and Elisp and equivalent of common lisp every-p function
- EVAL/APPLY: too many arguments given to F
- Insertion into a list doesn't reflect outside function whereas deletion does?
- How to traverse a tree in Clojure while collecting the value from each node node?
- in clojure, function argument type mismatch
- In Lisp is the function `1+` just syntactic sugar?
- Search function in lisp
Related Questions in SLIME
- EMACS-Live + Slime error at startup
- Jump to function definition in Emacs by mouse-click
- compile error common lisp
- How can *standard-input* and *standard-output* be redirected to another PTY, FIFO or socket?
- Multi-threading in SBCL via Slime creates threads that do not return or close
- Install slime on emacs error
- How to use SLIME indentation with editorconfig in emacs
- emacs slime can not connect to swank
- Common Lisp: How to get (in-package ...) to work from within Emacs Slime
- Recompile doesn't correct typo in function call
- When emacs locks up
- From Ceramic:bundle got uiop/run-program:subprocess-error does not find my component (and not showing much)
- Conflicting(?) 'FORMAT' function of emacs and SBCL
- lisp as a shebang script vs lisp running in SLIME
- Is there anything like Lisp's SLIME for Python/Django?
Related Questions in SWANK
- How can *standard-input* and *standard-output* be redirected to another PTY, FIFO or socket?
- Send emacs buffer to arbitrary Python process
- node.js - eval'ing to a live process
- Stopping infinite loops while running clojure tests in emacs with leiningen and swank/slime
- How to capture stdout/log output of an agent in SLIME?
- Tab completions on remote Emacs with SLIME
- Workflow for hacking on Clojure libraries using swank-clojure
- How to use project namespace in SLIME REPL
- How to make swank working with stumpw?
- Getting started with Datomic and Clojure in Emacs
- A Clojure/Swank `break` exits the enclosing Leiningen process--why?
- slimv - error connecting to clojure swank server
- Setting up emacs/slime/swank for clojure with leiningen
- Clojure emacs slime + swank directory question
- Can I background a running thread in the Slime (Swank Emacs)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Edit:
Hm, I somehow managed to miss the Clojure tag on your question. I would be very suprised if the solution below worked for Clojure, since, as you probably know, the Clojure community unfortunately (at least for those of us using Clojure and CL) maintains its own version of Slime. I won't delete the answer, because it might be helpful for CL programmers searching for this functionality.
Unless there is a similar solution for Clojure, which allows multiple REPLs multiplexed over a single socket, you could maybe just start a second Swank server by hand (from the
*inferior-lisp*buffer) and connect to it viaslime-connectas a workaround. (Can't test this ATM, since I stopped using Slime with Clojure a while ago.)Did you try the
slime-mreplcontrib? I have not actually used it myself, but a quick test worked for me under CCL/Win/Emacs 24.I tested it like this:
M-x slime, enter(sleep 10)in the REPL, switch buffer,M-x slime-new-mrepl.