unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Using guile (running on a port) in Org Mode
@ 2022-07-14 12:03 Munyoki Kilyungi
  2022-07-15 12:48 ` Tim Van den Langenbergh
  0 siblings, 1 reply; 5+ messages in thread
From: Munyoki Kilyungi @ 2022-07-14 12:03 UTC (permalink / raw)
  To: guile-user

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


Hi Guilers!

Recently I worked out a way to point an org src
block to any python environment I want:
<https://www.bonfacemunyoki.com/post/2022-07-12-gnu-guix-org-mode-guix-profiles/>.
WRT to scheme code, is there a way to tell a
scheme source block to run a guile interpreter
that runs on a given port?

-- 
(Life is like a pencil that will surely run out,
    but will leave the beautiful writing of life.)
(D4F09EB110177E03C28E2FE1F5BBAE1E0392253F
    (hkp://keys.gnupg.net))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

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

* Re: Using guile (running on a port) in Org Mode
  2022-07-14 12:03 Using guile (running on a port) in Org Mode Munyoki Kilyungi
@ 2022-07-15 12:48 ` Tim Van den Langenbergh
  2022-07-15 14:44   ` Munyoki Kilyungi
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Van den Langenbergh @ 2022-07-15 12:48 UTC (permalink / raw)
  To: Munyoki Kilyungi; +Cc: guile-user


Munyoki Kilyungi <me@bonfacemunyoki.com> writes:

> [[PGP Signed Part:Undecided]]
>
> Hi Guilers!
>
> Recently I worked out a way to point an org src
> block to any python environment I want:
> <https://www.bonfacemunyoki.com/post/2022-07-12-gnu-guix-org-mode-guix-profiles/>.
> WRT to scheme code, is there a way to tell a
> scheme source block to run a guile interpreter
> that runs on a given port?

Hello there,

it's been a little while since I looked at the ob-scheme code, but I believe
that you should be able to use an existing Geiser session as the execution
session for your Org buffer.  So if you connect Geiser to a running Guile
instance, give the Geiser buffer a unique name, and use that name as the
session parameter for your src block (plus or minus earmuffs) I think it should
work.

Vale,

- Tim



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

* Re: Using guile (running on a port) in Org Mode
  2022-07-15 12:48 ` Tim Van den Langenbergh
@ 2022-07-15 14:44   ` Munyoki Kilyungi
  2022-07-15 14:57     ` Zelphir Kaltstahl
  0 siblings, 1 reply; 5+ messages in thread
From: Munyoki Kilyungi @ 2022-07-15 14:44 UTC (permalink / raw)
  To: Tim Van den Langenbergh; +Cc: guile-user

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

Tim Van den Langenbergh <tmt_vdl@gmx.com>
anaandika:

> Munyoki Kilyungi <me@bonfacemunyoki.com> writes:
>
>> [[PGP Signed Part:Undecided]]
>>
>> Hi Guilers!
>>
>> Recently I worked out a way to point an org src
>> block to any python environment I want:
>> <https://www.bonfacemunyoki.com/post/2022-07-12-gnu-guix-org-mode-guix-profiles/>.
>> WRT to scheme code, is there a way to tell a
>> scheme source block to run a guile interpreter
>> that runs on a given port?
>
> Hello there,
>
> it's been a little while since I looked at the ob-scheme code, but I believe
> that you should be able to use an existing Geiser session as the execution
> session for your Org buffer.  So if you connect Geiser to a running Guile
> instance, give the Geiser buffer a unique name, and use that name as the
> session parameter for your src block (plus or minus earmuffs) I think it should
> work.
>

So I've renamed my buffer to "GUILE"

and now I have this:

#+begin_src scheme :results output :session "GUILE"
(+ 1 1)
#+end_src

But I get:

#+RESULTS:
: Geiser Interpreter produced no output

Anything I'm doing wrong?  I'll look into the
ob-scheme source later though.  Perhaps I'll find
answers there.

-- 
(Life is like a pencil that will surely run out,
    but will leave the beautiful writing of life.)
(D4F09EB110177E03C28E2FE1F5BBAE1E0392253F
    (hkp://keys.gnupg.net))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

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

* Re: Using guile (running on a port) in Org Mode
  2022-07-15 14:44   ` Munyoki Kilyungi
@ 2022-07-15 14:57     ` Zelphir Kaltstahl
  2022-07-16 19:19       ` Munyoki Kilyungi
  0 siblings, 1 reply; 5+ messages in thread
From: Zelphir Kaltstahl @ 2022-07-15 14:57 UTC (permalink / raw)
  To: Munyoki Kilyungi; +Cc: guile-user, Tim Van den Langenbergh

Hello Munyoki!

On 7/15/22 16:44, Munyoki Kilyungi wrote:
> Tim Van den Langenbergh <tmt_vdl@gmx.com>
> anaandika:
>
>> Munyoki Kilyungi <me@bonfacemunyoki.com> writes:
>>
>>> [[PGP Signed Part:Undecided]]
>>>
>>> Hi Guilers!
>>>
>>> Recently I worked out a way to point an org src
>>> block to any python environment I want:
>>> <https://www.bonfacemunyoki.com/post/2022-07-12-gnu-guix-org-mode-guix-profiles/>.
>>> WRT to scheme code, is there a way to tell a
>>> scheme source block to run a guile interpreter
>>> that runs on a given port?
>> Hello there,
>>
>> it's been a little while since I looked at the ob-scheme code, but I believe
>> that you should be able to use an existing Geiser session as the execution
>> session for your Org buffer.  So if you connect Geiser to a running Guile
>> instance, give the Geiser buffer a unique name, and use that name as the
>> session parameter for your src block (plus or minus earmuffs) I think it should
>> work.
>>
> So I've renamed my buffer to "GUILE"
>
> and now I have this:
>
> #+begin_src scheme :results output :session "GUILE"
> (+ 1 1)
> #+end_src
>
> But I get:
>
> #+RESULTS:
> : Geiser Interpreter produced no output
>
> Anything I'm doing wrong?  I'll look into the
> ob-scheme source later though.  Perhaps I'll find
> answers there.

I think you are facing the same problem I faced: 
https://gitlab.com/emacs-geiser/guile/-/issues/21

Long story short: ob-scheme needs a patch applied, and your version of ob-scheme 
probably does not have it yet.

Best regards,
Zelphir


-- 
repositories: https://notabug.org/ZelphirKaltstahl




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

* Re: Using guile (running on a port) in Org Mode
  2022-07-15 14:57     ` Zelphir Kaltstahl
@ 2022-07-16 19:19       ` Munyoki Kilyungi
  0 siblings, 0 replies; 5+ messages in thread
From: Munyoki Kilyungi @ 2022-07-16 19:19 UTC (permalink / raw)
  To: Zelphir Kaltstahl; +Cc: guile-user, Tim Van den Langenbergh

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


Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
anaandika:

[...]

> I think you are facing the same problem I faced:
> https://gitlab.com/emacs-geiser/guile/-/issues/21
>
> Long story short: ob-scheme needs a patch applied, and your version of
> ob-scheme probably does not have it yet.
>

Thanks for this feedback.  I'll have a look at
this later \m/\m/

-- 
(Life is like a pencil that will surely run out,
    but will leave the beautiful writing of life.)
(D4F09EB110177E03C28E2FE1F5BBAE1E0392253F
    (hkp://keys.gnupg.net))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

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

end of thread, other threads:[~2022-07-16 19:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 12:03 Using guile (running on a port) in Org Mode Munyoki Kilyungi
2022-07-15 12:48 ` Tim Van den Langenbergh
2022-07-15 14:44   ` Munyoki Kilyungi
2022-07-15 14:57     ` Zelphir Kaltstahl
2022-07-16 19:19       ` Munyoki Kilyungi

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