Comments (6)
Hello! It's very new experimental possibility and not well-documented yet.
Please, add [clomacs "0.0.3-SNAPSHOT"]
to your project.clj
:dependencies
.
Then terminate your REPL (if running) and try again.
from clomacs.
Furthermore if you develop your own Elisp-Clojure Emacs extension, you should add library info to all related clomacs-defun
wrapped functions.
(require 'clomacs)
(clomacs-defun your-libname-set-emacs-connection
clomacs/set-emacs-connection
:lib-name "your-libname")
(clomacs-defun your-libname-close-emacs-connection
clomacs/close-emacs-connection
:lib-name "your-libname")
(clomacs-defun your-libname-require
clojure.core/require
:lib-name "your-libname")
(defun your-libname-httpd-start ()
(cl-flet ((clomacs-set-emacs-connection 'your-libname-set-emacs-connection)
(clomacs-require 'your-libname-require))
(clomacs-httpd-start)))
(defun your-libname-httpd-stop ()
(cl-flet ((clomacs-close-emacs-connection 'your-libname-close-emacs-connection)
(clomacs-require 'your-libname-require))
(clomacs-httpd-stop)))
from clomacs.
Thanks! I'll try what you've suggested and let you know the results!
So what you are saying is that I should include such code as above in my elisp part of the plugin, then start httpd server with such custom function your-libname-httpd-start
from emacs config and things should work properly? (of course after adding dependency in project.clj
).
from clomacs.
Yep. But beware, anytime you run (your-libname-httpd-start)
, nREPL server will start too (of not yet) to be sent Emacs http server parameters (host & port) to Clojure side.
If you don't want to run (your-libname-httpd-start)
in the time you load .emacs
with your lib required, you can use :httpd-starter
parameter for clomacs-defun
See complete example here:
https://github.com/kostafey/cm-test/blob/master/src/elisp/cm-test.el#L39
https://github.com/kostafey/cm-test/blob/master/src/clj/cm_test/core.clj#L10
In this example, when you run (cm-test-strong-emacs-version)
at the first time, both nREPL server and Emacs http server will start, then Clojure side code will ask Emacs about its version, add some markdown marking chars to version string and return the result to Emacs side.
from clomacs.
autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it
from clomacs.
TODO: Update README.
from clomacs.
Related Issues (13)
- nrepl not found HOT 1
- Passing escaped substrings HOT 1
- cdr: Wrong type argument: arrayp, ("clojure-test") HOT 2
- Please make cljs-clomacs. HOT 8
- Create clomacs server HOT 2
- Try README CLJ call Elisp function demo error HOT 1
- Passing map to clojure via alist HOT 6
- Adding babashka as runtime HOT 3
- Async call-type example
- Error: Symbol’s function definition is void: clomacs-doc HOT 2
- void variable clomacs--doc HOT 13
- Warning msg when installing in spacemacs and the dependent package (ejc-sql) fails to install HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clomacs.