From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iCTiB1/comVudQEA62LTzQ:P1 (envelope-from ) for ; Sat, 13 Jan 2024 19:54:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id iCTiB1/comVudQEA62LTzQ (envelope-from ) for ; Sat, 13 Jan 2024 19:54:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Exf2j5fD; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705168818; 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=U9tApddQNpxpXdJ3PwXGj+ICHKbPupTfSDclLdqwpfQ=; b=OAJbua8a7+vlFCng+Ph3vTFQdrIwnt3LF7jQ8vP3pAoric4Oe/LmVjDJGUyRuMgm3ShjOG fABbPrnuhL3bL32kp7dMrt0nLE9L2mnHsYc3bMolN5qi4Q545vW9thxux7wYadjXesIGz4 MDZ5Ou1L9+PYGpHEvPRbQqRMeFjg897kqMjVyZVX+cqSUhD7PWh2oDEfE0yxZu3iYrha6U YYyfvjFCOI4szRvUyWWaq5ea+5qfziZ17dCPNAF0vq/9dr7uns3sfiBjfjv5yr08SRJmV4 v3I9wYvGwj8NiCmXCKUF2PiKlSljMN2gNu+yk+HxRVLb+3oOD9/EmloetzgrsA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Exf2j5fD; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705168818; a=rsa-sha256; cv=none; b=LCxgPjtwE9sdlcFDOkfkYKpVDKC+g7xSN+Kg46LgN72wVPjFHQ3qtEsRG7PHH1oex1EK4t SCsgGOq8WIHr0bsfADfU+tqwtJ8xTpPg6shzshbXfs8QnS3BYakjEzeeUkVzrgYIY2JKC6 C2pd+rCJ0wZSz1CS75WyhwxqcHVB2IXCRRGo5YGI6mFQsn672Q/fFhuSgU7UBHp0/PUF6f 5tXX3d5JE89tRWGmiM2lS+QsqRB+0DKI92pbfaEs+dcCh3344kRdjw2LybQH+bjowpGETY qR0xrZtUdfVbjtjOo6kJ/4fVMl04Kt4KviYJFuWSj11NhDjPo08rSoGNT98yjg== 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 69D2C16B09 for ; Sat, 13 Jan 2024 19:00:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOiI9-0004jf-5C; Sat, 13 Jan 2024 12:59:33 -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 1rOiI5-0004jR-QR for emacs-orgmode@gnu.org; Sat, 13 Jan 2024 12:59:29 -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 1rOiI2-0007qX-VB for emacs-orgmode@gnu.org; Sat, 13 Jan 2024 12:59:29 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 66C9D240029 for ; Sat, 13 Jan 2024 18:59:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705168763; bh=xAmCYImAxIYIUnRIZ1epUss5DiRinuLt4TnzTtqNmug=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=Exf2j5fDtdo7ReInPTAl/ZiLFkslAKhHaLNIMavmje1fN5ogrqUuqjRPcYtsDkPR6 piTECUw9QM2JPtzGEXuNjbftgUlFBz3t+t3xyjyO6DPNSsFTDnGty4UXUPEetI2c8S V5Mzrgm5HZrQgINHXwWo4oxAdee0b1SO1aH8SMVZDn4Qb9BGoh3c/zwPBXlJor1uQa bOD+8HJm2vAuuWTmmLTdSwqLt4VnrI9oXjUy2svkgzOolRgESwF2wYFvHZ0uSYeRS4 AlvaRGdV86EiGbgrxdIxhanGt+E5dP95yzIFFMFE0YhiyhFDQkT+LCpsl8k/tzSfWf g81PzatmjVVLw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TC5ky4Vt2z9rxG; Sat, 13 Jan 2024 18:59:22 +0100 (CET) From: Ihor Radchenko To: Matt Cc: emacs-orgmode Subject: Re: ob-shell: proposal to remove "posh" In-Reply-To: <18cfa388d12.f0069ffe919377.6846036599039377431@excalamus.com> References: <18cfa388d12.f0069ffe919377.6846036599039377431@excalamus.com> Date: Sat, 13 Jan 2024 18:02:31 +0000 Message-ID: <874jfhun60.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, 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.67 X-Spam-Score: -9.67 X-Migadu-Queue-Id: 69D2C16B09 X-Migadu-Scanner: mx12.migadu.com X-TUID: Ki8cTb3ray8D Matt writes: > There was discussion about different shells, Eric asked for others, "posh" was mentioned as "specially for POSIX compatibility checks", and then a "posh" was added to ob-shell.el by Eric (fb09863f). > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fb09863fbb35bf15bcf78262b6e31b8b8b8617e7 > > Around that time are a few stack exchange answers suggesting to use posh, the "Policy-compliant Ordinary SHell", to test for posix compliance. Debian distributed it by saying, "using posh as your /bin/sh may reveal breakage." It seems that posh was used to check for POSIX compliance. It's still available on Debian. > https://unix.stackexchange.com/questions/48786/how-can-i-test-for-posix-compliance-of-shell-scripts > https://web.archive.org/web/20130930231522/https://packages.debian.org/sid/posh > https://packages.debian.org/sid/posh It is also still available on Gentoo. > ** No one uses the "Policy-compliant Ordinary SHell" > The change on August 26, 2022 should have caused a breaking error for someone using the "Policy-compliant Ordinary SHell." The prompt for "posh" in "org-babel-shell-set-prompt-commands" is valid PowerShell syntax (AFAIKT) and invalid bash/dash syntax: > > function prompt { "org_babel_sh_prompt> " } > > It's not clear to me what this would do in the "Policy-compliant Ordinary SHell." In Bash, functions are defined using a form like: > > function fname [()] compound-command [ redirections ] Simply because I struggled to find what is "posh" at the time I wrote that code. I only found some obscure page (on the web!) saying the posh might be PowerShell. My commit a35d16368 did not intend to introduce anything new. It turns out that we never supported PowerShell and never announced such support. So we do not really need to support PowerShell. > * My stance > The unfortunate reality is we "support" PowerShell currently. We have code explicitly to handle PowerShell. Changing that could, technically, break someone's workflow. We do not. It was just my mistake trying to figure out what is "posh". Since posh is POSIX-compliant, generic PS1/PS2 variables should work, and we do not need a special entry in `org-babel-shell-set-prompt-commands' - we can remove "posh" record from there. I'd rather keep the value in `org-babel-shell-names' though. It should do no harm. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at