From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wI3TGkoHZGKFywAAbAwnHQ (envelope-from ) for ; Sat, 23 Apr 2022 16:03:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sFvAGkoHZGJybgEA9RJhRA (envelope-from ) for ; Sat, 23 Apr 2022 16:03:54 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2AE1C2B098 for ; Sat, 23 Apr 2022 16:03:54 +0200 (CEST) Received: from localhost ([::1]:47948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niGMa-0004dU-FQ for larch@yhetil.org; Sat, 23 Apr 2022 10:03:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFs6-0004ct-To for emacs-orgmode@gnu.org; Sat, 23 Apr 2022 09:32:23 -0400 Received: from mout.gmx.net ([212.227.15.19]:46511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFs3-0003Lh-Te for emacs-orgmode@gnu.org; Sat, 23 Apr 2022 09:32:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1650720733; bh=OtWf+SW99T4WQ7EbhAEGCYrnSuN5zuQjf229zAu8b38=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:Reply-To; b=fU0cqB2YfBgipTncxhOo6MAptbPTgdV4S+FZzjMmpHk3Vx7hGFdp4BpphTY13gIec QI0ui5U1v2TNs3/IT3GX+9IDuJLWISCPEFNhMdq/Y4QtJRJOLQil7l1ZU9Jv+vikRz FHWH1nb1VhyShx5ZJxDUpTHYsssTl3AfYt5v4EfA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from terra.tmtvl.info ([94.227.125.226]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MybGh-1o72Xo0g4z-00ywbb; Sat, 23 Apr 2022 15:32:13 +0200 References: <878rrw0w3x.fsf@terra.tmtvl.info> User-agent: mu4e 1.6.10; emacs 28.1 From: Tim Van den Langenbergh To: Felipe Lema Subject: Re: [PATCH] update ob-scheme to latest changes in geiser package Date: Sat, 23 Apr 2022 15:29:56 +0200 Message-ID: <874k2k0vtw.fsf@terra.tmtvl.info> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:VFSYL5D1PhRc61rQk3MmqDlhF8IBdypcNPWle3d+pcXaffr4//K +b88Q1+FJniAorFuwQKAnJGuAJ1AnpbvDuopajvMVTfbWgZnUEtyYGDgCm9hN+CBl4cRucw r77q8hM0OOx+/7ilMnk8F4wewoLXaBUsB7qVQKlC0j/KxHYZC1Z3Tf2mXFbRbsbjwX3rQ7b xT8lJzLgTrps7zTSHcp2g== X-UI-Out-Filterresults: notjunk:1;V03:K0:8/tBS6W87X4=:CtneR7MpfAdhKsjXF7oXGF SNUVvPg4+3eMxw/K7VF+THJ9UPJnF5T6dz918hXepcCHVqB5IzAXlxyZNuP37mZ+sbNEX9476 G5khCEdkL9j92rvI2MGhzeFFVEz17Z3zqhYlzF73fghe5yrI8KQQspyPpGrQYFGXDiPKjcu8u zr4EqIErMyiM0Pc+Vur+/h5iFJvv8SpgN+ccZsk0tgVCMKoAy/i7Pviyq7GdqKL9gOBKWKqAD 0q38MrcfsHL0LZfcRAx+JT0Toky6VBqX5K8qwhTkeV3ODIFjWKBt0/P8JLBf3afGDNWqmlVop RJfXUlEQV4X+vJAkOQmHVjR+G+3hjHaMUrtlxqNeGiYjyicWwvp/morektYnxFvHm5BRmR6Hx cRsx4LwHWI7iszisnrlMFwf09izA9swxSllT4kqeuF9CMbw7qMVCpItBDetpIQcZCcuFli+cO 1+yxluEaJ+BJch8wwL96B9H4ilE71cQ1CU3fthpH8wVYT28zWsRQ6ir6mbCf7YWmEZbOaa1af 5RTJfk59xn0YyvaTAVssuR0PsvKftURiOwGZMDvE4KWS3sWv6cAQ5KKJMsYFPV5cAD+sHGlpX f2U2lHILmxK/D2FDo12tM/dgKQv3xDbcPVJLA/nuRykKumn3FFUShSSYJdzZw2LPioQ4lfdXb n/JoKjEY7lPTPjzuWVCNDbBLeWF37WxnoOkbroRvn8M74CceFj++QjZjp1tAfRY2z2DBseeOI HbCc7rPz4JxvBqq+QH+GhKsCPgKoAQLsu1ZpVZYM2J6oRbd5cNtkxnr0vrQTLmx+VMI7Z8ZYm jkmQXCB0q0KZ3nDbiKJdujxggSy6OrhwmNIrW04ic1YUfjHH/r7hQffVoIcxLE9vCUdCCbWY8 PNY46safSdjZUdPxYmsNtBHUoBKoM6BfrziHlo37XNn9Qwkw+Yk+9ICI8ifeS+EuehQtTlMDl 6RddDyndg/zwTl4mzNMkvagJeg6YuBFr+7FpCjsdakcdE9oKWL2DEmWixea0GuB07HvCoIGwz K408CEYjIMe+LCHg/LXoAJIVBUrdZ8WRVAt8aeQFVIwPojsoTeLl/ZlQA1HKRwfPsGNNsW6nT YjMfUjZEcRLMv8= Received-SPF: pass client-ip=212.227.15.19; envelope-from=tmt_vdl@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 23 Apr 2022 10:03:23 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: 3462869.oopU1TnKvU@felipe-thinkpad-x200 Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650722634; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Hdalbj8vUTZBn/ihbOMLYBY9zoP5XCgV5xZDdRUuamA=; b=cI7Ueb8dWETInJeLyDW0Ybiopr+hjlS5aRI6cb4PliCrXGc36jcYPUwvUwwuvTC3b8+7vW VQWuKt54adlnVrt5Xise0IPou+oovd27XOAJ8WaH3hhkCHNJEgZpR5Cp4V5/qpuoHBYieb ubFiKslGSM534TZz3zBHudsu+jn2rLOCLW5LzgoiVtHQizpr8uUt6ozjaFua/dwdE1elka pIhegGpSv49O+/nr31xtV/eMlUy7ptF9BAwsh1XI7XPKrc+QuvwDMAt9ukyyrSIhK2lwNW NKPBrYeC74bhRHjU+4GWC3+zZzQeI29rF9FbWc11R79kHtgEOq9MQCBKGbJcvQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650722634; a=rsa-sha256; cv=none; b=r9ivPAVCHVbZQxqeu7aYesXNGY/BVBop1BUTWOveIszAmhMDqa4xqcRXI26RHXo2NoKzwR t23TLxD4QK1w4zEXBhhvu04pji90n9xJvVh50uJRtoKG1c28ML4ZvZSGX0dl5ZUyPihhyE ZkXdb1OrHeXk8VTQEEJqm26PGU4FTRqmLjn/MEWs/ioACX4PkIhuHf4TIVKYKP09VlLcqi e5X3QaUM+zi0H505vBh2aqepq+YjTTSbX2ITCRRx1xJ47paCQ1RfPr83UQ3FshMyqqwsPw skfTdCPnaq92fjxxiKC/EzqDnp68b1aS1gtC0guwKpvl/lHG6P7WeodQUQzFHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=fU0cqB2Y; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.08 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=fU0cqB2Y; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2AE1C2B098 X-Spam-Score: 6.08 X-Migadu-Scanner: scn1.migadu.com X-TUID: qa5fEa6283KF --=-=-= Content-Type: text/plain Felipe, I have taken the liberty of reformatting the patch you created for ob-scheme. You can find it enclosed. If it is fine with you and the org-mode maintainers it can be applied as-is, particularly since it is a tiny change. I have also added some additional information to the commit message, such as when the `geiser-eval-region/wait' function was introduced. Please feel free to contact me in regards to any comments or questions you may have. Vale, - Tim Van den Langenbergh --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-ob-scheme.el-Use-synchronous-eval.patch Content-Description: lisp-ob-scheme.el-Use-synchronous-eval Content-Transfer-Encoding: quoted-printable =46rom d06f6d5b7342693b4065c0c361e430c4bdb065e5 Mon Sep 17 00:00:00 2001 From: Tim Van den Langenbergh Date: Sat, 23 Apr 2022 14:57:27 +0200 Subject: [PATCH] lisp/ob-scheme.el: Use synchronous eval. * ob-scheme.el (org-babel-scheme-execute-with-geiser): If available, use the synchronous `geiser-eval-region/wait' function to get the evaluation result. Works with geiser 0.18 (before introduction of async evaluation) and geiser 0.22 (which introduces `geiser-eval-region/wait'). Modified from a patch proposal by Felipe Lema. TINYCHANGE =2D-- lisp/ob-scheme.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el index 72d2e029e..f28cadd87 100644 =2D-- a/lisp/ob-scheme.el +++ b/lisp/ob-scheme.el @@ -55,6 +55,8 @@ (declare-function geiser-mode "ext:geiser-mode" ()) (declare-function geiser-eval-region "ext:geiser-mode" (start end &optional and-go raw nomsg)) +(declare-function geiser-eval-region/wait "ext:geiser-mode" + (start end &optional timeout)) (declare-function geiser-repl-exit "ext:geiser-repl" (&optional arg)) (declare-function geiser-eval--retort-output "ext:geiser-eval" (ret)) (declare-function geiser-eval--retort-result-str "ext:geiser-eval" (ret p= refix)) @@ -176,7 +178,11 @@ 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 (funcall (if (fboundp 'geiser-eval-region/wait) + #'geiser-eval-region/wait + #'geiser-eval-region) + (point-min) + (point-max)))) (setq result (if output (or (geiser-eval--retort-output ret) "Geiser Interpreter produced no output") =2D- 2.35.3 --=-=-=--