From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uHgqMSTmHmRL+wAASxT56A (envelope-from ) for ; Sat, 25 Mar 2023 13:16:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0NzvMCTmHmSSfgAAauVa8A (envelope-from ) for ; Sat, 25 Mar 2023 13:16:36 +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 9B3EC63B3 for ; Sat, 25 Mar 2023 13:16:36 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=R10xId3w; 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=1679746596; 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=DJLWaidpfWiKqG4u9EZOPx+6qvpJ/rx+omoMQ0vRSl4=; b=FWZsOKeGWPGJLk9uObccWl5Hz5l8PGSMV96qiWIZ9xJIxl6fjVPp9iZIHwhR9xlUHgHeYw GIcCCiO8hdKVHlUH0sY1CpH7uvcUgBo98oPICQAZHg5AXfthH21W4ZCFy6Q7bfovms+uy4 dRcX3uX60YWN1kUKqX8N+7R3jy3K4NGPfy6R7an/DxwA461EIlH8ug+VPKX0Ykmqi37p5o AggEODApsUqfNDrJuQQJfgR8bQZJsVOfo/FMeG4s2sEfCWYRBo/JtnsCqtrqCNvT1dTYf+ xtq/yAgCCnByDlhsPVKFRFEMvjG8RGzi2aKC2uTK7Ujcupd0GxT6fjvCDEFpdA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679746596; a=rsa-sha256; cv=none; b=lnf0n26r1eSKOQhLHLMSDK1uCYzEAQ6y5Q47sybPksZNYGFApM3UrqoycRhujaHz0bcl8+ ZEgqqYcXo9dLNh3ThOk55x3loHiipKDfadhvrpH7wpR+NmdkBW6fIba2qdFSq7MtjAOEzb ielbmOHMh1cBZCvU3hXUwInLwBj8z6VkZvjqJRxlnl/8Cpm0YljAaEkV7+5m22uz0U+MGG LZFE/+FwhHNWfmHv5woDxFP6zLQOFNJDziMRfvBAtQwgm9fGdlI2fBjb+qnEHmBsE1qi/I GyKgsJKqGDnjy5J+Ajkv9UYB7Y2RZuNvYizBX4A8FPtyxjCp1qWvji8D83akbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=R10xId3w; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pg2mg-0004Go-8Q; Sat, 25 Mar 2023 08:14:10 -0400 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 1pg2md-0004G6-Nz for emacs-orgmode@gnu.org; Sat, 25 Mar 2023 08:14:07 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pg2mb-0002AM-O1 for emacs-orgmode@gnu.org; Sat, 25 Mar 2023 08:14:07 -0400 Received: by mail-ed1-x52f.google.com with SMTP id y4so17873066edo.2 for ; Sat, 25 Mar 2023 05:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679746444; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DJLWaidpfWiKqG4u9EZOPx+6qvpJ/rx+omoMQ0vRSl4=; b=R10xId3wPgMlpiOFBBxcVy4LMp8Hqc3CmiZVuLUwuW7P/v1cCmGYGQb3lb9sgcnsi/ M3zeuiTvl+ZDmOF5j/PcfGFrZ50Udqu/ZQtxcuVeYDH3iI5uTUhHPdUhfxm3mkdfbuDP pOpJ9N2Zq3qBGJASDLZeTem35LgYifg97nvb+7X2JyI6edgonH7Vy3pw1ZExQBbMZrY/ pKLxWgCaaFU1Oksr416L0MeJHg5uI4Cbt1FtJBC6JbRoZhRdcCpfggpFftZTdSXnZAv2 tGZDF8XaYt7qkJ9idghlky0bpcnP4wM9oAY65RvKlSV4QYgBEcDy70ju3b5XwtYO58Kk tgDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679746444; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DJLWaidpfWiKqG4u9EZOPx+6qvpJ/rx+omoMQ0vRSl4=; b=mr3KuTo/wxGZ+8VkxEa/JLBasKFqINu3bcu2+79vCnomaF9eGeeAvt9r26IPhzO/PJ J//XOoA2yALhwayvR1p2cZS4sLkDzPswH9EEI61Yh3YHQWNIJq6fR5S6JO8lldU2lUVJ 5ksB5zS4AljD6TbzW5UbVWHlQplykXyy11JesxP3BeGHH+J0WdOftf0M76y+RuP5g5ht rmN/cWVJn1PZze9Y84+SpJOXEc3jca+KBrIASe8v+2YYUMX5EmvjecekVnr9/S2smd2l vFgANlX7bu2OTjfJGSxCSd81L3ACC/X4CicxS7hgvpaOzIqo4UJRlof54JaDjoqkgO/L ylCQ== X-Gm-Message-State: AAQBX9cgkbYlKiSO8+tMK1nlOabO4v/O1umg5fzKtfhtd8zU3eglRNgs Ye9qVt2tU7lwejDLQO4smjzFA8i2c1o21iMmcazynMCdkbJcxQ== X-Google-Smtp-Source: AKy350Ywn1QM9oZH2Bjl/wV0s1tHDwbNU7QHoxRiDzr+eJdp4S6fHHmZgG6b8GwF7LdAw34eJGvhCFLxyHMpwAjvHQE= X-Received: by 2002:a2e:8702:0:b0:295:acc0:3017 with SMTP id m2-20020a2e8702000000b00295acc03017mr1543793lji.4.1679723236458; Fri, 24 Mar 2023 22:47:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6520:1286:b0:258:a264:8fd6 with HTTP; Fri, 24 Mar 2023 22:47:15 -0700 (PDT) In-Reply-To: <87h6uaxtt9.fsf@localhost> References: <186283d230a.129f5feb61660123.3289004102603503414@excalamus.com> <87v8kd8zzw.fsf@localhost> <1863472efe9.10fdd5ba4258906.5972264927968042941@excalamus.com> <87y1p7axpe.fsf@localhost> <1870cb30c41.ba75a358545366.6275787333945468963@excalamus.com> <1870f4aeb76.12af86c2f745535.7020028564160040455@excalamus.com> <87h6uaxtt9.fsf@localhost> From: Samuel Wales Date: Fri, 24 Mar 2023 22:47:15 -0700 Message-ID: Subject: Re: Remove "shell" as a supported Babel language within ob-shell.el (was Re: [SUGGESTION] ob-shell async result output should not contains shell prompt) To: Ihor Radchenko Cc: Matt , numbchild , emacs-orgmode Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=samologist@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, 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=no 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: 9B3EC63B3 X-Spam-Score: -7.57 X-Migadu-Spam-Score: -7.57 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-Country: US X-Migadu-Flow: FLOW_IN X-TUID: b1/aUTRKSuaf i have a vague memory of having used sh and then we were told to use shell. can we all use begin src sh now? On 3/24/23, Ihor Radchenko wrote: > Matt writes: > >> What benefit does "shell" provide? >> >> - The "shell" language allows an arbitrary executable to be run. This >> means that shells other than those given in `org-babel-shell-names' can be >> run. People using a non-supported shell could still benefit from >> ob-shell. >> >> What downsides does "shell" bring? >> >> - "shell" falls back to `shell-file-name' which can be an arbitrary >> executable. Whenever I hear "runs an arbitrary executable", my ears perk >> up and I start to sweat. There may be security considerations. >> - If that executable is a shell, then the prompt gets set independently >> from Emacs. For the prompt to be filtered from the output, users would >> need to provide Emacs with the correct regexp. A recent thread discussed >> creating a header arg to address this: >> https://list.orgmode.org/87ttzgeg3w.fsf@localhost/ >> - We would get bug reports about non-supported shells which kind of work, >> but have issues because they're not supported >> - Maintence associated with supporting arbitrary (shell) executables >> >> As the current maintainer of ob-shell, I'm in favor of removing "shell" as >> a Babel language. The cons appear to far outweigh the pros. However, I'm >> aware others may have good use for it. It's been a part of Org for nearly >> a decade. I'm sure it's part of people's workflow, especially since it's >> been in the manual for 6 years. Are there any pros, cons, use-cases, or >> considerations I've overlooked? > > I would not see arbitrary executable to be such a big deal. At the end, > if SHELL is set to something fishy, the user is likely in serious > trouble anyway. SHELL is a part POSIX standard at the end. > > Yet, the problem with unsupported shells is indeed real. > Moreover, "shell" code blocks are currently not portable to different > environments. > > I suggest the following: > 1. Introduce a new customization `org-babel-default-shell', defaulting > to (or (executable-find "sh") (executable-find "cmd.exe")). > 2. Use the value as default shell in "shell" code blocks. > 3. Document and announce the change. > 4. Create org-lint checker that will mark "shell" code blocks as not > desired. > > The above steps will ensure minimal breakage for existing uses of > "shell" blocks. Only users who wrote shell blocks for non-standard shell > will have to adapt. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com