[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs and Geiser: Completion for Guix specific code?

From: Luis Felipe
Subject: Re: Emacs and Geiser: Completion for Guix specific code?
Date: Wed, 16 Nov 2022 14:51:51 +0000

Hi Mekeor,

------- Original Message -------
On Wednesday, November 16th, 2022 at 11:07, Mekeor Melire <> 

> 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?

You should be able to. I can get completion for Guix or any other library, 
although not automatically as with IDEs for other languages.

> 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?

As far as I know, you can only get completion for symbols defined in other 
modules and libraries if

1. The library is in Guile's load path and
2. The module import is evaluated

The first requirement is handled automatically when the library is installed 
with Guix. The second one too, if you are typing in a REPL. If you are typing 
in a file, it isn't; you have to command the evaluation yourself. For example, 
in Guix System, I start Emacs, visit a file, and run geiser-guile. Then, to 
call Guix's "package-direct-inputs", I type the following

  (use-modules (guix packages))

  ;;; C-c C-B to evaluate the buffer and get completion for symbols in (guix 
  ;;; Then, start typing and press C-M-i. It should complete.

  ;;; If you don't evaluate the module imports, completion won't work.

Does that work for you?

Attachment: publickey - - 0x12DE1598.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]