This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-30
Channels
- # announcements (31)
- # aws (17)
- # babashka (26)
- # babashka-sci-dev (8)
- # beginners (16)
- # biff (1)
- # calva (9)
- # cider (5)
- # clj-kondo (3)
- # clj-on-windows (38)
- # cljdoc (2)
- # cljs-dev (9)
- # cljsrn (6)
- # clojure (58)
- # clojure-europe (47)
- # clojure-nl (3)
- # clojure-norway (21)
- # clojure-uk (2)
- # clojurescript (25)
- # conjure (2)
- # data-science (7)
- # datomic (3)
- # emacs (12)
- # events (5)
- # fulcro (5)
- # honeysql (10)
- # introduce-yourself (7)
- # lsp (4)
- # meander (3)
- # nbb (18)
- # off-topic (28)
- # rdf (1)
- # releases (2)
- # sci (5)
- # shadow-cljs (23)
- # sql (5)
- # test-check (3)
oooh I didn't know about that, thanks @tomd
maybe also relevant for other reasons https://evil.readthedocs.io/en/latest/faq.html#underscore-is-not-a-word-character
when i try to find the source code for nconc
in
(defun nrepl--eval-request (input &optional ns line column)
"Prepare :eval request message for INPUT.
NS provides context for the request.
If LINE and COLUMN are non-nil and current buffer is a file buffer, \"line\",
\"column\" and \"file\" are added to the message."
(nconc (and ns `("ns" ,ns))
`("op" "eval"
"code" ,(substring-no-properties input))
(when cider-enlighten-mode
'("enlighten" "true"))
(let ((file (or (buffer-file-name) (buffer-name))))
(when (and line column file)
`("file" ,file
"line" ,line
"column" ,column)))))
via find-function
emacs tells me that helm-M-x-execute-command: The C source file fns.c is not available
how do i make it avialable, i want to try and debug an issue with cider enlighten-mode where the overlays (the evaled part thats showing) wont go away and blocks my cursor from moving up and down the file. Also if anyone has an alternative to using this mode, which i find really helpful, i would be open to hearning it.You need to install the Emacs sources that were used to compile your Emacs version. Or at least the sources for the same Emacs major version (e.g., Emacs 27.x, 28.x, etc). In that case, there might be minor differences, but I wouldn't expect changes in something as fundamental as nconc
.
In any case, I traced the execution for (find-function 'nconc)
and this is the call chain:
find-function -> find-function-do-it -> find-definition-noselect -> find-function-noselect ->
find-function-search-for-symbol -> find-function-C-source
because nconc
is a built-in function that is implemented in C (you can get that tidbit from its docstring).
If you have a look at find-function-C-source
you will see that it uses find-function-C-source-directory
var to try and find the Emacs sources for its C files. find-function-C-source-directory
will be nil
if the original directory used to build that version of Emacs (whose value is in source-directory
var) no longer exists. Which I suspect is your case.
If find-function-C-source-directory
is nil
, Emacs will ask you for a directory where it can find the C source files. If you don't provide a valid one, it will tell you that it can't find the required C file (`fns.c` in your case).
If you don't want to install the sources for Emacs, you can browse them either in the original GNU Savannah server, where Emacs is developed, or in the Github emacs-mirror
repository. Here's a link to the nconc
function definition using the Github mirror, for the Emacs 28 branch: https://github.com/emacs-mirror/emacs/blob/emacs-28/src/fns.c#L2767-L2798Also, I've never used enlighten-mode myself, https://docs.cider.mx/cider/debugging/enlighten.html: > To stop displaying the locals you’ll have to disable cider-enlighten-mode and reevaluate the definitions you had instrumented previously. So it seems like they don't go away when you start interacting with the buffer again, and you need to manually remove them by disabling enlighten-mode.
@U8T05KBEW Thanks, yeah i'll have to look into installing the sources. Though at the point at which i'm reading C i'm probably going to forget what i was looking at in the first place 🙂 . For me, on doom (no personal customization to the init file) and spacemacs, with emacs 28.1 installed via a snap on ubuntu, enlighten mode doesn't always removing highlighting. So i'm trying to figure out why by debugging it. Hopefully i'll make some progress today.
Does anyone know how to complete npm
commands like on regular terminal with zsh, but in eshell or in shell?
if i run "shell" in emacs, my "shell" does to autocomplete. But i'm using spacemacs so it's possible they set something by default there.
oh npm commands...
yea npm instal*
where * is the cursor also doesn't offer "install" as an option.
I feel like it's probably best to use a shell for anything really shelly.
https://github.com/JonWaltman/pcmpl-args.el may help there but some configuration might be needed.
Thanks, I found a way to make it work. Switched from shell/eshell to vterm