I'm seeing he same issue. In a little digging, I think I've identified the
problem. However, not sure who this should be reported to.
The problem is in the org-babel-execute:clojure function. This function has the
following bit of code
expanded (cider-current-connection) (cider-current-...
In my case it was using a few old packages. The easiest way was to just upgrade all the packages. I was using the default download from the book Clojure for the Brave and True.
Steps (within Emacs):
M-x list-packages will list all packages
U will mark all packages to be updated
x will perform all the updates. You need to ...
(require <foo>) is treated specially when it's at top-level (it causes the compiler to require the file also, rather than only do the require at run-time).
If the require is not performed at compilation time, then your code can't be compiled properly since the define-clojure-indent macro won't be known during compilation, leading to mis-compilation, ...
For anyone who is still stumbling onto this error, I just managed to fix mine. The problem arises when trying to update the packages that are found in the emacs configuration for the Clojure for the Brave and True book. My guess is that something in the customization files makes emacs compile the packages wrong.
What I did:
First of all, the config file ...
Afterwards, you can use e.g.
C-c C-l (lisp-load-file) to eval a source file.
C-c C-e (lisp-eval-defun) to eval a statement.
Still, I can't imagine why someone wouldn't want to run SLIME.
@Stefan explained why you see what you see: Your require statement is not at top level of the file.
A solution to the byte-compiler not evaluating your (non top-level) require statement is to force its evaluation, using (eval-and-compile (require 'clojure-mode)).
The fact that require is evaluated by the byte-compiler when it is at top level is pointed out ...
Considering that Datomic is a commercial-grade database system with a Datalog query language, good scalability and time traveling capabilities, this is rather unlikely. I'm only aware of two database systems written in Emacs Lisp, BBDB (which is just lots of code for serializing contact data to Lisp vectors) and Elfeed's solution (which actually resembles ...
Projectile provides a projectile-toggle-between-implementation-and-test function with exactly this behavior. As stated in the docs, you can use C-c p t to "Toggle between an implementation file and its test file."
CIDER offers that functionality. Instead of using an extra declaration form, one puts the indentation info into the function's metadata:
"Ignores body, yields nil"
The normal way to do this within a session is to record the actions as a keyboard macro, and then bind that macro to a key. You can also save the macro and binding to a file to use it across sessions. The details are provided in the Emacs manual.
there is an option to run all the tests in all the projects namespaces
M-x cider-test-run-project-tests or C-c C-t C-p
Here is the link to additional options for running tests
First follow these instructions on the Readme so that boot knows about CIDER.
Boot users can configure the tool to include the middleware automatically in all of their projects using a ~/.boot/profile.boot file like so:
concat '[[cider/cider-nrepl "0.9.1"]])
Although this is not pristine elisp, the following should work.
(defun my-cider-eval-paragraph ()
Note this is exactly what you wrote, except the macro is called saVe-excursion.
I think this is related to some breaking changes in Emacs 25.0.*
I'm still running 25.0.* and solved the problem by installing expand-region from MELPA where a fix to workaround Emacs versions 25+ has been implemented.
Note: Do not use the version (0.10.0) in MELPA stable since it does not work.
The problem only occurs after you've turned paredit on and off: this is because clojure-mode adds a hook to paredit-mode, and that hook adds some paredit-mode keybindings to the clojure-mode map.
In other words, turning on paredit-mode makes changes to clojure-mode keybindings and those changes stick even if you turn off paredit-mode. The really surprising ...
In Vim, the . key repeats the last change made in normal mode.
The slurping scenario you describe is some random function that is beyond evil. Your guess is as good as mine in regards to how that function works in relation to normal mode. Since it's not likely a bonafide normal mode operation, there's no guarantee that it will be repeatable with evil-...
Based on the examples in section Customizing Search-Based Fontification of the elisp manual, I would propose this:
'(("\\(@\\)" 1 '(:foreground "red") prepend)))))
This uses an anonymous face with red foreground, any face could of course be used.
There are now instructions for configuration with emacs lsp-mode. The following is taken from what's currently there. You will need to start by putting the clojure-lsp executable on your path.
(make-lsp-client :new-connection (lsp-stdio-connection '("bash" "-c" "clojure-lsp"))
It turns out that lsp-mode is currently being reworked. That means that the syntax for registering servers works different now:
(make-lsp-client :new-connection (lsp-stdio-connection "pyls")
So you might need to check out the latest README on github for ...
To get the result of the last sexp in a block use the following argument in the header: :results value pp.
To evaluate using cider withing the code block, bind cider-eval-last-sexp within org in your .emacs as follows:
(org-defkey org-mode-map "\C-x\C-e" 'cider-eval-last-sexp)
further more for documenation use:
(org-defkey org-mode-map "\C-c\C-d" 'cider-...
Use global-set-key to create or change a global key binding.
Use define-key to create or change a local (mode-specific) key binding, that is, a binding in a particular keymap.
Use the Emacs manual to find out about these things: C-h r.
In the manual, use i to look something up in the index, using completion. For example, i key bindings (or i key bind TAB ...
By pass in target directory as path into Clojure code, and use java.io.File.renameTo to move generate plot image file to target dir.
Here is the complete story background: https://stardiviner.github.io/Blog/Clojure-Plotting-to-Org-inline-image-in-ob-clojure.html
Here is a complete example:
#+begin_src clojure :results file link :dir "data/images" :file "...
It seems that your package archive metadata is corrupted.
Try renaming your .emacs.d temporally and re-run with your init.el.
mv ~/.emacs.d ~/.emacs.d-tmp; emacs -Q -l path/to/init.el
I can setup successfully with your init.el pasted above (replacing last defvar with package-install).
The latest official Emacs release is 24.5, and the developer of expand-region is not supporting development versions (i.e., 25+). This is not unreasonable, as there are frequent changes in the Emacs 25 branch that break and un-break expand-region, such as demonstrated in the question here. Keeping up with them would be a big job for little benefit.