From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 wL+6AYUw+2NiQQAAbAwnHQ (envelope-from ) for ; Sun, 26 Feb 2023 11:12:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MAMNAYUw+2MRMQAAG6o9tA (envelope-from ) for ; Sun, 26 Feb 2023 11:12:21 +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 9C9B12FD60 for ; Sun, 26 Feb 2023 11:12:20 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Cw5sH+5g; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677406340; a=rsa-sha256; cv=none; b=YmsezI5UxZTnZ/q58Po76w9NCO/Fv0zu0PtLRTEsnarirqxaoe0yPptdHDMFJhpGYeVC1K 16eX9rOwarPAO0sFWHxtNV70RDYoy34DYXL7T4hjK8W9pdfOS3PbzS4ZiMZLDrczpWvQxH hh5icfMkXh0dDWhzKGVzjGqYF7Wkq/Cb3NP+5idIrT2VPiQU99oZUp058mbvQC6aYhlwFk TJbibd2f6R6ehIjyE3iII0n/JJK8pCMXKhjVf/TtMkM32X8Dc9LevndMp28LH3KyLEjnDl u8gRj2Dx24/qqEvymG11VxmkCNS6pSxL9X49pl0M0rd8f7Gzh/RdkZb/DR2kUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Cw5sH+5g; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677406340; 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: 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=a/BpiaoKMatS0I0Mkn6dpXt13xAoCpqjB4quLKj/vPs=; b=QIGTGfk1Fn+F9Ec+CP5QCorEEcdv9wDGpcES/dIQvCWZoAjYP6p4m3OrZy3Pksqu2nyUET GujcF3R6JiCZRqa7cbAtMgV+9Xopz2HqRdFskHuxFsS4yOWKoj/9ocgVtYFFIUIz/UtB/r vlI3Y2JCYKlG2EfVptW5tEcARW7UvyFQ8utsLEEEVtuY0kuA/AmxGVK6GiENjY15hcGOgN slzEGk9nE5HS3SgAg3AeUZ5aPnpyb6jsP71RNRR8Oy5StaU5oeV/zDWdYsOf1zF390Tvau Ivdhx4exXnWYAV5IBOtH7D4YyJE37KLFuTWgK3C7r3DD6Dpj0lIkiusG8cREdg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWE04-0000V5-LA; Sun, 26 Feb 2023 05:11:24 -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 1pWE02-0000Uo-Eg for emacs-orgmode@gnu.org; Sun, 26 Feb 2023 05:11:22 -0500 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWDzz-0005vj-F5 for emacs-orgmode@gnu.org; Sun, 26 Feb 2023 05:11:21 -0500 Received: by mail-lf1-x12c.google.com with SMTP id r27so4795929lfe.10 for ; Sun, 26 Feb 2023 02:11:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=a/BpiaoKMatS0I0Mkn6dpXt13xAoCpqjB4quLKj/vPs=; b=Cw5sH+5gmciSTiXzCK9Cz5TYehSbKRgr+BsvypJL/tMfWUgEqEHoxmrJpYHKqaBCdp Fpn3ygfHfLa7Tf66lGozLqPYPpgA0z5EOjGH4WyqQcUqXft1MF5U9U9HxL3iM13VhepK fjsrxl75J/YnWuIVBdkhDVVDM3Cz6t16bpR7HuaeXXiY2KLL0Fy6QHvOfFB38MFA6guw nnTSizGJzKBnyoudIQ9aDizN4zjaU0Ia9iGiKhGB07AbiFxhw66/RWYBKuDu0Gn45xTd kWVtNGUV0wF/yRePdted+ScohCJ/lZJi3hJxfIyoELVpMvydX3oy5j7cDIwUVBpmOcXN HWvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a/BpiaoKMatS0I0Mkn6dpXt13xAoCpqjB4quLKj/vPs=; b=yeM/FetRqqakdxp+1xIoSrtJFVzOwrL4gVBS2Muvu7N3ltaaVQB7N0WzbD03H1HbcH btTFnsS4DQB43UKXhyAio2xeM0DGTP2FqytjO7HfJx4M10Bj4kXZmOqfmD3/nu/nFVxF LTtQGSt/rQDzDF0BfnyVGJGo1+whDNukfTNrPkDNRtS93hBw5R/qAez/peXsoQ6WNpEh ouWZHclfp/jlqUBL/F/f35y/88Ws7CXuX0urClZ52CNlNECb15iCFMyz4zgMBcHM59+x 0sAKgZQCUuXwLM8Ka3p0kI7FvtXguIbJfmrXhm+qObTmg0xdWrUsHt8OX5g0OCTCNVay LDZw== X-Gm-Message-State: AO0yUKWB57AoB+T+afGYxhjwBk+0Shl7/xqMxz5L7dXkac0SVaC941XS p4vLX3g4DByfWYR71qOXFgs= X-Google-Smtp-Source: AK7set/HYQqKMlJ+36mg0V/z6cYvHwGJCd/5bJwUf1rj+lSwh0QWyRP0zf74wGX2Nk8B3EU59BVHGg== X-Received: by 2002:ac2:5fb1:0:b0:4dd:afad:8afe with SMTP id s17-20020ac25fb1000000b004ddafad8afemr2243828lfe.27.1677406275244; Sun, 26 Feb 2023 02:11:15 -0800 (PST) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id b13-20020ac2410d000000b004cc831acce1sm513456lfi.285.2023.02.26.02.11.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Feb 2023 02:11:14 -0800 (PST) Message-ID: <0e841ec9-f770-4f4f-a5e6-eb15290ab8a7@gmail.com> Date: Sun, 26 Feb 2023 17:11:13 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] lisp/ob-screen.el: Support ~:var~ header args for babel blocks Content-Language: en-US To: Ken Mankoff Cc: emacs-orgmode@gnu.org References: <87pm9z8089.fsf@t480.home> <87y1om7w23.fsf@t480.home> <96a91a35-eeb6-55d3-683d-5d51ff6d496e@gmail.com> <877cw5aiab.fsf@t480.home> <87sfet7kul.fsf@t480.home> From: Max Nikulin In-Reply-To: <87sfet7kul.fsf@t480.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=manikulin@gmail.com; helo=mail-lf1-x12c.google.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 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, NICE_REPLY_A=-0.094, RCVD_IN_DNSWL_NONE=-0.0001, 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: X-Migadu-Queue-Id: 9C9B12FD60 X-Spam-Score: -3.49 X-Migadu-Spam-Score: -3.49 X-Migadu-Scanner: scn0.migadu.com 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-TUID: 1aHCtUH8NYiJ On 25/02/2023 23:47, Ken Mankoff wrote: > On 2023-02-25 at 08:05 -08, Max Nikulin wrote: >> I believe, it is safer to define >> `org-babel-variable-assignments:screen' some way: alias, substitution, >> function that calls `org-babel-variable-assignments:shell'. I am >> unsure which variant is better. I see a couple of callers for specific >> language in ob-core.el. > > How's this with a defalias? I do not mind since ob-shell.el uses it for particular shell names. Concerning tables as variable values, it seems sh receives them as TAB separated text. As to `org-babel-screen-test' perhaps the issue is additional newline added after random number. I have not tried stepping through the function in debugger though. > diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS ... > +#+END_src > + > + > + > * Version 9.6 It seems top level headings were separated by single empty line. > diff --git a/lisp/ob-screen.el b/lisp/ob-screen.el ... ;; Reuse the variable assignment code from ob-shell > +(defalias 'org-babel-variable-assignments:screen > + 'org-babel-variable-assignments:shell) Have you tried to compile using make? I expect a warning due to missed (require 'ob-shell). I have no objections besides this couple of minor issues. I am not a maintainer though. P.S. My expectations based on the package name were that ob-screen is intended for running commands on remote hosts. Reading the code I noticed a couple of issues that may be fixed when you will decide to touch this file next time: - `org-babel-screen-session-socketname' does not respect `org-babel-screen-location' - `string-match' is used where it may be replaced by `string-match-p' since match data is not used. I noticed that ob-core besides org-babel-default-header-args:LANG uses org-babel-header-args:LANG. The latter is not defined in ob-screen, however I am unsure concerning its effect (completion?).