From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0LwxGe/iuGVwtAAAe85BDQ:P1 (envelope-from ) for ; Tue, 30 Jan 2024 12:52:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 0LwxGe/iuGVwtAAAe85BDQ (envelope-from ) for ; Tue, 30 Jan 2024 12:52:15 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=nKL9JBvI; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706615535; 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=ewEZWZMaRVFdyRhPY/W0rPz7Txd7vui2c92IWHT8nGI=; b=rAIDgrGZzsQSbmd+yU/Cdo1WIWkiveKhINA055bEaqB6iDl9Ihbwdhk0W3MipICeXUdsBL AX71qVkGcdmaOSD/licDFz08VrkOcqDcklv8/Cp4xA6opLJNuVgJRpCwCChMP5hMg8fcUR 4DyHw+6tPncPI3MCyK2JFrm35hJKoMeiqucgqtJDq8fRrOIJ72FdlBpeaH4aykJjFhP4ZY M45rg4OBbxv2cuQC7go73+jsEMJVoEnxF0NFu39z1WYgQ2v9ZXjjmfITAuZXCkwDvTFQ/0 xt887DrY4keS4dDpuPCP9AYUMUY5zg69jyQnaT9SJTSJFgxVay7em1L4IT2AJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=nKL9JBvI; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706615535; a=rsa-sha256; cv=none; b=cGpe/KnWgeeQnPJjTj8dpPWjwVDMfToY7l/6tLGRddPY+/6Y7HlrdIQF92srgoCDkI16cR 0F+wx32zqp7E1MAqy3CPRnG8e4N8jixk+0ZRoAk4PAjNHhNzBcSMG1t+22JKwsm+3YWJTT tpmC/A9mrJunyellC/K5cVDHmVy7s08HhhgtFlTdDmkblaJ+G8XDprtOYB+BwV3ccc9lc1 frUX5mBJSlzE3g9av0rU7IE+rS2FwX75GORQiPLaDppedPoHdHRp839utBEuFLmod9YqZn R3KbtzQvFnoeWXy9hx3qsfGqspFQxqe9op5P6iJdym6phHrjtcMe9uwiXaXo5A== 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 4DC9F465B8 for ; Tue, 30 Jan 2024 12:52:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUmeG-0003xJ-4W; Tue, 30 Jan 2024 06:51:28 -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 1rUmeC-0003x0-Oq for emacs-orgmode@gnu.org; Tue, 30 Jan 2024 06:51:24 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUmeA-0000Cz-AK for emacs-orgmode@gnu.org; Tue, 30 Jan 2024 06:51:24 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4FE04240105 for ; Tue, 30 Jan 2024 12:51:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706615477; bh=a9WVruyCv7LQskb5Jzs1devIVxJ+3Wg28YAjvHHXNX0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=nKL9JBvI8kmM/NBSvzJmaP8ONDLriXVFputv9zSMzsqHfB4OgK6bTCl1bcFwupHYX cf5KzZgeLVjDaqDxMID/UTZo0H7a8hw/mdM/z9+V3R1sv4lvr4ZdK8r5tpJKynG8Se a2GNSkzp7y8GTi5oesUJc7zJavCvHgZLhwDhdlsWrNRcwkJDg7wyvde+l73VkxGOVO 89jSNT8VGHy7QcJU3OYbjZf7HfZfkOpyS9QizDCZkk1H9kV76AHmIT0y1KywQKWzIF 5LggK6NtDEBIuDYePRByEPVYG6hs5Ccj8GdBJaHChHk6BJdPOAR+FfPC2laLJV2Le/ 2cBoYjdoaTmTQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TPNmN49j1z6ty4; Tue, 30 Jan 2024 12:51:16 +0100 (CET) From: Ihor Radchenko To: Hunter Jozwiak Cc: emacs-orgmode@gnu.org Subject: Re: Connecting to an Already Running Scheme REPL with org-babel In-Reply-To: <87zfwojbsn.fsf@gmail.com> References: <874jex3xxh.fsf@gmail.com> <87v87dm613.fsf@localhost> <87r0i03kgq.fsf@gmail.com> <87il3cmg4o.fsf@localhost> <87zfwojbsn.fsf@gmail.com> Date: Tue, 30 Jan 2024 11:54:48 +0000 Message-ID: <87v87b829j.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: -9.87 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -9.87 X-Migadu-Queue-Id: 4DC9F465B8 X-TUID: 8extQ8u6HrZl Hunter Jozwiak writes: >>> + (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. > Okay. Is there a way to tighten these inputs further? I have them set to > :any for the moment, but I wonder if there is a way to leverage the > values for `geiser-repl-default-host` and `geiser-repl-default-port`. Org-mode currently does not provide completion for header argument values. (see `pcomplete/org-mode/block-option/src') If Org were to support such completion, you could theoretically allow special values for :host/:port like default: #+begin_src scheme :host default :port default ... #+end_src to use `geiser-repl-default-host'/`...-port'. Then, you could add these values as (default :any). >>> - (and (not (string= session "none")) session)))) ; session >>> + (and (not (string= 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. > Is there a way to test this and pinpoint the problem? Hmm. I just realized that I am reading that line wrongly - host and port are additional arguments passed to `org-babel-scheme-execute-with-geiser', not a part of (and (not ...) host port) So, my only comment remaining is to put each argument in its own line, like it is done for all the previous arguments: (org-babel-scheme-execute-with-geiser full-body ; code (string= result-type "output") ; output? impl ; implementation (and (not (string= session "none")) session) ; session host ; repl host name port) ; repl port That will make the code more readable. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at