From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24682 invoked from network); 22 Nov 2022 04:52:21 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Nov 2022 04:52:21 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1669092741; b=gSgXQRY1wqwZkwdqK5754NXEuJKQXZcgdE+vvYcAN+jvtaAbthMKGu/dfyAOV+kQBi9SbBJuY+ g9V2hF+Byr1J5Q9q89xIbCJJ7mn7pJPsP8fNl9nT4qwABeKsUhxm0M0PkyIQVn2EqQFlrZavvz NZG0a4wP92JRlq/awzJgqmdBifsWcdUfKMIMqtM05yZVLsmhovJW6XQ0k+PwBur625Yp7/f0fu YdphVw6wMMHgc1w8Y49f+Wnn8a1bqoDYclNc1s9AxaGh9tDKgezbof4qLmqCZ8n9+UKlqQL489 jiLiH8Xsyh0EOQuUS85ngwlRIAMLfksFfx30l/fOz7Z8Hw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f42.google.com) smtp.remote-ip=209.85.218.42; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1669092741; bh=vcL/N1nrHvKCOXOHzcJ3i1yQPQtE7gPsnvy8xbd5fB0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=pkffZaKZGc28PRBDgUdT26JO4usJUgFKZ8Pq0sSazjhIfcIEluIyfJDA0EqnZHNU/aaFBru27s zUABPdcHcdPb9yoUfBxBe91q0OUCNgZShVmHXhDxIjkxxNEKl6urFAEJLDUsLZZgX4rcwhknxV bjGzykomKgjfmMcsVAMGPMV86zAVZEc6wTckBGmjjjByq1K99skXQi0i//u7BH0wMKZaPsaDfk IbsZLAA5PO7ZmT/qBaaY6IO/hpjDuXokhLlRc7n6fn2WyAhOlNxBl1Gsgig4pi+TBmDWW+TB7R NRCwAESQw2SyETRtKRxJ9tqdagA3XMQCgigLY6moAjdL3Q==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=syC5KeaZDY/K2QNXMVqEe7J+S5V+EyL5sPCFoebjhKE=; b=PiMq7XYek5xDRiZs9n3V08Tgu+ Y5yrqSZmpx9fTMTFvn+hmlrGXVXGQDi1x9tMERTtBaUylZ7CQJVn/CWgAQR9enkrboAucBr/kNFms pfQYLuL+pDfuXQyERFoOWgsGecYwmkxhCHAxCwVxff9nCqoFatkMzpOl3S2wWLKWqy+enwZXnZXyf uUIkWLc475wg1p3eyc0kxysmEhMhyhIHXxmogTh/mbVujib1rnXfsIYGWMS6QeJUuG7L+RFnXhuwu jlL3RAR0ch2ae7KkDIQYBfm2CcL58FqMZFDXpQ9MiaOnLakbJbpQLNnDumDQdCN0no7M5w1aVTEZY z5DpKo5w==; Received: by zero.zsh.org with local id 1oxLGe-000OJZ-Mc; Tue, 22 Nov 2022 04:52:20 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f42.google.com) smtp.remote-ip=209.85.218.42; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f42.google.com ([209.85.218.42]:43813) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oxLFx-000Nqi-9i; Tue, 22 Nov 2022 04:51:38 +0000 Received: by mail-ej1-f42.google.com with SMTP id m22so33083802eji.10 for ; Mon, 21 Nov 2022 20:51:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=syC5KeaZDY/K2QNXMVqEe7J+S5V+EyL5sPCFoebjhKE=; b=11sTsi5J6O5+CeAhZubz52/v9RlvQeNXfR8uLQEhnq3J3Hep8SLjvJnNVv+4WwGYfU S+OOS3KhMnS96xx+vYJxWEFP1LyXqb3zc4YkZU2QJ7WD5GLAFWfIm7H2GRY5nWS3Pe31 h1YOcs/qKStL9VG/f2rG2pZIe/xagslirFXcGOdu/ZedHj6WzdQzNsH5W0sGm8t+7A9h vWMGM8BFDnP+Jby99a2Peepvnj6u/m2ndpiwbaWI3bIJxBHLEoUYAXABYLy8PE79Vsi9 IFG8S2ivP0Q0nxeIXINTIeQ+ivMabn9jPvpZi0rHSeY1RM6fbM2RSnmTndVxNyD8k9rd l6mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=syC5KeaZDY/K2QNXMVqEe7J+S5V+EyL5sPCFoebjhKE=; b=GUR4hIY1UzbJmfnoByYy36QxMDFn+jIYHBN8Jt7DzKbS3tGvptm4gf0GzGnFSs/2Ei HutTHsoGschAa756v4FKuRZfvJyAZQfiHOwLM68qZN4MT/uiQ8SdpR8sIscUnu7mHWwP 2jpqDCxyCYRYVBw9UyhV/PuMOQShb4EYUokTLOvGkONaMthyel1lnqjqoUvTnMA2vrb6 PTSIWBpQ0Yg4G8UaSIvlVOC2TFXpPMSlqLj6heXp77sgR6y5sYV1SyNB8/JvBAiesCyu Qx6fG/tsMc4q825oL7QqRY2EpZ8mHLCyet9sDLLGvJhTX96E4JB6b3EbHHTrJru4xy6o oxMg== X-Gm-Message-State: ANoB5pnN5/Fwuv3jWoiPxEW4+kauHlaH27bzNYDvKRsO0VFOmk8J39FV LJWfDpPa/ttPMs9Mb9nEvFIVv6+tc0yk6H9TJS4Dow== X-Google-Smtp-Source: AA0mqf4nJjUxdSnydrhqs4DI+PsvdnU7CiQlIavqzlY0N94c3DONz1YJAX2k53CyxVqWcf+Ml10KL2q1pO6U8xDvsMk= X-Received: by 2002:a17:906:2c51:b0:7b2:8c66:9bda with SMTP id f17-20020a1709062c5100b007b28c669bdamr17470691ejh.732.1669092696423; Mon, 21 Nov 2022 20:51:36 -0800 (PST) MIME-Version: 1.0 References: <230a78bb-fa97-4f3a-94a2-86982316274b@app.fastmail.com> In-Reply-To: From: Bart Schaefer Date: Mon, 21 Nov 2022 20:51:25 -0800 Message-ID: Subject: Re: [PATCH] Fix ERR_EXIT behavior in function calls and "always" statements To: Philippe Altherr Cc: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= , zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51021 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Mon, Nov 21, 2022 at 6:52 PM Philippe Altherr wrote: > For anyone arriving in the middle of the conversation or viewing this in the archives -- Please note that I wrote this: >> Each time though, you've removed the NEWS item. Although we've >> established that the behavior it describes was not actually >> appropriate, there still has been a change in ERR_EXIT behavior that >> probably warrants a mention. What's the best description of that? Whereas Lawrence wrote this: >> This suggests that anonymous >> functions should *not* behave like normal function calls here. > That's debatable. If, like me, you see anonymous functions as some kind o= f syntactic sugar, then it makes sense that they behave like function calls= and exit. However, I can also understand that others rather see them as an= other type of compound command. In that case, they should not exit. I think it's probably more appropriate to view a function, even an anonymous one, like a subshell rather than like either a simple or a complex command. Subshells also "pop the bubble" to use Lawrence's analogy, so it's probably fine for anonymous functions to do so. > FYI: Here are my next steps > - Write NEWS for my 3 fixes. > - Better document the role and usage of noerrexit and this_noerrexit. > - Try to fix "eval", "source", and possibly a bunch of other related case= s. > > Unless anyone sees a reason not to, it would be nice to submit my first p= acth, which reverts Bart's changes. For the other patches, I have at the ve= ry least to first add a NEWS item. I don't think there's any requirement that the NEWS item arrive at the same time as the other three patches. We sometimes don't add NEWS until the time of a release, months (years) after a patch was pushed to sourceforge git. I'd also prefer to post all your patches at once because you attached them all to the same zsh-workers article. Convention has been that a series of patches should be sent as a series of articles. I think I will go ahead and remove (most of) the ChangeLog references to my patches, unless anyone feels they're important for context (the git log of course remains).