From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 w82cLboO/GOMLQAAbAwnHQ (envelope-from ) for ; Mon, 27 Feb 2023 03:00:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gDYXLboO/GPPlgAA9RJhRA (envelope-from ) for ; Mon, 27 Feb 2023 03:00:26 +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 A51A42663D for ; Mon, 27 Feb 2023 03:00:25 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WVOlh5d4; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677463226; a=rsa-sha256; cv=none; b=SH6Q4XR71iBGRaOtpFdH8SpzDnzPU5M5NtnTD/zAR09xeA2W3AgFpcly0k4sLpB2zUAZKD QCN7DQIBTOKtRMFkJOvMjqIwJix3DzuxLtaIULpQc0DU/PSwGr8dUZMrgsJIcZV099c06d 1IyT+8DKuFBqednkhSai/p/Tae2ycXZEgirHwDi/1a0oUmgzO3ucP2br0pw0HLApb6G1Or 2Umgy/5AA8s5pm71VYGzyHdgtkM5h/ZB9MlLSkdENBQWJVXTR018hdkSopnq4UtWET2RRj 0SCUBV0isJhoDxSva2jlJ7xNNxwLurmViVM4AEFt+WmFrPDF7m0uuiKoe51Jsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WVOlh5d4; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677463226; 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=unf0jOfezgfS0Mm81ak+/DeivnE8PQ3QP9+LeIUK7h4=; b=B3g1SI7ft+tCSQy1it4lfnKx/ZjQg5bXWSQhWtBIbpI4QOGTmEMTaCe1d2k3yB3yqixZx/ LRUXAMZjA8/SelTWz2cU0V0q/HKWJdMfEVeaTh4T7RSzWwQPWiA7ask9VGbxhy1pHF9Ngv 6TUebAALQjPA/yODhNdtu31JFkSwBPikeSAkcCxywOyoLlceX94ZsNmc7jbQXhoBZ1a8fQ HoufTxuOIwhM8NaXzRUs4n/UtsnSoIKBE+idJdPhVxihQ8ter+il2YfuFftIQ5SymN1Gay +tsVSfWQWjJxc/3+q2k7mOJZXizeaZEhX2o2i6+HqeDWsBQompFxsqDzRML51Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWSnV-0007zP-JP; Sun, 26 Feb 2023 20:59:25 -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 1pWSnT-0007yv-Jv for emacs-orgmode@gnu.org; Sun, 26 Feb 2023 20:59:23 -0500 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWSnR-0003HL-Sy for emacs-orgmode@gnu.org; Sun, 26 Feb 2023 20:59:23 -0500 Received: by mail-pf1-x430.google.com with SMTP id y10so2600846pfi.8 for ; Sun, 26 Feb 2023 17:59:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=unf0jOfezgfS0Mm81ak+/DeivnE8PQ3QP9+LeIUK7h4=; b=WVOlh5d4/TcbHWT1zG8DNlJMfSmKBSU6cv4hmEcPTTNv0cP/ouq3WQUCUdYlC4/Rak e9qEDpOso+Qkx/nyGu1qi6/OzM3JQ9UlPJNagkVkgact9/TJuSdSPGQvvDGCD934aN3R C/GdJ5dgTe7I3gg8DG2L8qd+X4+zH88/eempBcBjCpbLzQVC2Z/D6OlpC6zrM/KKLExQ +0TFK6LM8W1c7ogH9fRYblyQyTgT1+b8r6xDRGsJPvRGlXA63rxa7oP8AwTQ7czHblRq cPp1p8HyxaWma2fVrHtkOUzhySTayML4icygLNPXCAH5Ctw9r1ibmLrE2SOnV4Zt1fuN 0WEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=unf0jOfezgfS0Mm81ak+/DeivnE8PQ3QP9+LeIUK7h4=; b=HKO6hXvhvjsVVPrFlr3SvVXnqAmpWepngwN9dJ+LPL3G9Uj5KkM5F5Kff0oXZB8msg 2kFJhBaqyJyCmM/ruE/uao5SdBlzZmAXh1M+tqCxbmt/+0G21yxAUmY+hftruKpkhlaS 4t8+/JYG/lJSFNotMKiTjqZYvEuPdC0rJ0KR+Px+kH3hlynNRyFRoOnX9zSj0PJuzaRD FZXhtVHfByNATurPqS73aZeK6p0xH3I70zO/eqgQ9cZaC0DlvuGAo307y2cVPKTZe6pM E1aWTg6GIbyAMkgdfUQCKk0NU1NwhkPvM6SDgl4LXWF5Wujd6gBlYQjYE8diwsmoL3yJ ZfKg== X-Gm-Message-State: AO0yUKU/UPvL3BvBu6SdWDlpaOnzR1sMcd6fByWbFU47Ua42y0w/TYH4 vOxHkJfokwXAmdqsVJbfENbPxgduUnraMYrPIXU= X-Google-Smtp-Source: AK7set8+AoHsov3WzV36ByO7dTbqaN7jpfOjVBAkMwjLhVlTMqsh43AArCmpGcptl7vQo+BfQg1s2A== X-Received: by 2002:a62:1952:0:b0:5a8:4b70:885f with SMTP id 79-20020a621952000000b005a84b70885fmr20616793pfz.18.1677463159734; Sun, 26 Feb 2023 17:59:19 -0800 (PST) Received: from t480 (97-113-138-203.tukw.qwest.net. [97.113.138.203]) by smtp.gmail.com with ESMTPSA id u25-20020aa78499000000b005d6fcd8f9desm3129542pfn.94.2023.02.26.17.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 17:59:19 -0800 (PST) References: <87pm9z8089.fsf@t480.home> <87y1om7w23.fsf@t480.home> <96a91a35-eeb6-55d3-683d-5d51ff6d496e@gmail.com> <877cw5aiab.fsf@t480.home> <87sfet7kul.fsf@t480.home> <0e841ec9-f770-4f4f-a5e6-eb15290ab8a7@gmail.com> User-agent: mu4e 1.8.13; emacs 27.1 From: Ken Mankoff To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/ob-screen.el: Support ~:var~ header args for babel blocks In-reply-to: <0e841ec9-f770-4f4f-a5e6-eb15290ab8a7@gmail.com> Date: Sun, 26 Feb 2023 17:59:18 -0800 Message-ID: <87k003swax.fsf@t480.home> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=mankoff@gmail.com; helo=mail-pf1-x430.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, 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: A51A42663D X-Spam-Score: -10.01 X-Migadu-Spam-Score: -10.01 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: mogdLCDXUa5J Hi Max, On 2023-02-26 at 02:11 -08, Max Nikulin wrote: > 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. I haven't either. I'll see if I can figure out the issue with the help of the debugger. > It seems top level headings were separated by single empty line. Fixed. > ;; 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). Make did not complain about this, but did suggest mapcar -> mapc. > P.S. My expectations based on the package name were that ob-screen is > intended for running commands on remote hosts. That too. But I also find it useful for running long commands on localhost without worrying about :async in emacs. Another nice thing here is that this is, by default, session-based, and can be accessed outside of Org, while Bash blocks don't always play nice with sessions. I can, for example and all in Org Babel, spawn a screen session, ssh to a remote host, and then inject :var into the remote session. I find this quite powerful, and I haven't figured out how to do it with =BEGIN_SRC bash= or =BEGIN_SRC shell= blocks. > 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. Both fixed. Should these be separate patches (3 total), or two - one for the new feature, and one 'cleanup'? > 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?). I don't understand this either. -k.