emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [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/)]
@ 2022-04-29  8:37 Pascal Grossé
  2022-04-30  5:29 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Pascal Grossé @ 2022-04-29  8:37 UTC (permalink / raw)
  To: emacs-orgmode


[-- 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


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

* Re: [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/)]
  2022-04-29  8:37 [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/)] Pascal Grossé
@ 2022-04-30  5:29 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2022-04-30  5:29 UTC (permalink / raw)
  To: Pascal Grossé; +Cc: emacs-orgmode

Pascal Grossé <pascal.grosse@gmail.com> writes:

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

Duplicate of https://orgmode.org/list/874k2k0vtw.fsf@terra.tmtvl.info

Best,
Ihor


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

end of thread, other threads:[~2022-04-30  5:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-29  8:37 [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/)] Pascal Grossé
2022-04-30  5:29 ` Ihor Radchenko

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