reddit / emacs

sbcl: slime-who-calls -> "no references found for some-function"

Final-Recognition-61 · 2022-10-06 11:41
Hey guys, Im starting to learn some common-lisp but im struggling to get my IDE running correctly. I'm using a clean Emacs (v. 26) and have installed slime on it. I've got the following [hello.cl](https://hello.cl) and init.el [https://gist.github.com/LucyJohnson-lua4life/e8c97bf931b7fd5795f5b9b22739c19d](https://gist.github.com/LucyJohnson-lua4life/e8c97bf931b7fd5795f5b9b22739c19d). I started "slime" and executed "slime-compile-and-load-file" on [hello.cl](https://hello.cl), then i moved my cursor to the "some-function" symbol and executed "slime-who-calls". By now I would expect slime to show me the 3 other lines where "some-function" was executed but instead i got "No references found for some-function". Can somebody explain me how to fix this, or how to debug that?
EdwardCoffin · 2022-10-06 14:25
Who calls will show you other *functions* that call the referenced function. Those lines you were hoping to find are not functions. They were executed at the time the file was loaded, had no side-effects, and have now left no trace. You could include another function: (defun test-call () (some-function 2 3)) in the file, reload it and try again, it should find test-call.
Final-Recognition-61 · 2022-10-06 14:43
Ah perfect! Thank you very much.