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 6JWyAWdhdmL/LAAAbAwnHQ (envelope-from ) for ; Sat, 07 May 2022 14:09:11 +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 QEPuAWdhdmJXDQEA9RJhRA (envelope-from ) for ; Sat, 07 May 2022 14:09:11 +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 B09A123CAB for ; Sat, 7 May 2022 14:09:10 +0200 (CEST) Received: from localhost ([::1]:40502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnJFF-0002Rh-Fy for larch@yhetil.org; Sat, 07 May 2022 08:09:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnJEF-0002PR-Dq for emacs-orgmode@gnu.org; Sat, 07 May 2022 08:08:07 -0400 Received: from mout.gmx.net ([212.227.17.22]:56963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnJED-0000Sr-9h for emacs-orgmode@gnu.org; Sat, 07 May 2022 08:08:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1651925281; bh=Ewrr7v1drNXGImx1k/g+9k1kBGFcqDVM7pt1H4/2jSg=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=d+7PZKQWBEJG7cX9m+mOmgTcPu45CRLdA9eh4F3ZFDp8neW/ldweSiKBA6QD1GL73 Wo1A3cqrIB3BoJyJdLKuMIvyuN6z0gOl2Db3BtEl6RCax5XaSz06LkPUeOUAcRrLvH ZgngReDs/QALy3gZtOIbEqN5UWzp9f9cf3G/WH2o= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from terra.tmtvl.info ([94.227.125.226]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Mzyyk-1nyx4303uw-00x36R; Sat, 07 May 2022 14:08:01 +0200 References: <878rrw0w3x.fsf@terra.tmtvl.info> <874k2k0vtw.fsf@terra.tmtvl.info> <87r15ivru7.fsf@localhost> User-agent: mu4e 1.6.10; emacs 28.1 From: Tim Van den Langenbergh To: Ihor Radchenko Cc: Felipe Lema , emacs-orgmode@gnu.org Subject: Re: [PATCH] update ob-scheme to latest changes in geiser package Date: Sat, 07 May 2022 14:04:35 +0200 In-reply-to: <87r15ivru7.fsf@localhost> Message-ID: <87y1zd1r6t.fsf@terra.tmtvl.info> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:faHximqMyBtMJlfnVdPtoc0r9GD9cXZqbjHChxR0xzFwHmcWT/d +PjAegjjyfl/RMkgfDwPTEYkDIgIueGA1bFiWxanvHud8VheLhnoY6MFmNfI0ef1RnrNhxG cHfVTiEFyecJ4mda+NPvo1MzAxXU079EmUuNAODZ5QtqsaaTcLY/J2z8CBLfxxKLsDxfbZx QF+aT6xgF/RJota8TP0+A== X-UI-Out-Filterresults: notjunk:1;V03:K0:V2TJZAco/FQ=:ATDiiZnX6XR29p5jvf66wI OyLjcJ2UK1RglvOijZdRP/qLYllvYezCBp8q2ZLVC45aq6XvaQO0A/rFR4tm+Lt2VzDEZDEBk 4l0AZVv0GdNZgcPOqJWMc0cfiWKoubAkyM7FF7DbIU/edGBAleNiS7js8/RKyfUCudeojZG10 AMe8LRb+PLMSpX5ZmN338CriFWt56qccJytg2E+GmQUJ2cUifj4AsHq2nPumsRbbV1LQpwrFb uqzpHnua0+gx3fCvzKKRwv72SGUWzKVtEJZkCMVWA1tMOK0KVVFJozLlqXwfGbC/V8SmGnbky fftgewNlIb+GD+d6djYgU0rcA02AVem9RwmRNsAcHyyXUQ1qRruizjUmlN6kG44AeTkAMGG+U HTjr7D2109BD2cngqyuFoeIWngn+nxPq+SZZe8wV5mlS97irLo+i6ek7zGaWZsjiKsfkxl5PV 60ACd1sAacxyctLeXMW4IhxNG5yt7u4vuDW9eJx8MtU9/7YOYNfbdaqxqJ1Rs0SMaAfCccfnf Nc6RzCJEjEnQIRsseCXgf64RxS0xoMXF13MTnNoao+6bHUUQECaHVgJM7QCL4Pe14+COwgfbH +5EYETGJazwts6AM2CIX9s1hwXToM11J94kuz3jyRc8GNOwB6CedEFyFJ8ROApwEQjsFroVdk dEjlbq00aZdWvid16ESer8E3NII1CPJPBOPXyfSjMVvqO9cMCTxkfvSYsXXIFEd8a/GPsC601 X55oYKNH3McJetiB0aJVKLRnn4+TCIaed/HvcV1FvyxhtuhoCIAnUzAYPyQXD4pfga2DKX92w p7SbLfWnD3xcLWQ3DeWJCSBYeo2KbsYLBjjz+DCP5kuQFprLIhtjs6fei2ZC7DbWpchHUHhFz mI3m4YaG59eGAIyjVoLf6s4NqORzaY8YZ7kERW/Xcisvr5NyLuv/mhFIMvQcZuPU3hZyzuCiT t89hn7D5wi5vP2j/WIB5dYy37sG7m+TaYaGnYGXOcv9p07TFTQlGIwDob8ZaBMyulpETAfiez /4IZTq57Lr3jhuMDVFkWwBN+vehdMkzhu6kO2LFxyeAoW4bygLsv7GvTRYgRL77kuuYLtSnYo 6pW+BwkNH6uTFM= Received-SPF: pass client-ip=212.227.17.22; 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-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: , 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=1651925350; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ovhXKCSM0v3YwnTuGX0tnUibcOHXZ3TXsCEGhSWUf/M=; b=k04kFlx9xf8QJl3VkmZvq4zPX95CJhv8/CsMfT7t8yhW/u1ZbffTYS/GgWhY66uXNfxVtv 2ttG8sjKDuP5wd8jTBrz6ZmaAdOPBDuiVgLEFTsJJmDg5ouedPmVeyP4+RCZRvk1xN/33r clPlZNA4PQ/Tb2eCz7xrhzjB0s/dPlHWYpfTqpijsn/w9DHblWOHUptBsa4id6pJ3YiAIz Eu1CwiYCQnWXAUyBS6mr9rwbziiB14YSU8Y82Lxnq08A15SQzPXhADHRDZTQ+dA6KYBO8g rTl+NIjjyxupe0iJzUJdtMWrH2vtsHmFx2qSuwKD+EaUDBh65CCD+FX33PxRxw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651925350; a=rsa-sha256; cv=none; b=keoNlIxWazC8R6w9/6n8ptku8rHLY4mZPPsRIrVjBfH4ZkyZdtR6Hl+vVQM11vR9fdqUhz buuMMEIP0kcGAbpEKyoiNlQAyAfU5is1vxAcZyMd1vVQ7w7hfHTD42NUrRRWoosQNKGP5l XuoG/UqvZcmJLq3UjdItv0XNQYHOrEBoG2KfwYHJomnlRnht/3J9WWgplioWyVOxQdOtxh aJ53g91DEKfn1kZLGzvtd193YdzpFxWH1rh6a0HCpCb4pIcL7mXVr4fVmYq1yQCTPhgMjI TmqXIGKIKprdUxBAhYsT7K0jBHYE8BATGtn0zW3lYNnF+xW8VVdQ887cgOJSjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=d+7PZKQW; dmarc=fail reason="SPF not aligned (relaxed), DKIM 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: 0.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=d+7PZKQW; dmarc=fail reason="SPF not aligned (relaxed), DKIM 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: B09A123CAB X-Spam-Score: 0.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: Po7IIVCNfuHx --=-=-= Content-Type: text/plain Ihor Radchenko writes: > > Thanks! Since Felipe has no objections, your patch should be good to apply. > > Could you kindly add the geiser version info as a comment inside code? > Commit message is an unlikely place to be checked regularly and be > noticed as geiser is updated in future. > > Comments are generally preferred over commit messages: > > https://orgmode.org/worg/org-contribute.html#commit-messages -> > -> https://git.savannah.gnu.org/cgit/emacs.git/plain/CONTRIBUTE >>> - Explaining the rationale for a design choice is best done in comments >>> in the source code. However, sometimes it is useful to describe just >>> the rationale for a change; that can be done in the commit message >>> between the summary line and the file entries. > > Best, > Ihor Hello Ihor, thank you for pointing that out, seems I botched my reading comprehension skill check. I have updated the patch and enclosed it, feel free to drop a line if you notice anything else obviously missing. Vale, - Tim --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-ob-scheme.el-Use-synchronous-eval.patch Content-Description: 0001-lisp-ob-scheme.el-Use-synchronous-eval Content-Transfer-Encoding: quoted-printable =46rom 3b4120d5b3fb41d4b0a5bbdee4cc7a3f4cd02642 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el index 72d2e029e..b91c368a7 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,13 @@ 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)))) + ;; `geiser-eval-region/wait' was introduced to await the + ;; result of async evaluation in geiser version 0.22. + (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.36.0 --=-=-=--