Fork me on GitHub
#cider
<
2018-02-05
>
gonewest81806:02:09

No, I only meant clojure-mode and cider-mode can work together but they’re intentionally not tied together. You can use clojure-mode without a repl at all (as you just saw), You can use clojure-mode with inf-clojure rather than CIDER.

bozhidar08:02:53

Indeed. clojure-mode doesn’t have any REPL-specific features and can be used with any REPL-powered mode (like CIDER). It just provided basic font-locking and code navigation commands.

benedek08:02:44

and some structural editing too ;)

kingcode16:02:25

Navigation question: I use cider-find-var to hop from one place to another in my source code and other libraries. 1) How do I navigate back to the previous jump and eventually to my starting point (or all at once to the start)? 2) Using cider-find-var replaces the buffer in the current window with the sought location…how would I have it go to another window, and can it be configured? Thanks for any comment…

dpsutton16:02:42

M-. will navigate to the source and M-, will pop the stack back to where you came from @kingcode

dpsutton16:02:53

period and comma if its difficult to read

dpsutton16:02:12

cider-pop-back is the function it invokes

kingcode16:02:42

@dpsutton Thank you! Will look into that.. M-, works fine, but I use evil-mode which overrides M-. but I have key for cider-find-var - will also look into cider-pop-back

dpsutton16:02:05

sounds good.

kingcode16:02:33

@dpsutton is it possible to do the same but have the target open in another window? Thx…

dpsutton16:02:28

do you mean cider-find-var will always open a new buffer?

dpsutton16:02:57

i think cmack answered your question in #emacs

kingcode16:02:22

@dpsutton indeed, it replaces whatever I am looking at with the new location

kingcode16:02:46

@dpsutton you’re right….thx!

dpsutton16:02:50

cider--open-other-window-p is a variable you can customize

dpsutton16:02:57

(defun cider-find-var (&optional arg var line)
  "Find definition for VAR at LINE.

Prompt according to prefix ARG and `cider-prompt-for-symbol'.
A single or double prefix argument inverts the meaning of
`cider-prompt-for-symbol'.  A prefix of `-` or a double prefix argument causes
the results to be displayed in a different window.  The default value is
thing at point."
  (interactive "P")
  (cider-ensure-op-supported "info")
  (if var
      (cider--find-var var line)
    (funcall (cider-prompt-for-symbol-function arg)
             "Symbol"
             (if (cider--open-other-window-p arg)
                 #'cider--find-var-other-window
               #'cider--find-var))))

kingcode17:02:52

@dpsutton Thank you very much…sorry, I should rely more on emacs help

dpsutton17:02:03

no problem at all

dpsutton17:02:15

i just bring it up because seeing the source is so trivial in emacs

dpsutton17:02:42

its a wonderful environment. and i like showing people that the CIDER source code is easily understandable and modifiable 🙂

kingcode17:02:09

True…C-h f, then entering over the file name, will do that 🙂

kingcode17:02:26

I love emacs, it’s really worth digging into