Fork me on GitHub
#cider
<
2017-05-15
>
kiemdoder12:05:58

is there a cider function to dismiss the stack trace?

dpsutton13:05:18

@kiemdoder what do you mean? like to just dismiss the buffer?

kiemdoder13:05:01

hi @dpsutton, sometimes a new window is created for the stack trace and when I kill the stack trace buffer I'm still left with the window

kiemdoder13:05:48

I noticed that when I evaluate some code in a clj file that causes a stack trace the stack trace is dismissed when I fix the code and evaluate it again. That made me think that maybe there is a cider function to dismiss the stack trace. I looked through the cider functions but could not find one yet.

dpsutton13:05:22

I always hit q in the buffer to bury it.

dpsutton13:05:49

are you killing the buffer with emacs commands?

dpsutton13:05:21

the cider error buffer is a cider ancillary buffer. you can see how these things are created here:

dpsutton13:05:26

(defun cider-make-popup-buffer (name &optional mode ancillary)
      "Create a temporary buffer called NAME using major MODE (if specified).
    If ANCILLARY is non-nil, the buffer is added to `cider-ancillary-buffers'
    and automatically removed when killed."
      (with-current-buffer (get-buffer-create name)
        (kill-all-local-variables)
        (setq buffer-read-only nil)
        (erase-buffer)
        (when mode
          (funcall mode))
        (cider-popup-buffer-mode 1)
        (setq cider-popup-output-marker (point-marker))
        (setq buffer-read-only t)
        (when ancillary
          (add-to-list 'cider-ancillary-buffers name)
          (add-hook 'kill-buffer-hook
                    (lambda () (setq cider-ancillary-buffers (remove name cider-ancillary-buffers)))
                    nil 'local))
        (current-buffer)))

dpsutton13:05:36

this is in cider-popup.el

kiemdoder13:05:44

The "q" key was the thing I was looking for. Thanks a lot

kiemdoder14:05:07

I notice now that "q" is used elsewhere in emacs as well like dismissing a dired window for instance

xiongtx04:05:09

kiemdoder: That's right, q is bound to quit-window in special-mode-map, which is inherited by modes that derive from special-mode. See the Elisp manual for more: https://www.gnu.org/software/emacs/manual/html_node/elisp/Basic-Major-Modes.html

kiemdoder07:05:52

Thanks a lot for that reference @U2J7JRTDX. I'm getting a lot of valuable emacs information from people in this channel.

xiongtx07:05:31

You can also ask questions on the Emacs StackExchange: https://emacs.stackexchange.com/ But be sure to spend some effort trying to figure it out yourself first 😉. It’s one of the more heavily moderated SEs.

pesterhazy14:05:43

Yeah, like less