emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Pascal Grossé" <pascal.grosse@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] Scheme code block evaluation doesn't show any result [9.5.\ 2 (release_9.5.2-25-gaf6f12 @ /usr/share/emacs/28.1/lisp/org/)]
Date: Fri, 29 Apr 2022 10:37:20 +0200	[thread overview]
Message-ID: <CAJ2OxOHY+1vMFuad8OyVcG-0Dh9hqENVmjkNCuQT-qLV0og4YQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 761 bytes --]

I configured a fresh emacs 28 installation to include the package
geiser-guile.

I tried to evaluate this simple org block (after activating scheme with
babel of course):

#+begin_src scheme :session test
(define x 42)
x
#+end_src

I get:
#+RESULTS:

The *Geiser Messages* buffer shows this:

ERROR: <5>: continuation failed ",geiser-eval #f (begin ;; -*- geiser-sch\
eme-implementation: guile -*-
(define x 42)
x
) ()"
(error Selecting deleted buffer)


I managed to track the bug to *ob-scheme.el*:

in (defun org-babel-scheme-execute-with-geiser, on line 179, simply
replace geiser-eval-region with geiser-eval-region/wait so that the
temporary result buffer doesn't close too soon. It then works as
expected.

Pascal Grossé

[-- Attachment #1.2: Type: text/html, Size: 1306 bytes --]

[-- Attachment #2: 0001-Bug-fix-for-scheme-code-block-evaluation-showing-no-.patch --]
[-- Type: text/x-patch, Size: 924 bytes --]

From cdc2c10f48585fb6328486d9821526f2bd994400 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pascal=20Gross=C3=A9?= <pascal.grosse@gmail.com>
Date: Fri, 29 Apr 2022 10:33:05 +0200
Subject: [PATCH] Bug fix for scheme code block evaluation showing no result

---
 lisp/ob-scheme.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el
index 72d2e029e..80a5b76ee 100644
--- a/lisp/ob-scheme.el
+++ b/lisp/ob-scheme.el
@@ -176,7 +176,7 @@ is true; otherwise returns the last value."
 	  (setq geiser-impl--implementation nil)
 	  (let ((geiser-debug-jump-to-debug-p nil)
 		(geiser-debug-show-debug-p nil))
-	    (let ((ret (geiser-eval-region (point-min) (point-max))))
+	    (let ((ret (geiser-eval-region/wait (point-min) (point-max))))
 	      (setq result (if output
 			       (or (geiser-eval--retort-output ret)
 				   "Geiser Interpreter produced no output")
-- 
2.36.0


             reply	other threads:[~2022-04-29 20:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  8:37 Pascal Grossé [this message]
2022-04-30  5:29 ` [BUG] Scheme code block evaluation doesn't show any result [9.5.\ 2 (release_9.5.2-25-gaf6f12 @ /usr/share/emacs/28.1/lisp/org/)] 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=CAJ2OxOHY+1vMFuad8OyVcG-0Dh9hqENVmjkNCuQT-qLV0og4YQ@mail.gmail.com \
    --to=pascal.grosse@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).