From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qMxhGhRO+2MBzgAAbAwnHQ (envelope-from ) for ; Sun, 26 Feb 2023 13:18:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2F2NGRRO+2NNcgEAG6o9tA (envelope-from ) for ; Sun, 26 Feb 2023 13:18:28 +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 0CB80284E0 for ; Sun, 26 Feb 2023 13:18:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWFyN-00068o-Ds; Sun, 26 Feb 2023 07:17:47 -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 1pWFyK-00068T-CD for emacs-orgmode@gnu.org; Sun, 26 Feb 2023 07:17:45 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWFyI-0004ts-3j for emacs-orgmode@gnu.org; Sun, 26 Feb 2023 07:17:44 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 018AE240124 for ; Sun, 26 Feb 2023 13:17:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1677413860; bh=S0EabAv6As++g0m6bBgFJlyTa5v3WRFndxEztcrVFJ8=; h=From:To:Cc:Subject:Date:From; b=KTHglFLQ68iu1g3jtT6tXwtCW/272nFcf8AqvgVcTv6gmFE4z2wuhT6gu6C/cZTQO 2qJApp6OE4L8P8FvB89w9voi0utIKQWCLexqpT/bD5uIhqznsThMZCmY9SnpyqD5sR UeOvO/hthgsao5pR41kxdql1ozvOI2tNnWSdNGpML9EOOB0r6ZFVynFu/HXbFvRjWD dVY8JkYDlK9U1y8IOkCWFtJrQL64tuC/QM0gklGwDmZW+HJ1rhzQJF90odK7UIXbnT xPLYikY8DBLvc5q+DW7bAH+zamGxDkMUi5Cr8Tm9/TrHY2W45Vhgp/iL7pNLbT3Hic PyO6q2mwlJLSg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PPjLl4dqtz6trr; Sun, 26 Feb 2023 13:17:35 +0100 (CET) From: Ihor Radchenko To: Ken Mankoff Cc: Max Nikulin , emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/ob-screen.el: Support ~:var~ header args for babel blocks In-Reply-To: <87sfet7kul.fsf@t480.home> References: <87pm9z8089.fsf@t480.home> <87y1om7w23.fsf@t480.home> <96a91a35-eeb6-55d3-683d-5d51ff6d496e@gmail.com> <877cw5aiab.fsf@t480.home> <87sfet7kul.fsf@t480.home> Date: Sun, 26 Feb 2023 12:18:14 +0000 Message-ID: <87lekkzkl5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677413908; 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=DbVZDLLbnvWYV0umGQ39A1pDLPiEAt1ekS0P6MmBLNM=; b=WfhqJUJqqps39ZXMvAKwE6NBDUBllhlujuuVBC+Nct8/i/4FRJY86wSFDx7qegl1Wsma9W x0hIQE8RkjbKtaMLi1bnAp+/BHTLSWD7jy7fkum1eto1+19BUwVG5wjoQmhJGpiFi2ZurQ Fm7PtkTQKaUMg5MA9jAWu2k7QDXAVPo8LEgZYBpzV+coeWKLDm9eah3M17jE016MalCUDr 15dw6pDG6yUGqlyhkx3QwylPty1fLNIaNcm3umI/cVq7/vzI/NYfynCQu3YY0IsIv/nRt7 nYsBE3CByzHoOtoWIVVoJ+xgsaDmsoAHxKPAKMtThLZ359l1VpfMQNwt5oksBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=KTHglFLQ; 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=1677413908; a=rsa-sha256; cv=none; b=gnk2bXdpMU5KHEQhVcKcYC7u6DDA3biAJIH00Z+dLQzmeUoY9mS0H7V147vrgMnr6qnGjG zT7t7sJw7TEYWytU0mPgPNK7ZlNXDASPz8MWfmMIBzKFO9xG9G6xG0CgtBnkgk8TA+klaS M/k1Z2X0oJNxRltF0JS8uwfj34C1Pw3IMsAGLQXYrKJsOrFR+v8dpawSa3ZSpDecpb8qdw xvK8GzPrqnf3YehMmKBZwqTMpw4qExnBUQMqxw/MmfqeZGNdEBy+RauS5Jz+w384HniLNQ TJCD8EdQehtwosGyGUNuM/JcbgD3SOzKLUl1NYYL4HfheTp7UZb1ZefLT7anZQ== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.18 X-Spam-Score: -6.18 X-Migadu-Queue-Id: 0CB80284E0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=KTHglFLQ; 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 X-TUID: eQUNWL0zAWbp Ken Mankoff writes: > From f7ca0258d72b3da5743b1134718b1d1f0d74491d Mon Sep 17 00:00:00 2001 > From: "Kenneth D. Mankoff" > Date: Mon, 20 Feb 2023 21:40:39 -0800 > Subject: [PATCH] lisp/ob-screen.el: Support var header args for babel blocks Thanks for the patch! > +;; Reuse the variable assignment code from ob-shell > +(defalias 'org-babel-variable-assignments:screen > + 'org-babel-variable-assignments:shell) This will work, but you are relying on implementation detail of ob-shell.el. A more safe approach would be calling org-babel-variable-assignments:LANG depending on the :cmd header arg. For :cmd bash - org-babel-variable-assignments:bash, for :cmd fish - org-babel-variable-assignments:fish. To archive this, you can define a full org-babel-variable-assignments:screen function that does what I described. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at