unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Emacs and Geiser: Completion for Guix specific code?
@ 2022-11-16 11:07 Mekeor Melire
  2022-11-16 11:49 ` Mekeor Melire
  2022-11-16 14:51 ` Luis Felipe
  0 siblings, 2 replies; 5+ messages in thread
From: Mekeor Melire @ 2022-11-16 11:07 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]

Hello,

when editing a Guix system declaration (system.scm) with GNU Emacs and
Geiser (and corfu.el), can I get completion for Guix specific code?
Right now, I only get completion suggestions based on generic Guile
modules. E.g. completing "(ope" (by pressing C-M-i) does not offer
"(operating-system", but only "(open" etc. from module (guile). Is there
any way to get completion for the Guix-specific code?

You can reproduce the reported behaviour as follows.

1. Save the attached mre.el and mre.scm files somewhere.
2. Modify the path to the Guix repository inside mre.el.
3. Make sure you have these packages installed, e.g. with a guix-shell:

   guix shell emacs emacs-corfu emacs-corfu-doc emacs-geiser \
     emacs-geiser-guile guile

4. Open that directory in a shell, navigate to the saved files, and
   launch Emacs:

   emacs -Q -l mre.el

5. In Emacs, open mre.scm, start Geiser with M-x geiser RET, navigate
   the cursor to "(opeHERE", and press C-M-i (which runs
   completion-at-point). You'll see that it does not suggest
   "operating-system". (Even if you have compiled all Guix inside your
   local clone of its repository.)

Kindly
Mekeor



[-- Attachment #2: mre.el --]
[-- Type: text/plain, Size: 327 bytes --]

(require 'corfu)
(setq
  corfu-auto t
  corfu-auto-prefix 0
  corfu-quit-no-match t)
(global-corfu-mode)

;; optional:
(require 'corfu-doc)
(add-to-list 'corfu-mode-hook #'corfu-doc-mode)

(require 'geiser-guile)
(with-eval-after-load 'geiser-guile
  (add-to-list 'geiser-guile-load-path "/home/user/path/to/guix/repository"))

[-- Attachment #3: mre.scm --]
[-- Type: text/plain, Size: 55 bytes --]

(use-modules
 (gnu)
 (gnu system)
 (guix utils))

(ope

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-16 23:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 11:07 Emacs and Geiser: Completion for Guix specific code? Mekeor Melire
2022-11-16 11:49 ` Mekeor Melire
2022-11-16 14:51 ` Luis Felipe
2022-11-16 16:41   ` Mekeor Melire
2022-11-16 23:27     ` Luis Felipe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).