Re: Intercepting emacs nrepl input within cider

17 views
Skip to first unread message

Benjamin Schwerdtner

unread,
Mar 7, 2023, 7:49:51 AM3/7/23
to clo...@googlegroups.com
Here is a suggestion in the space of what you are asking: 
Assuming my-dsl-eval is a macro: 

```
(defun my-cider-dsl-eval-last-sexp ()
  (interactive)
  (cider-nrepl-sync-request:eval
   (format "(my-dsl-eval %s)" (cider-last-sexp))))
```


On Mon, Mar 6, 2023 at 4:28 AM Conrad <drc...@gmail.com> wrote:
Hi everyone, I'm not super familiar with the internals of cider/nrepl/etc, but I have a clojure project with a domain-specific language, and would like to be able to type DSL commands into the nrepl, and have custom clojure code that checks if it's a DSL command first, before forwarding it to the usual cider/clojure reader/evaluator.

I'd appreciate any quick pointers for how I would best go about doing this, if any of you folks understand these tools a bit better.

Thanks in advance for any tips!

Conrad Barski

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/f30bd8e5-015b-4965-8150-f3800db984f0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages