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>
Subject: bug#73650: closed (Re: bug#73650: 31.0.50; [PATCH] Improve
 correctness of Eshell conditional forms and allow if/else chaining)
Date: Thu, 17 Oct 2024 04:58:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#73650: 31.0.50; [PATCH] Improve correctness of Eshell conditional forms and allow if/else chaining

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 73650 <at> debbugs.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: 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.

[Message part 3 (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 4 (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)]

This bug report was last modified 220 days ago.

Previous Next


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