unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Luis Felipe <luis.felipe.la@protonmail.com>
To: Mekeor Melire <mekeor@posteo.de>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Emacs and Geiser: Completion for Guix specific code?
Date: Wed, 16 Nov 2022 14:51:51 +0000	[thread overview]
Message-ID: <Fktzx7BFi2lj2ekFfkDmi1tF_X94ix5coHESeJnPIZO7_I2oExGu-Wlq6SUDHQnl4qLDkMH5Rnc-43BNiGRJOGlD2xxZHIQdTVs12ATcg70=@protonmail.com> (raw)
In-Reply-To: <87wn7vjg8o.fsf@posteo.de>


[-- Attachment #1.1: Type: text/plain, Size: 1572 bytes --]

Hi Mekeor,


------- Original Message -------
On Wednesday, November 16th, 2022 at 11:07, Mekeor Melire <mekeor@posteo.de> wrote:

> 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 packages)
  ;;; Then, start typing and press C-M-i. It should complete.
  (package-di

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

Does that work for you?

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

  parent reply	other threads:[~2022-11-16 14:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2022-11-16 16:41   ` Mekeor Melire
2022-11-16 23:27     ` Luis Felipe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='Fktzx7BFi2lj2ekFfkDmi1tF_X94ix5coHESeJnPIZO7_I2oExGu-Wlq6SUDHQnl4qLDkMH5Rnc-43BNiGRJOGlD2xxZHIQdTVs12ATcg70=@protonmail.com' \
    --to=luis.felipe.la@protonmail.com \
    --cc=help-guix@gnu.org \
    --cc=mekeor@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).