From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mOssE1wRzWGgoQAAgWs5BA (envelope-from ) for ; Thu, 30 Dec 2021 02:54:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2gToC1wRzWGjJwAAG6o9tA (envelope-from ) for ; Thu, 30 Dec 2021 02:54:36 +0100 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 E50B7105B4 for ; Thu, 30 Dec 2021 02:54:35 +0100 (CET) Received: from localhost ([::1]:45244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2keI-0003nZ-Mh for larch@yhetil.org; Wed, 29 Dec 2021 20:54:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2kdG-0003nR-AT for emacs-orgmode@gnu.org; Wed, 29 Dec 2021 20:53:30 -0500 Received: from [2a00:c38:11e:ffff::a020] (port=21533 helo=confino.investici.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2kdD-0005Kd-Rp for emacs-orgmode@gnu.org; Wed, 29 Dec 2021 20:53:29 -0500 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4JPWWl4s5Xz111L for ; Thu, 30 Dec 2021 01:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mortemale.org; s=stigmate; t=1640829203; bh=5B0z/SWh7pmyMr64A34Loeay8sVxF8P6JpW/q283irQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M0TZ45goYWoBXd1FyumOBA92+V+qa1yotEWn0vW9AZK7achFEtWlzI25Mq6T1HDgj 2mqvqLfPNUBiqo4/grsAy7vgHTkbxOexwVTSe7fGPj+agOuDhkDnPtNMj1nzKbA51+ UMh4HIm8+pqSfRFnsV3RU+QF/qzgPuxs6Ti2Sves= Received: from [212.103.72.250] (mx1.investici.org [212.103.72.250]) (Authenticated sender: felipelema@mortemale.org) by localhost (Postfix) with ESMTPSA id 4JPWWl1f99z1102 for ; Thu, 30 Dec 2021 01:53:22 +0000 (UTC) From: Felipe Lema To: emacs-orgmode@gnu.org Subject: Re: [PATCH] update ob-scheme to latest changes in geiser package Date: Wed, 29 Dec 2021 22:53:18 -0300 Message-ID: <3749511.XVzDg1PN9u@felipe-thinkpad-x200> In-Reply-To: <8693346.QgZh8Glrbv@felipe-thinkpad-x200> References: <8693346.QgZh8Glrbv@felipe-thinkpad-x200> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart3571142.kIHUGRQyfv" Content-Transfer-Encoding: 7Bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:c38:11e:ffff::a020 (failed) Received-SPF: pass client-ip=2a00:c38:11e:ffff::a020; envelope-from=felipelema@mortemale.org; helo=confino.investici.org X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640829275; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=5B0z/SWh7pmyMr64A34Loeay8sVxF8P6JpW/q283irQ=; b=fvs+aAKJRw19Z2ReqEAy7A8Ux2NbN6ltttJz9cTW5sEvjtXij4iQxBnoN5w3N78s70awHn xAeJVlV06ZSQ066qmgZvB8C4Hd9AsBEM5EvlWZIzxRIN3v2dnC722MgYsvFNCIyTNxTjnl H0lzDYNoocCKCUhw/83Fk/N1WpFd6P20zQseKQ7G7axafKJlBLwD9kx9Dg3GJT95ydjDdn qlYJkbSG2u0Sh/HynMEDprjHlTWUHOll7QchM5b0es+9cLEskOYE3HLnbAyDMOjwlO1jts paE3st91hQDCVjxrlT2qwhlmm9M8pW2PAVrgyLVHExNswL1pMU+QgvZqlvZXRA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640829275; a=rsa-sha256; cv=none; b=jOOLpXujwIhk2hzpFDUHxYsKpHTBxWEs0W8fvFq6PRlBfRbzuhFBiKoHswrVphqiicsFIj JRzDGHbE+jbBLX/x/uBuyzk/zhDJm1dn/YPB1VW4LzY7dASUkTXr/Psq0VOmDclJGOqRn9 Q0zSqondyyLv1BCr3p9CactT1JjPwEizZtg/y/74+vG7h9BpDVGyVWSoNPiSuXGu3NWr1S N21Lthnf3GEgEspOzhxYKmRg8JgQyjspUSadG8Z1j0lfOEVEdTckqI12TZ94/+dDJtTtFl ZVnjlMZxqyqtefGP2rIaMpq4CU8UrsF0hQG/wL39tryWAiQ7Dn5kWgAB6oV8nA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mortemale.org header.s=stigmate header.b=M0TZ45go; dmarc=pass (policy=reject) header.from=mortemale.org; 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.77 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mortemale.org header.s=stigmate header.b=M0TZ45go; dmarc=pass (policy=reject) header.from=mortemale.org; 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: E50B7105B4 X-Spam-Score: -6.77 X-Migadu-Scanner: scn0.migadu.com X-TUID: F95YOgTLljz1 This is a multi-part message in MIME format. --nextPart3571142.kIHUGRQyfv Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Wednesday, 29 December 2021 15.03.47 -03 Felipe Lema wrote: > Sup, y'all > > The geiser package had a recent update in which `geiser-eval-region` behaves like an async function and does not return evaluation result. In exchange, the newly introduced `geiser-eval-region/wait` does that now. > > I've attached a patch to update ob-scheme.el to reflect these changes. Without them, evaluating scheme dialect code blocks in Org will end up with empty results. > > To learn more about the change (and how it impacted other people's flows) see issue thread below > > https://gitlab.com/emacs-geiser/geiser/-/issues/30 > > Felipe > > I was pointed out that I was missing the corresponding `declare-function`. I've included it in the attached patch. Sorry about the double-posting Felipe --nextPart3571142.kIHUGRQyfv Content-Disposition: attachment; filename="org-babel-scheme-geiser-eval-region.wait_v2.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="utf-8"; name="org-babel-scheme-geiser-eval-region.wait_v2.diff" update to new API call to evaluate region and wait for result * ob-scheme.el replace `geiser-eval-region` with `geiser-eval-region/wait` as the former changed expected behaviour; the latter returns the result of evaluating. diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el index f4836b23fe..bcceba1258 100644 --- a/lisp/org/ob-scheme.el +++ b/lisp/org/ob-scheme.el @@ -53,8 +53,8 @@ geiser-repl-window-allow-split (declare-function run-geiser "ext:geiser-repl" (impl)) (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 prefix)) @@ -176,7 +176,7 @@ org-babel-scheme-execute-with-geiser (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") --nextPart3571142.kIHUGRQyfv--