Discussion:
geiser-xref-callers does not seem to work
Add Reply
Chris Marusich
2017-12-16 07:55:59 UTC
Reply
Permalink
Raw Message
Hi,

It seems that geiser-xref-callers does not work for me. I believe I've
configured Geiser correctly, since other commands like
geiser-edit-symbol-at-point and geiser-doc-symbol-at-point do work in
some cases.

Here is a specific example where it fails for me:

* Clone the Guix Git repository (for commit
9e111db4535b3cd5729e37294ae51d95240334b4 if you want to be precise):

git clone https://git.savannah.gnu.org/git/guix.git

* Configure Geiser for Guix as described in Guix's manual ((guix) The
Perfect Setup).

* Open gnu/system/vm.scm in the Guix source tree, and run
switch-to-geiser-module for the (gnu system vm) module.

* Place point on symbol expression->derivation-in-linux-vm on line 203
(in the definition of the iso9660-image procedure), and press "C-c <".

When I do this, I receive the following message in the minibuffer:

No callers found for ’expression->derivation-in-linux-vm’

And yet, if I run "M-x rgrep" on the same symbol, there are obviously
many call sites:

./gnu/system/vm.scm:68: #:export (expression->derivation-in-linux-vm
./gnu/system/vm.scm:105:(define* (expression->derivation-in-linux-vm name exp
./gnu/system/vm.scm:203: (expression->derivation-in-linux-vm
./gnu/system/vm.scm:274: (expression->derivation-in-linux-vm

What might the problem be? When I run "M-x geiser-doc-symbol-at-point"
on this symbol, it also claims that there is no documentation
available. I feel like maybe I've misconfigured something, but I don't
know what.

Here are the Geiser-specific things I've added to my ~/.emacs file:

--8<---------------cut here---------------start------------->8---
;; Tell geiser where guix checkout lives
(with-eval-after-load 'geiser-guile
(add-to-list 'geiser-guile-load-path "~/guix"))

(add-hook 'geiser-repl-mode-hook 'enable-paredit-mode)

;; Keybind customizations
(add-hook 'geiser-mode-hook
(lambda ()
(local-set-key (kbd "C-c m") 'switch-to-geiser-module)))
(add-hook 'geiser-mode-hook
(lambda ()
(local-set-key (kbd "C-c i") 'geiser-repl-import-module)))
--8<---------------cut here---------------end--------------->8---
--
Chris
Chris Marusich
2017-12-16 08:38:23 UTC
Reply
Permalink
Raw Message
Post by Chris Marusich
Hi,
It seems that geiser-xref-callers does not work for me. I believe I've
configured Geiser correctly, since other commands like
geiser-edit-symbol-at-point and geiser-doc-symbol-at-point do work in
some cases.
* Clone the Guix Git repository (for commit
git clone https://git.savannah.gnu.org/git/guix.git
* Configure Geiser for Guix as described in Guix's manual ((guix) The
Perfect Setup).
* Open gnu/system/vm.scm in the Guix source tree, and run
switch-to-geiser-module for the (gnu system vm) module.
* Place point on symbol expression->derivation-in-linux-vm on line 203
(in the definition of the iso9660-image procedure), and press "C-c <".
No callers found for ’expression->derivation-in-linux-vm’
And yet, if I run "M-x rgrep" on the same symbol, there are obviously
./gnu/system/vm.scm:68: #:export (expression->derivation-in-linux-vm
./gnu/system/vm.scm:105:(define* (expression->derivation-in-linux-vm name exp
./gnu/system/vm.scm:203: (expression->derivation-in-linux-vm
./gnu/system/vm.scm:274: (expression->derivation-in-linux-vm
What might the problem be? When I run "M-x geiser-doc-symbol-at-point"
on this symbol, it also claims that there is no documentation
available. I feel like maybe I've misconfigured something, but I don't
know what.
;; Tell geiser where guix checkout lives
(with-eval-after-load 'geiser-guile
(add-to-list 'geiser-guile-load-path "~/guix"))
(add-hook 'geiser-repl-mode-hook 'enable-paredit-mode)
;; Keybind customizations
(add-hook 'geiser-mode-hook
(lambda ()
(local-set-key (kbd "C-c m") 'switch-to-geiser-module)))
(add-hook 'geiser-mode-hook
(lambda ()
(local-set-key (kbd "C-c i") 'geiser-repl-import-module)))
--
Chris
Jose A. Ortega Ruiz
2017-12-16 18:45:45 UTC
Reply
Permalink
Raw Message
Hi Chris,
Post by Chris Marusich
Hi,
It seems that geiser-xref-callers does not work for me. I believe I've
configured Geiser correctly, since other commands like
geiser-edit-symbol-at-point and geiser-doc-symbol-at-point do work in
some cases.
* Clone the Guix Git repository (for commit
git clone https://git.savannah.gnu.org/git/guix.git
* Configure Geiser for Guix as described in Guix's manual ((guix) The
Perfect Setup).
* Open gnu/system/vm.scm in the Guix source tree, and run
switch-to-geiser-module for the (gnu system vm) module.
For geiser's functionality to be active, the module's has to be loaded in
the running guile session. Opening the file or switching to the module
without evaluation won't make available any of its definitions to the
running process. Have you tried compiling/loading the module? A quick
way of accomplishing that is with C-c C-k when you're in vm.scm.

jao
--
A student came to the master and asked, for the master was one of them
who knew such things: "Does Emacs have the Buddha nature?" The master
contemplated this for some time, and answered: "I don't see why not,
it has about everything else."
Andy Wingo
2017-12-18 09:34:14 UTC
Reply
Permalink
Raw Message
Post by Chris Marusich
* Place point on symbol expression->derivation-in-linux-vm on line 203
(in the definition of the iso9660-image procedure), and press "C-c <".
No callers found for ’expression->derivation-in-linux-vm’
And yet, if I run "M-x rgrep" on the same symbol, there are obviously
./gnu/system/vm.scm:68: #:export (expression->derivation-in-linux-vm
./gnu/system/vm.scm:105:(define* (expression->derivation-in-linux-vm name exp
./gnu/system/vm.scm:203: (expression->derivation-in-linux-vm
./gnu/system/vm.scm:274: (expression->derivation-in-linux-vm
What might the problem be? When I run "M-x geiser-doc-symbol-at-point"
on this symbol, it also claims that there is no documentation
available. I feel like maybe I've misconfigured something, but I don't
know what.
It appears to be a Geiser problem and not a Guile problem:

***@rusty:~/src/guix$ ./pre-inst-env guile
GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (gnu system vm))
scheme@(guile-user)> expression->derivation-in-linux-vm
$1 = #<procedure expression->derivation-in-linux-vm (name exp #:key system linux initrd qemu env-vars guile-for-build single-file-output? make-disk-image? references-graphs memory-size disk-image-format disk-image-size)>
scheme@(guile-user)> (use-modules (system xref))
scheme@(guile-user)> (procedure-callers $1)
ERROR: In procedure scm-error:
ERROR: expected a variable, symbol, or (modname . sym) #<procedure expression->derivation-in-linux-vm (name exp #:key system linux initrd qemu env-vars guile-for-build single-file-output? make-disk-image? references-graphs memory-size disk-image-format disk-image-size)>

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,q
scheme@(guile-user)> (procedure-callers '((gnu system vm) . expression->derivation-in-linux-vm))
$2 = (((gnu system vm) #<procedure qemu-image (#:key name system qemu disk-image-size disk-image-format file-system-type file-system-label file-system-uuid os-drv bootcfg-drv bootloader register-closures? inputs copy-inputs?)> #<procedure iso9660-image (#:key name file-system-label file-system-uuid system qemu os-drv bootcfg-drv bootloader register-closures? inputs)>))

I assume your Scheme files are indeed compiled?

Andy
Chris Marusich
2017-12-19 07:47:14 UTC
Reply
Permalink
Raw Message
Hi,

Thank you for the quick response!
Post by Andy Wingo
GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
$1 = #<procedure expression->derivation-in-linux-vm (name exp
#:key system linux initrd qemu env-vars guile-for-build
single-file-output? make-disk-image? references-graphs memory-size
disk-image-format disk-image-size)>
ERROR: expected a variable, symbol, or (modname . sym) #<procedure
expression->derivation-in-linux-vm (name exp #:key system linux initrd
qemu env-vars guile-for-build single-file-output? make-disk-image?
references-graphs memory-size disk-image-format disk-image-size)>
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
$2 = (((gnu system vm) #<procedure qemu-image (#:key name system
qemu disk-image-size disk-image-format file-system-type
file-system-label file-system-uuid os-drv bootcfg-drv bootloader
register-closures? inputs copy-inputs?)> #<procedure iso9660-image
(#:key name file-system-label file-system-uuid system qemu os-drv
bootcfg-drv bootloader register-closures? inputs)>))
I assume your Scheme files are indeed compiled?
Yes, I double-checked: even when the files are compiled, it doesn't seem
to work for me.
Post by Andy Wingo
For geiser's functionality to be active, the module's has to be loaded in
the running guile session. Opening the file or switching to the module
without evaluation won't make available any of its definitions to the
running process. Have you tried compiling/loading the module? A quick
way of accomplishing that is with C-c C-k when you're in vm.scm.
Since the files are already compiled, is this necessary? Either way, I
tried running C-c C-k (which is bound to geiser-compile-current-buffer),
and the problem still occurred.

Is this feature working for anyone else?
--
Chris
Loading...