This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-21
Channels
- # announcements (8)
- # babashka (12)
- # beginners (18)
- # biff (25)
- # calva (8)
- # clj-kondo (19)
- # clojure (53)
- # clojure-europe (3)
- # clojure-norway (3)
- # clojurescript (31)
- # emacs (9)
- # fulcro (12)
- # lsp (25)
- # membrane (1)
- # off-topic (58)
- # pathom (11)
- # pedestal (1)
- # proletarian (3)
- # re-frame (6)
- # releases (2)
- # shadow-cljs (7)
So I have a minimal pair here between the behavior of clj -- repl and cider REPL buffers. I've defined this, for a defrecord of JenaGraph:
(defmethod print-method JenaGraph
[x writer]
(.write writer (str "<JenaGraph hash=" (hash x)">")))
Under clj:
(make-jena-graph)
ont-app.igraph-jena.core=> <JenaGraph hash=510170619>
But in my cider REPL:
(make-jena-graph)
{:model
#object[org.apache.jena.rdf.model.impl.ModelCom 0x5bb69bcb "<ModelCom {} | >"]}
Thing is, everthing ins <ModelCom {}...> will include the entire contents of the model, which for large data sets will totally choke the REPL buffer. Hence the print-method redefinition.
So clearly there is something on the emacs/cider side that is using either the wrong print method, or some stale version of prn.
Where do I start to gain visibility into what's going on between pressing 'enter' in the REPL and the invocation of the 'P' in the REPL?I should add that prn
works just as expected in the cider REPL.
Hummm, you may be "experiencing" the effects of pretty printing in the REPL: https://docs.cider.mx/cider/repl/configuration.html#pretty-printing-in-the-repl
That did the trick! Thanks!
Looks like setting the value of cider-print-fn to nil defers to nrepl.middleware.print/*print-fn*
, which looks like it solves the issue for me. Thanks again.
Emacs just crashed on me because i deleted part of a comment that then left unmatched parens in that comment.
I understand that functionally isnt core emacs, but why isn't there any supervisor that stops things before they crash the whole program?
-debug-init
is kinda that, depending on the type of error
I noticed that I had to select a line either side of line comments that contains Clojure, otherwise something in Emacs got confused
Also had issues with line comments within a comment block hanging Emacs until I did C-g
I assume it's something trying to parse the code