It was a helpful response!

With that information I looked into geiser-guile/src/geiser/evaluation.scm,
where the definition of compile* and ge:eval I think does the work you
mention:
(module (or (find-module module-name) (current-module))

Thanks for your help and, again, for all the work in this awesome package.

Pedro.


El vie, 1 nov 2024 a la(s) 7:31 p.m., Jose A. Ortega Ruiz (j...@gnu.org)
escribió:

>
> Hi Pedro,
>
> On Fri, Nov 01 2024, Pedro Mauro wrote:
>
> [...]
>
> > My question here is, what changes in geiser/guile after entering the
> > new module once? I was expecting that from the very beginning the
> > evaluation of some definition in a file that is a module will be
> > evaluated in that module's context, just like it happens after
> > entering the module.
>
> Geiser needs to know about a module to evaluate definitions in its
> context. That happens, roughly speaking, when what evaluates a
> define-module form.
>
> In some cases, modules are already defined when you start a fresh repl
> (there's a basic set that is loaded by default), and in others one needs
> first to load them so that they're defined. When geiser does not
> recognize a file's module because it's not defined, it evaluates the
> expression in the REPL's current module.
>
> A typical way of ensuring a module is recognised is with C-c C-k in a
> scheme buffer defining a module. But you could also evaluate (e.g. with
> C-c C-e, or C-M-x with point in it) the define-module form by itself,
> and you'll see how evaluating things from the on works in the context of
> the file's module.
>
> Hope this helps,
> jao
> --
> To kill time is not murder, it's suicide. -William James (1842-1910)
>


-- 
*4D Coorp* - Dip Dip Dirip Dip Corporation
*-- To change everything, start anywhere --*

Reply via email to