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

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	other threads:[~2022-11-16 16:47 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
2022-11-16 16:41   ` Mekeor Melire [this message]
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=878rka7sv5.fsf@posteo.de \
    --to=mekeor@posteo.de \
    --cc=help-guix@gnu.org \
    --cc=luis.felipe.la@protonmail.com \
    /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).