help-guix
[Top][All Lists]
Advanced

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

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


From: Mekeor Melire
Subject: Re: Emacs and Geiser: Completion for Guix specific code?
Date: Wed, 16 Nov 2022 16:41:33 +0000

2022-11-16 / 14:51 / luis.felipe.la@protonmail.com:

> Hi Mekeor,

Hello Luis Felipe,

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

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


Yippie, it works! I just needed to run geiser-eval-buffer, bound to C-c
C-b. Now it completes imported identifiers as well, yay! :) Thank you
very much.

Still, a pity/bummer that it completion does not consider record-fields.
E.g. within the (operating-system) record, the completion could know
that I want to specify one of the record-fields, rather than suggesting
arbitrary identifiers. (Maybe it's because Scheme is not a typed
language.) Nevertheless, it's very helpful and nice.

Kindly
Mekeor



reply via email to

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