Ludovic Courtès (2015-08-18 17:05 +0300) wrote:

> Alex Kost <alez...@gmail.com> skribis:
>
>> * emacs/guix-guile.el (guix-guile-current-module): New function.
>> * emacs/guix-devel.el: New file.
>>   (guix-devel-use-modules, guix-devel-use-current-module): New functions.
>> * doc/emacs.texi (Emacs Development): New node.  Document
>>   'guix-devel-use-current-module'.
>
> [...]
>
>> +@node Emacs Development
>> +@subsection Development
>> +
>> +This section describes some additional commands for Guix developers who
>> +use Geiser to work with guile code.
>
> s/guile/Guile/
>
> It’s fine to leave this section here, but there should be a sentence
> under “Contributing” with a cross-reference to here.

OK.

>> +@table @kbd
>> +
>> +@item M-x guix-devel-use-current-module
>> +Use the current guile module.  Often after opening a scheme file, you
>
> Capitalize “Guile” and “Scheme” here.
>
>> +want to use a module it defines, so you switch to the Geiser REPL and
>> +write @code{,use (some module)} there.  You may just use this command
>> +instead.
>
> Could you mention a use case here?  Like:
>
>   For instance, you may call this command while visiting a file that
>   defines packages; you can then switch to the associated REPL with
>   @kbd{C-c C-z}, which will be in the current module, which is handy.

The REPL will not be in the current module.  "M-x
guix-devel-use-current-module" is the equivalent of ",use", not
",module".  I thought the documentation was clear about that, no?

For switching to the current module, Geiser provides "C-c C-a" or
"C-u C-c C-z".

> The “-devel” part might make it sound like it has an effect similar to
> ‘pre-inst-env’ though.  Perhaps we should explicitly remind developers
> that they must set ‘guix-load-path’ appropriately?

Setting ‘guix-load-path’ will not take any effect here.  The whole point
of this guix-devel stuff is to provide additional commands for
scheme-mode, like Geiser does.  And these additional commands are
independent from Guix REPL; they are called in the current Geiser REPL
the same way you would use other Geiser commands.

So, for example, you open some guile file, you press some key bound to
‘guix-devel-use-current-module’ command to use this module in the
current Geiser REPL.  Then (if it's a module with guix packages), you
press another key to build the current package, or (in future) to
download the current package source, etc.

> Otherwise OK, thanks!

Thank you!

-- 
Alex

Reply via email to