Fork me on GitHub
#cider
<
2020-03-02
>
oliver13:03:28

Hi, is there an easy way to paste the last result rather than inspect it? Main use case would be creation of test data… Thanks!

4
yuhan14:03:13

usually what I do is cider-eval-to-comment (and then uncomment)

👍 4
yuhan14:03:50

or clone the form and then cider-eval-and-replace

👍 4
oliver14:03:27

Many thanks… this is exactly what I needed! Cheers!

ak-coram14:03:18

is eldoc broken for anyone else on current master? I'm getting There is no ElDoc support in this buffer

manuel14:03:54

I think eldoc-documentation-function and/or eldoc-documentation-functions must be set for ElDoc to work properly now.

manuel14:03:43

I see the first one is set to cider-eldoc, but the other one is nil. Although, I don't know exactly what has changed for ElDoc on Emacs master

manuel14:03:12

Not sure, but on master I see:

‘eldoc-documentation-function’
     This variable holds the function which is used to retrieve
     documentation for the item at point from the functions in the hook
     ‘eldoc-documentation-functions’.  By default,
     ‘eldoc-documentation-function’ returns the first documentation
     string produced by the ‘eldoc-documentation-functions’ hook.
Could this be the problem?

manuel14:03:01

For the sake of completeness, eldoc-documentation-functions documentation says:

Hook for functions to call to return doc string.

Each function should accept no arguments and return a one-line
string for displaying doc about a function etc. appropriate to
the context around point.  It should return nil if there's no doc
appropriate for the context.  Typically doc is returned if point
is on a function-like name or in its arg list.

Major modes should modify this hook locally, for example:
  (add-hook 'eldoc-documentation-functions #'foo-mode-eldoc nil t)
so that the global value (i.e. the default value of the hook) is
taken into account if the major mode specific function does not
return any documentation.

manuel15:03:28

@ak407 adding (add-hook 'eldoc-documentation-functions #'cider-eldoc nil t) should fix it. 🙂

ak-coram15:03:47

@manuel thanks a lot, I'll try your suggestion

manuel15:03:53

@bozhidar do you think a similar solution could be added to cider-eldoc-setup? I'm not sure that's the proper way to fix this problem, but I can confirm it is working for me.

bozhidar11:03:05

Not sure why this broke the old behavior exactly, but at least we have a good idea what’s going on. Please, file a ticket so we can investigate this further.

manuel11:03:02

@ak407 would you care to open the ticket with the problem you had?

bozhidar15:03:11

What’s your Emacs version? CIDER’s eldoc setup hasn’t been changed in years.

manuel15:03:35

GNU Emacs 28.0.50 (build 1, x86_64-debian-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10)
 of 2020-03-02

ak-coram15:03:59

same issue with GNU Emacs 28.0.50 (build 1, x86_64-unknown-freebsd12.1, Motif Version 2.3.8, cairo version 1.16.0) of 2020-03-02

manuel15:03:45

weird, it is working fine for me with that hook in place.

manuel15:03:50

long shot: try restarting Emacs 🙂

manuel15:03:27

could you try cider-load-buffer and see if you see something different?

ak-coram15:03:36

ah, I see this needs to be set locally

bozhidar15:03:13

Emacs 28? 🙂 I’m guessing that’s some dev build and they changed something there. They still haven’t even released Emacs 27.

practicalli-johnny21:03:59

emacs-snapshot packages from Ubuntu Emacs PPA are all from the Emacs 28 branch now. So I assume that there will be a release of Emacs27 before long.

deep-symmetry23:03:33

Hey, everyone! I’ve long been a happy CIDER user in Clojure, and suddenly find myself working in ClojureScript for a bit because I am building an integration for building diagrams in Asciidoctor/Antora, and can’t figure out how to get a shadow-cljs repl working. Can someone give me a hand? The project is here: https://github.com/Deep-Symmetry/bytefield-svg

deep-symmetry23:03:16

When I jack in, I seem to get a clj repl, but no cljs repl. A compounding factor may be that this is a project which builds a node module, so there is no “server”?

dpsutton23:03:43

it generates lib.js you should just run node lib.js and everything will wire up correctly

deep-symmetry23:03:24

But node lib.js terminates right away. It’s a library, not a server.

deep-symmetry23:03:01

I can get a repl in the terminal via npx shadow-cljs node-repl but CIDER doesn’t seem to be doing that.

deep-symmetry23:03:11

But, ah ha! If I do that and leave the terminal repl running, CIDER does seem to be able to connect to it.

deep-symmetry23:03:28

I just assumed that jack-in would take care of that the way it does for clojure projects.

dpsutton23:03:44

shadow should emit stuff to keep it running