Fork me on GitHub
#cider
<
2021-02-25
>
bozhidar08:02:28

> Is there a way to jump to the "code at point" from the stacktrace printed in the REPL buffer using a keyboard shortcut?

bozhidar08:02:40

Doesn't RET work here?

jumar07:02:47

No it doesn’t; only mouse click

danielneal14:02:17

Does anyone know how to clear all the repl output so I get a brand spanking totally clear buffer? I tried C-c C-o but it just prints ;output cleared and leaves all the previous mess I printed.

dpsutton14:02:38

use a prefix with that. C-u C-c C-o > (cider-repl-clear-output &optional CLEAR-REPL) > Delete the output inserted since the last input. > With a prefix argument CLEAR-REPL it will clear the entire REPL buffer instead.

danielneal14:02:53

perfect! Thank you 🙂

iperdomo15:02:56

Hi all, I would like to contribute a documentation change regarding cider-path-translations , the documentation refers to the "In the example above, the .m2 directory is mounted at /root/.m2 and the source at /src" but the example is not correct. What's the best repo to open the issue and a pull request? https://github.com/clojure-emacs/cider/blob/master/doc/modules/ROOT/pages/config/basic_config.adoc#translate-file-paths

iperdomo15:02:10

I would also like to extend the example with the use of eval pseudo-variable to use (clojure-project-dir) instead of a fixed project path. This is useful when having the .dir-locals.el shared across a team that have the cloned repo in different locations

dpsutton15:02:16

yeah i wish there was a second dir-locals that could be gitignored that each person could use

dpsutton15:02:00

so that kind of thing could go in there. what's wrong with the example though? I thought it was right. root/.m2 and src/ should be translated to users/foo and users/foo/project

iperdomo15:02:18

ah! yeah, you're right, any /root/* will get translated to /Users/someuser/*

iperdomo15:02:54

I'm more used to translate paths that are meaningful to the development, not any path under /root/

dpsutton15:02:34

i made that feature and it was pretty tailored to my then current work setup of working in a docker image. if you want to adapt it and make it more flexible/general go for it

iperdomo15:02:38

after checking https://github.com/clojure-emacs/docs.cider.mx I now understand that the actual documentation comes from cider main repo

dpsutton15:02:56

i had a very concrete problem at hand so there may be room for more generality

iperdomo15:02:37

We're using docker too, and a group of Linux and macOS devs, and came with this one - https://gist.github.com/iperdomo/88f3156dbb79fe99bc440d1700bb7162#file-dir-locals-el-L3-L8

iperdomo15:02:00

in the case of linux users the reported user is not root but akvo ... what I'm proposing is a general example on how to use eval to get clojure-project-dir call working

iperdomo15:02:06

does it make sense?

dpsutton15:02:01

in docker i figured the user would be consistent. you are all presumably using the same docker configs

dpsutton15:02:24

and i think we ended up just making a template file that was committed and then having everyone make their own (git ignored) dir locals

dpsutton15:02:37

as i think eval runs on every new buffer rather than just once

iperdomo15:02:46

I'm a basic emacs user (use it for CIDER only), so the whole eval and .dir-locals.el is new to me

dpsutton15:02:58

yeah. i'm not a big fan of it

dpsutton15:02:31

yeah. its an option. we just went with the far simpler template and make your own dir locals

iperdomo15:02:34

do you think it would be interesting/beneficial to contribute that approach of using eval?

iperdomo15:02:51

I'll open an issue and a PR, thanks

iperdomo15:02:25

re-reading the documentation again, what confused me was this In the example above, the .m2 directory is mounted at /root/.m2 but the example is the root folder is mounted as the host's home folder

iperdomo15:02:22

perhaps making explicit reference to /root/.m2 -> /Users/foo/.m2 makes that sentence less confusing?

dpsutton15:02:39

sure. fundamentally its just prefix matching. so whatever prefix you want, go for it

iperdomo16:02:01

Ok, issue and pr open - happy to change, improve it if needed - https://github.com/clojure-emacs/cider/pull/2989

enn15:02:18

@danieleneal there’s also cider-repl-clear-buffer. I’m not sure if it’s bound by default but I have it bound to C-c M-o.