GNU bug report logs - #73650
31.0.50; [PATCH] Improve correctness of Eshell conditional forms and allow if/else chaining

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sun, 6 Oct 2024 01:35:01 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#73650: closed (31.0.50; [PATCH] Improve correctness of Eshell
 conditional forms and allow if/else chaining)
Date: Thu, 17 Oct 2024 04:58:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 16 Oct 2024 21:56:01 -0700
with message-id <2025b4d6-5695-ebf1-af42-1ffb5c2fcc26 <at> gmail.com>
and subject line Re: bug#73650: 31.0.50; [PATCH] Improve correctness of Eshell conditional forms and allow if/else chaining
has caused the debbugs.gnu.org bug report #73650,
regarding 31.0.50; [PATCH] Improve correctness of Eshell conditional forms and allow if/else chaining
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
73650: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73650
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; [PATCH] Improve correctness of Eshell conditional forms and
 allow if/else chaining
Date: Sat, 5 Oct 2024 18:34:24 -0700
[Message part 3 (text/plain, inline)]
These patches improve a few inconsistencies in how Eshell conditionals 
work, especially when using Lisp forms inside of the command-form of 
"if". For example, before this patch, the following command outputs 
nothing at all:

  if (zerop 0) (identity \"yes\") (identity \"no\")

With the patches, it now correctly outputs "yes".

I also added the ability to use the "else" keyword so that you can chain 
together if/else blocks like so:

  if {[ -f file.txt ]} {
    echo found file
  } else if {[ -f alternate.txt ]} {
    echo found alternate
  } else {
    echo not found!
  }
[0001-Simplify-creation-of-Eshell-command-forms.patch (text/plain, attachment)]
[0002-Improve-correctness-of-Eshell-sub-forms.patch (text/plain, attachment)]
[0003-Add-support-for-chaining-conditionals-in-Eshell.patch (text/plain, attachment)]
[Message part 7 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: 73650-done <at> debbugs.gnu.org
Subject: Re: bug#73650: 31.0.50; [PATCH] Improve correctness of Eshell
 conditional forms and allow if/else chaining
Date: Wed, 16 Oct 2024 21:56:01 -0700
On 10/5/2024 6:34 PM, Jim Porter wrote:
> These patches improve a few inconsistencies in how Eshell conditionals 
> work, especially when using Lisp forms inside of the command-form of 
> "if".

Merged to the master branch as fada04cfc78, and closing this now.


This bug report was last modified 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.