emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bruno Barbier <brubar.cs@gmail.com>
To: Roi Martin <jroi.martin@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Avoid "Scheme implementation" prompt on export
Date: Tue, 15 Oct 2024 12:50:38 +0200	[thread overview]
Message-ID: <670e4900.050a0220.3c2a44.4152@mx.google.com> (raw)
In-Reply-To: <87bjzm4g3x.fsf@gmail.com>

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

Roi Martin <jroi.martin@gmail.com> writes:

>> I tried with:
>>
>> #+begin_src scheme :scheme chez
>>   (+ 3 4)
>> #+end_src
>>
>> and also with ':scheme racket'.
>>
>> Unfortunately, it does not seem to work when exporting the document.
>>
>> Thanks for your help!
>>
>>         Roi

I've installed chez and racket.  Indeed, the argument :session
if half-ignored.

I've attached a quick ugly hack; with that change, it is now working
for me.

    #+begin_src scheme :scheme racket
      (banner)
    #+end_src

    #+RESULTS:
    : Welcome to Racket v8.14 [cs].\n

    (setq-default geiser-chez-binary "chezscheme")
    #+begin_src scheme :scheme chez 
      (scheme-version)
    #+end_src

    #+RESULTS:
    : Chez Scheme Version 10.0.0

Could you try it?

Bruno


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ob-scheme: Hack to pass the implementation to 'geiser-mode' --]
[-- Type: text/x-patch, Size: 918 bytes --]

From dbb3068bd3e22ee8d38c99c69061b26d3a4064d6 Mon Sep 17 00:00:00 2001
From: Bruno BARBIER <brubar.cs@gmail.com>
Date: Tue, 15 Oct 2024 12:42:44 +0200
Subject: [PATCH] ob-scheme: Hack to pass the implementation to 'geiser-mode'

---
 lisp/ob-scheme.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el
index 29fdcd1ec..7bf8acf6c 100644
--- a/lisp/ob-scheme.el
+++ b/lisp/ob-scheme.el
@@ -184,7 +184,9 @@ (defun org-babel-scheme-execute-with-geiser (code output impl repl &optional hos
       (newline)
       (let ((beg (point)))
         (insert code)
-        (geiser-mode)
+        ;; Hack to pass our 'impl' to 'geiser-mode'.
+        (let ((geiser-impl--implementation impl))
+          (geiser-mode))
         (let ((geiser-repl-window-allow-split nil)
 	      (geiser-repl-use-other-window nil))
 	  (let ((repl-buffer (save-current-buffer
-- 
2.45.2


  reply	other threads:[~2024-10-15 10:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 10:17 Avoid "Scheme implementation" prompt on export Roi Martin
2024-10-14 17:45 ` Bruno Barbier
     [not found]   ` <87bjzma6ml.fsf@gmail.com>
2024-10-14 19:52     ` Roi Martin
2024-10-15 10:50       ` Bruno Barbier [this message]
2024-10-19 13:36         ` Ihor Radchenko
2024-10-20 11:22           ` Bruno Barbier
2024-10-19 13:32 ` Ihor Radchenko
2024-10-20 11:36   ` Bruno Barbier
2024-10-20 11:40     ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2024-10-15 14:30 Roi Martin
2024-10-15 17:08 ` Bruno Barbier
2024-10-15 20:56   ` Roi Martin
2024-10-16  9:41     ` Bruno Barbier
2024-10-16 13:01       ` Roi Martin
2024-10-19 13:42         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=670e4900.050a0220.3c2a44.4152@mx.google.com \
    --to=brubar.cs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jroi.martin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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