From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2GjtIYP4t2VY4gAAqHPOHw:P1 (envelope-from ) for ; Mon, 29 Jan 2024 20:12:03 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2GjtIYP4t2VY4gAAqHPOHw (envelope-from ) for ; Mon, 29 Jan 2024 20:12:03 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b="L+/ruR8l"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706555523; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gJyHyUS3xO1QkimS60Lg7AJy/FtIyC/BMqJHmN2cqxc=; b=TMs8qfpbfyPgrqdYx7FqFuIdPmdATa+AhLVxNP1uw3j5YKNF708Y5JSfiOAVbnEDMXmdnf 9SK2ple1knjW+XHI2J4XkNqTh8a6H4bbGo5TvXRv2yf/t+hAYZkBJtbQ2xCVRtozv/KRNQ By+/bqZF/LxIytfepMTT7u274ZSiJItypQhA7M10ahGiKA3ohVbpRK8oQUSUq1NcJnXvWX RfCXFt12Xv/mvKWuOM0Tgol2+DTY5br7Ril0dGKU2EK6Ckivf0lAXD1sC1z2zZTfaL9H6e hMg9HewhUJsUdp+pifZ1Pa1duesiDWOHu4vOTS2FJzTWBvI+GrTRur5HD7CDiQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b="L+/ruR8l"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706555523; a=rsa-sha256; cv=none; b=CSYQFuYDllMwkeUy0w7a5K3XEWqAl0oS5x3M5o46hNEovQC2I2vAKxgNXoFWlttODHJw1Y Om+R1NIDcbZ2gXtW2ENcv5FOV2/8JlA5jEjKaYBMpCeBrRiupjEwRvwUpOp7eVhKX0InHX 2PZbNR4K7v5U2e8BOhSPBBKm1fFSwMJK8TBKs0CTdrAdHVblQZaMDsbv+BplCFNnJ6HS/F 1qFy1ws2oeb6b+QKKGASHzNZfFoupjVO6zNO5MqMH7YdzttdUatJDdK5HRE/Q1gt9XIHkq frCm0ZNH7vn8lDJGi2B8IwrvwRvlC4Mnh7TJwIabpY3BfdwWzNFpMRAEqNS0dg== 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 4FEA461FD6 for ; Mon, 29 Jan 2024 20:12:03 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUX23-0001ab-UH; Mon, 29 Jan 2024 14:11:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUX1r-0001Wn-K0 for emacs-orgmode@gnu.org; Mon, 29 Jan 2024 14:10:48 -0500 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUX1p-0000g3-Hn for emacs-orgmode@gnu.org; Mon, 29 Jan 2024 14:10:47 -0500 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-51114557c77so1244915e87.0 for ; Mon, 29 Jan 2024 11:10:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706555442; x=1707160242; darn=gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=qSNlwnis08OzQuiVWlTY1vPnAuKo1ZThDJP0ExRhFy4=; b=L+/ruR8lHwbhWwYBJ3nffLX/se9nBoVFMxPEWv4JDXTE5EoBrFg/r5kZeFUh+1qARM x6r43vYYwRuq1WT2lM4zsx9BXN3LkFs/Xs2PiS+87KjHU9jsXVkE2bIKHJ7fOy7SNs96 42LKwa2h7GPneelY45TEAHDk8LTvtj1jvNxCiFb0Lcui8MRjgHrAZKIH1HIB7GVKev87 GV+uuPBQ7uG94sU/7CDzXh8zOWz7Q0k8+6OvAxyuTSezPjod4UZlTmHalHjJD1OJKSjQ Ab88lA3JfUvyxfZLD93B/s+aR7T2UNheKp7I8S4daeedGf+W7KC3+05K4NzCpDnXHAS9 l1pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706555442; x=1707160242; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qSNlwnis08OzQuiVWlTY1vPnAuKo1ZThDJP0ExRhFy4=; b=GapiwFuG3etDELwcHGrORhulbqfBFg8mq0jJQQOeq7yN7cw55daDd+QTxUPJF3GgMr 6L1Hv7d0+C4MjHBUqz+Tw17P9nTl3vegQYXzx+nmy5qUIDdnft1lfABiRsTmxzhPar1L ddkPsM1nLD6LcjNZAMSviYS7pEnM6Wbwu8GhtlIB+r4JWnvFPy3dvQD1bEAQoGQ5VFY9 HtxcX32Eka3xUi2gStaVRQv2NItxeet+fcx787c94QDSrYRq37Xi7AoCZ5KYNboYA6gl 9+il7w06dKGXZo2yJxEa4cdQW0J1sjfqdtSeH3aFZ38HlnTMqrVcLIgyChR0Ta7pNBpo IcoQ== X-Gm-Message-State: AOJu0YxyZcLQrEb38YZ3wj9UyxICK6pGC6s5SvKdg9OFqbln+BwjYTsW vNkMrOn+D8QvCxr5TEeGUC2oqhvp8V/4QJYeFIWFFs8I6VS4ZsbkKwIrntcla2KIEmMrRcOtZ3J geAY13IfAQdzPG7kyRwRWheM+WVpsys0Humk= X-Google-Smtp-Source: AGHT+IFlotjZSyl9HmGwKu4l4dnDdpPnbfW1UXTzqCr+6Yfi9WM+zU3/Ez8vHFH1NYPbmPH64h3fZCibgT/+8B2JstU= X-Received: by 2002:a19:f507:0:b0:510:1499:c00c with SMTP id j7-20020a19f507000000b005101499c00cmr4226930lfb.2.1706555442183; Mon, 29 Jan 2024 11:10:42 -0800 (PST) MIME-Version: 1.0 References: <874jex3xxh.fsf@gmail.com> <87v87dm613.fsf@localhost> <87r0i03kgq.fsf@gmail.com> <87il3cmg4o.fsf@localhost> In-Reply-To: <87il3cmg4o.fsf@localhost> From: Hunter Jozwiak Date: Mon, 29 Jan 2024 14:10:30 -0500 Message-ID: Subject: Re: Connecting to an Already Running Scheme REPL with org-babel To: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="000000000000ec48e706101a6618" Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=hunter.t.joz@gmail.com; helo=mail-lf1-x12f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 3.44 X-Spam-Score: 3.44 X-Migadu-Queue-Id: 4FEA461FD6 X-Migadu-Scanner: mx12.migadu.com X-TUID: TDeWidlyWQtB --000000000000ec48e706101a6618 Content-Type: multipart/alternative; boundary="000000000000ec48e606101a6616" --000000000000ec48e606101a6616 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 29, 2024 at 8:15=E2=80=AFAM Ihor Radchenko wrote: > Hunter Jozwiak writes: > > > Here is a patch that provides this functionality. > > Thank you! > > > Subject: [PATCH] org-mode: allow ob-scheme to accept a remote connectio= n. > > > > * lisp/org/ob-scheme.el (org-babel-scheme-get-repl): introduce two > > optional variables host and port. If there are not given, just run > ^^^^^^^^^ arguments > > > * lisp/org/ob-scheme (org-babel-scheme-execute-with-geiser, > > org-babel-execute:scheme): take these optional arguments into > > account. > > ... and add two new optional arguments. > > > @@ -231,6 +235,8 @@ org-babel-execute:scheme > > geiser-scheme-implementation > > geiser-default-implementation > > (car geiser-active-implementations))) > > + (host (cdr (assq :host params))) > > + (port (cdr (assq :port params))) > > Please declare these new scheme-specific header argument in > `org-babel-header-args:scheme'. > See `org-babel-header-args:C' for an example. > This is necessary for header argument completion to work. > > Also, please document the new header argument in the ob-scheme > documentation at > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-scheme.html > (you can submit a patch against > > https://git.sr.ht/~bzg/worg/tree/master/item/org-contrib/babel/languages/= ob-doc-scheme.org > ) > Here is the worg patch. > > - (and (not (string=3D session "none")) session)))) ; sessio= n > > + (and (not (string=3D session "none")) session) host port)= )) > ; session > > This does not look right. Your change will disable session support > completely when host and port are not provided. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at > --000000000000ec48e606101a6616 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



=
On Mon, Ja= n 29, 2024 at 8:15=E2=80=AFAM Ihor Radchenko <yantar92@posteo.net> wrote:
=
Hunter Jozwiak <hunter.t.joz@gmail.co= m> writes:

>=C2=A0 =C2=A0Here is a patch that provides this functionality.

Thank you!

> Subject: [PATCH] org-mode: allow ob-scheme to accept a remote connecti= on.
>
> * lisp/org/ob-scheme.el (org-babel-scheme-get-repl): introduce two
> optional variables=C2=A0 host=C2=A0 and port. If there are not given, = just run
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^^^^^^^^^ arguments

> * lisp/org/ob-scheme (org-babel-scheme-execute-with-geiser,
> org-babel-execute:scheme): take these=C2=A0 optional arguments into > account.

... and add two new optional arguments.

> @@ -231,6 +235,8 @@ org-babel-execute:scheme
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 geiser-scheme-implementation
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 geiser-default-implementation
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (car geiser-active-implementations)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(host (cdr (assq :hos= t params)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(port (cdr (assq :por= t params)))

Please declare these new scheme-specific header argument in
`org-babel-header-args:scheme'.
See `org-babel-header-args:C' for an example.
This is necessary for header argument completion to work.

Also, please document the new header argument in the ob-scheme
documentation at
https://orgmode.org/worg/org-= contrib/babel/languages/ob-doc-scheme.html
(you can submit a patch against
https://gi= t.sr.ht/~bzg/worg/tree/master/item/org-contrib/babel/languages/ob-doc-schem= e.org )
Here is the worg patch.
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (and (not (string=3D sessio= n "none")) session)))) ; session
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (and (not (string=3D sessio= n "none")) session)=C2=A0 host port))) ; session

This does not look right. Your change will disable session support
completely when host and port are not provided.

--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,=
or support my work at <https://liberapay.com/yantar92>
--000000000000ec48e606101a6616-- --000000000000ec48e706101a6618 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-ob-scheme-document-the-new-header-arguments.patch" Content-Disposition: attachment; filename="0001-ob-scheme-document-the-new-header-arguments.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lrzaz2aa0 RnJvbSAyZGM3OGE3ZWRiYmUzODYxNGE1ZjdmYWZhMmMyOTVmNTI1MjhmMDRkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBIdW50ZXIgSm96d2lhayA8aHVudGVyLnQuam96QGdtYWlsLmNv bT4KRGF0ZTogTW9uLCAyOSBKYW4gMjAyNCAxMjo0ODo0MSAtMDUwMApTdWJqZWN0OiBbUEFUQ0hd IG9iLXNjaGVtZTogZG9jdW1lbnQgIHRoZS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