Closed lassemaatta closed 11 months ago
Thanks!
We haven't touched this area in quite a while I believe, so probably you have found a corner case.
Regardless, it's worth fixing and I'll be looking into it.
I fixed what I consider to be the main issue, namely that we could try jumping to non-existing files (mislead from bad regex matches)
For those cases we'll throw a (error)
as usual for this section of the code. If it turns out to be annoying on click, LMK, although it shouldn't.
The regexes themselves are controlled by the cider-locref-regexp-alist
. If you'd want the clicking to work, you'd need to tweak them. From our side it would seem rather low-prio at given that:
Cheers - V
Great, thanks!
If you'd want the clicking to work
Speaking for myself, I'd rather just disable the clicking. I often have the REPL buffer open and when switching back to emacs from e.g. the browser by clicking (yes, I use the mouse, please don't hate me) on the emacs window, I would often accidentally click on one of these overlay lines in the REPL which would a) move the focus to emacs, b) open dired, and c) leave me confused :)
You can always set cider-locref-regexp-alist
to nil. Perhaps you'd want that only for remote projects - the clicking behavior seems generally useful.
Expected behavior
Accidentally clicking on a line in the REPL should not open
dired
:sweat_smile:Actual behavior
The logging framework (
com.taoensso/timbre
) of our app logs stuff in the REPL. Sometimes, some subsegments of these log lines get thecider-error-hoover
overlay. If you accidentally click on such line segment, adired
buffer opens in the project root folder.Full line in the REPL:
The section of the above line which acts as a link:
In other words, the rest of the line (
ms, 1 db calls took totally 2 ms
) does not get the overlay and does not act as a link.The
describe-text-properties
on such a line segment produces.Steps to reproduce the problem
Hard to say. I think this might have something to do with the
[] []
segment of the line. I think that this problem only affects lines which contain that part.Environment & Version information
CIDER version information
Lein / Clojure CLI version
Leiningen 2.10.0 on Java 17.0.8.1 OpenJDK 64-Bit Server VM
Emacs version
GNU Emacs 29.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2023-09-30
Operating system
Arch Linux
JDK distribution