emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
devn 2020-10-03T00:35:05.040700Z

hello fellow humans

devn 2020-10-03T00:35:34.041200Z

Is there any “who calls” or “who requires” functionality in clojure-mode?

devn 2020-10-03T00:36:21.042200Z

I’d like to have my cursor at point over a fn, hit a hotkey and see a list of callers. Similarly, I’d like to get a list of namespaces that require the namespace at point.

dpsutton 2020-10-03T00:38:46.042800Z

Lsp offers this. I think cider does as well. But not clojure mode

ericdallo 2020-10-03T02:23:58.043400Z

Yes, for #lsp, you can check here for more info: https://emacs-lsp.github.io/lsp-mode/page/lsp-clojure/

2020-10-03T04:19:46.046100Z

I have looked at the clojure-lsp install instructions, and it says to download a clojure-lsp file from the github LATEST release section, which I have, and it is in a format I've not encountered before, which about 3 lines of text at the beginning that look something like a few lines of bash script, but starting with ":;" instead of "#! /bin/bash" like I see more often, and after those 3 lines of text containing binary data that my macOS's "file" command recognizes as a zip file, to the extend that "unzip -v clojure-lsp" shows what looks like a JAR file contents. Is there a name for this trick that I can look up and read more about?

grav 2020-10-04T08:04:05.049700Z

The clojure-lsp that's downloadable from github is an executable thing, but you'll probably need to change its permissions in order to execute it. chmod +x /path/to/clojure-lsp Then try running it according to the troubleshooting guidelines: https://github.com/snoe/clojure-lsp/blob/master/docs/troubleshooting.md

grav 2020-10-04T08:05:25.050Z

Oh, d'uh - you asked about what makes it work, not why it doesn't work 😛

zilti 2020-10-04T17:08:57.050600Z

Yes, it is indeed normal shell script stuff. The JAR format apparently allows to add pretty much whatever you want at the beginning of the file up to the point where the jar itself starts.

2020-10-04T17:26:11.050800Z

But I have never seen a shell script that did not start with the #! characters before -- this one starts with :;, which is new to me. That is what surprised me most.

2020-10-10T21:23:03.056500Z

perhaps folks have tracked this down already, but fwiw, found this: > One day, while studying old code, I found out that it's possible to encode Windows Portable Executable files as a UNIX Sixth Edition shell script, due to the fact that the Thompson Shell didn't use a shebang line. via: https://justine.storage.googleapis.com/ape.html

2020-10-03T04:33:15.046400Z

possibly it's similar to what this does: https://github.com/BrunoBonacci/lein-binplus

2020-10-03T04:34:31.047300Z

sorry, this is not an answer to the actual question

2020-10-03T04:38:11.047700Z

here is an article that may touch on it: https://d2iq.com/blog/executable-jars

ericdallo 2020-10-03T13:18:44.048900Z

Yes @andy.fingerhut, this is exaclty what lein bin does, it is a jar blundled insize a executable linux file. You can learn more about it https://github.com/Raynes/lein-bin

2020-10-05T23:49:12.051900Z

it may be obvious to everyone who cares and a repeat, but fwiw there is a more up-to-date version with fixes (mentioned ealier in the channel). mentioning because of the security angle.

👍 1