Re: Help evaluating in the context of another module

Arun Isaac <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <[email protected]>
Hi Nicolas,

> (save-module-excursion
>   (lambda ()
>     (set-current-module (resolve-module '(guix scripts pull)))
>     (reload-module (current-module))
>     (display %options)))

Sorry, my answer wasn't very helpful. I guess it refers to %options from
the top level rather than from (guix scripts pull). I am not immediately
able to think of a different approach, though. For some reason, even (@@
(guix scripts pull) %options) doesn't seem to work for me.

> This snippet displays %options of (guix scripts pull):
> (eval
>  `(begin
>     (reload-module (current-module))
>     (display %options))
>  (resolve-module '(guix scripts pull) #:ensure #f))
>
> But I guess at this point they almost have the same length/readability
> already.

I guess so.

Regards,
Arun
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.