unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* exploring the code
@ 2016-07-18 22:27 Catonano
  2016-07-19 12:31 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Catonano @ 2016-07-18 22:27 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

I opened the file guix/scripts/build.scm in Emacs

For Geiser to be able to jump to the definition of a symbol at point or to
open a documentation buffer, I need the Guile REPL to "load" the file

C-x C-b does the trick, but I see this error in the REPL, then

http://paste.lisp.org/display/320775

After that, many symbols become available anyway: I can jump to their
definition and I can have doc buffers popping up

All but one: "options->derivations" on line 670

I'm doing this because I'd like to redo in the REPL what the command "guix
build blah" does. At least some parts of it

In order to make it less abstract in my mind, to get aquainted with the
build subsystem. I need to see some procedures called and returning
something, I need to see macros expanded.

I hope you understand

If anyone can suggest a better way to get aquainted with the build
subsystem I'm all ears.

I'd like Geiser to work on all the symbols, though.

[-- Attachment #2: Type: text/html, Size: 1224 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: exploring the code
  2016-07-18 22:27 exploring the code Catonano
@ 2016-07-19 12:31 ` Ludovic Courtès
  2016-07-19 14:55   ` Mathieu Lirzin
  2016-07-19 16:36   ` Alex Kost
  0 siblings, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2016-07-19 12:31 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix

Catonano <catonano@gmail.com> skribis:

> I opened the file guix/scripts/build.scm in Emacs
>
> For Geiser to be able to jump to the definition of a symbol at point
> or to open a documentation buffer, I need the Guile REPL to "load" the
> file 
>
> C-x C-b does the trick, but I see this error in the REPL, then
>
> http://paste.lisp.org/display/320775

I use C-c C-k (geiser-compile-current-buffer), which works well for me.
Not sure what the problem is here.

> After that, many symbols become available anyway: I can jump to their
> definition and I can have doc buffers popping up
>
> All but one: "options->derivations" on line 670

Works for me after C-c C-k.  :-)

Could you try this and report back?  It’s a good idea to pre-build Guix
before, using ‘make’, so that Geiser doesn’t end up recompiling
everything.

> I'm doing this because I'd like to redo in the REPL what the command
> "guix build blah" does. At least some parts of it
>
> In order to make it less abstract in my mind, to get aquainted with
> the build subsystem. I need to see some procedures called and
> returning something, I need to see macros expanded.
>
> I hope you understand
>
> If anyone can suggest a better way to get aquainted with the build
> subsystem I'm all ears.

I think you’re right, it’s a very good idea to explore Guix this way.
This is more or less the approach I took in
<https://audio-video.gnu.org/video/misc/2016-01__GNU_Guix__Your_Distro_is_a_Scheme_Library.webm>,
so you might find it useful (you might also have suggestions on how to
improve this talk, which would be more than welcome!).

HTH,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: exploring the code
  2016-07-19 12:31 ` Ludovic Courtès
@ 2016-07-19 14:55   ` Mathieu Lirzin
  2016-07-19 19:27     ` Amirouche Boubekki
  2016-07-19 16:36   ` Alex Kost
  1 sibling, 1 reply; 7+ messages in thread
From: Mathieu Lirzin @ 2016-07-19 14:55 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Hi,

ludo@gnu.org (Ludovic Courtès) writes:

> Catonano <catonano@gmail.com> skribis:
>
>> I opened the file guix/scripts/build.scm in Emacs
>>
>> For Geiser to be able to jump to the definition of a symbol at point
>> or to open a documentation buffer, I need the Guile REPL to "load" the
>> file 
>>
>> C-x C-b does the trick, but I see this error in the REPL, then
>>
>> http://paste.lisp.org/display/320775
>
> I use C-c C-k (geiser-compile-current-buffer), which works well for me.
> Not sure what the problem is here.

'C-c C-k' (geiser-compile-current-buffer) works most of the time,
however this is not a silver bullet.  For example:

--8<---------------cut here---------------start------------->8---
;;; foo.scm
(define (where-is-foo)
  (display "foo!\n"))

(where-is-foo)
--8<---------------cut here---------------end--------------->8---

'M-.' when the point is on 'where-is-foo' procedure call won't find the
procedure definition even after 'C-c C-k'.  It only works in the context
of a module.

My point is that Geiser should not be expected to be 100% reliable.
'M-x rgrep' is sometimes a helpful complement.  ;)

Thanks,

-- 
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: exploring the code
  2016-07-19 12:31 ` Ludovic Courtès
  2016-07-19 14:55   ` Mathieu Lirzin
@ 2016-07-19 16:36   ` Alex Kost
  2016-07-19 20:15     ` Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: Alex Kost @ 2016-07-19 16:36 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Ludovic Courtès (2016-07-19 15:31 +0300) wrote:

> Catonano <catonano@gmail.com> skribis:
>
>> I opened the file guix/scripts/build.scm in Emacs
>>
>> For Geiser to be able to jump to the definition of a symbol at point
>> or to open a documentation buffer, I need the Guile REPL to "load" the
>> file 
>>
>> C-x C-b does the trick, but I see this error in the REPL, then
>>
>> http://paste.lisp.org/display/320775
>
> I use C-c C-k (geiser-compile-current-buffer), which works well for me.

I never liked this command.  I found it too slow, and I didn't
understand why it does so much, I always prefered
",use(<current-module>)".  That's why I added "C-c . u" key to
guix-devel-mode.  It does exactly that: uses the current module.

-- 
Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: exploring the code
  2016-07-19 14:55   ` Mathieu Lirzin
@ 2016-07-19 19:27     ` Amirouche Boubekki
  2016-07-21  3:34       ` Catonano
  0 siblings, 1 reply; 7+ messages in thread
From: Amirouche Boubekki @ 2016-07-19 19:27 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: help-guix, Help-Guix

On 2016-07-19 16:55, Mathieu Lirzin wrote:
> Hi,
> 
> ludo@gnu.org (Ludovic Courtès) writes:
> 
>> Catonano <catonano@gmail.com> skribis:
>> 
> 
> My point is that Geiser should not be expected to be 100% reliable.
> 'M-x rgrep' is sometimes a helpful complement.  ;)

I used to 'M-x rgrep' now I've bound 'C-x r' to silver searcher grep 
(command is ag).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: exploring the code
  2016-07-19 16:36   ` Alex Kost
@ 2016-07-19 20:15     ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2016-07-19 20:15 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2016-07-19 15:31 +0300) wrote:
>
>> Catonano <catonano@gmail.com> skribis:
>>
>>> I opened the file guix/scripts/build.scm in Emacs
>>>
>>> For Geiser to be able to jump to the definition of a symbol at point
>>> or to open a documentation buffer, I need the Guile REPL to "load" the
>>> file 
>>>
>>> C-x C-b does the trick, but I see this error in the REPL, then
>>>
>>> http://paste.lisp.org/display/320775
>>
>> I use C-c C-k (geiser-compile-current-buffer), which works well for me.
>
> I never liked this command.  I found it too slow, and I didn't
> understand why it does so much, I always prefered
> ",use(<current-module>)".  That's why I added "C-c . u" key to
> guix-devel-mode.  It does exactly that: uses the current module.

Good point, I should train my muscle memory to use this one.

Maybe Geiser should provide it in the first place?  (Basically a variant
of C-c C-a that doesn’t jump to the REPL.)

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: exploring the code
  2016-07-19 19:27     ` Amirouche Boubekki
@ 2016-07-21  3:34       ` Catonano
  0 siblings, 0 replies; 7+ messages in thread
From: Catonano @ 2016-07-21  3:34 UTC (permalink / raw)
  To: Amirouche Boubekki; +Cc: help-guix, Alex Kost, Help-Guix

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

2016-07-19 21:27 GMT+02:00 Amirouche Boubekki

My point is that Geiser should not be expected to be 100% reliable.
'M-x rgrep' is sometimes a helpful complement.  ;)

>
> I used to 'M-x rgrep' now I've bound 'C-x r' to silver searcher grep
> (command is ag).
>
>
Again, thank you people

[-- Attachment #2: Type: text/html, Size: 656 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-21  3:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-18 22:27 exploring the code Catonano
2016-07-19 12:31 ` Ludovic Courtès
2016-07-19 14:55   ` Mathieu Lirzin
2016-07-19 19:27     ` Amirouche Boubekki
2016-07-21  3:34       ` Catonano
2016-07-19 16:36   ` Alex Kost
2016-07-19 20:15     ` Ludovic Courtès

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).