This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-22
Channels
- # architecture (30)
- # beginners (56)
- # cider (16)
- # cljs-dev (12)
- # cljsrn (21)
- # clojure (169)
- # clojure-austin (1)
- # clojure-estonia (1)
- # clojure-italy (3)
- # clojure-russia (1)
- # clojure-spec (56)
- # clojure-uk (46)
- # clojurescript (53)
- # consulting (3)
- # core-async (3)
- # cursive (14)
- # data-science (16)
- # datascript (1)
- # datomic (26)
- # defnpodcast (11)
- # docs (3)
- # emacs (6)
- # fulcro (4)
- # graphql (24)
- # hoplon (8)
- # instaparse (4)
- # java (2)
- # jobs (1)
- # jobs-rus (1)
- # jobs_rus (1)
- # keechma (1)
- # luminus (2)
- # lumo (1)
- # mount (36)
- # off-topic (30)
- # om-next (5)
- # onyx (29)
- # precept (23)
- # re-frame (20)
- # reagent (2)
- # remote-jobs (9)
- # ring (2)
- # ring-swagger (3)
- # rum (3)
- # shadow-cljs (100)
- # spacemacs (17)
- # sql (10)
- # timbre (2)
- # unrepl (29)
- # yada (2)
(defun my-eval-outer-helper (handler)
(let ((beg-loc (point))
(mid-loc (point))
(end-loc (point))
(ss ""))
(save-excursion
(search-backward-regexp "(do \"[*]") (setq beg-loc (point))
(setq ss (cider-sexp-at-point))
(with-temp-buffer
(clojure-mode) (lispy-mode) (lispyville-mode) (insert ss)
(lispyville-delete (- mid-loc beg-loc) (point-max))
(setq ss (buffer-substring (point-min) (point-max)))
(message "sub exp: >>>\n%s\n<<<" ss)))
(cider-interactive-eval ss handler )))
(defun my-cider-eval-outer ()
(interactive)
(my-eval-outer-helper (cider-eval-print-handler) ))
This almost works, except that cider-eval-print-handler INSERTS RESULT INTO BUFFER, MODIFYING IT.
How do I get the default behaviour of "displays it in an overlay that vanishes on keypress" ?@bozhidar i’m working on https://github.com/clojure-emacs/cider/issues/1993 and pretty close to complete, but i’m now facing some issues on cider. I getting this error:
cider-profile-display-stats: Wrong number of arguments: ((cider-special-mode-truncate-lines cider-buffer-ns cl-struct-nrepl-response-queue-tags t) (request connection &optional abort-on-input tooling) "Send REQUEST to the nREPL server synchronously using CONNECTION.
Hold till final \"done\" message has arrived and join all response messages
of the same \"op\" that came along.
If ABORT-ON-INPUT is non-nil, the function will return nil at the first
sign of user input, so as not to hang the interface.
If TOOLING, use the tooling session rather than the standard session." (let* ((time0 (current-time)) (response (cons (quote dict) nil)) (nrepl-ongoing-sync-request t) status) (nrepl-send-request request (function (lambda (resp) (nrepl--merge response resp))) connection tooling) (while (and (not (member "done" status)) (not (and abort-on-input (input-pending-p)))) (setq status (nrepl-dict-get response "status")) (if (member "need-input" status) (progn (cider-need-input (current-buffer)) (setq time0 (current-time))) (if (and nrepl-sync-request-timeout (> (car (cdr (time-subtract ... time0))) nrepl-sync-request-timeout)) (progn (error "Sync nREPL request timed out %s" request)))) (nrepl-dict-put response "status" (remove "need-input" status)) (accept-process-output nil 0.01)) (if (member "done" status) (progn (let ((ex (nrepl-dict-get response "ex")) (err (nrepl-dict-get response "err")) (eval-error (nrepl-dict-get response "eval-error")) (pp-stacktrace (nrepl-dict-get response "pp-stacktrace")) (id (nrepl-dict-get response "id"))) (if (and ex err) (progn (cond (eval-error (funcall nrepl-err-handler)) (pp-stacktrace (cider--render-stacktrace-causes pp-stacktrace ...))))) (if id (progn (save-current-buffer (set-buffer connection) (nrepl--mark-id-completed id)))) response))))), 1
Seems the signature of some function got changed, but I it’s hard for me to tell which one when the stacktrace is formatted this way.
This is the code: cider-nrepl: https://github.com/jmayaalv/cider-nrepl/tree/feature/profile cider: https://github.com/jmayaalv/cider/tree/feature/profile
how can i get a better stacktrace? i am just pasting what i got on the messages buffer (sorry, really a newbie on emacs/elips dev)
@jmayaalv I meant better formatted. I simply can’t tell apart the stack frames in this.
Btw, also feel free to open PRs even now and we can discuss some things on the diff.