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)

Reply via email to