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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73650 in the body.
You can then email your comments to 73650 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#73650; Package emacs. (Sun, 06 Oct 2024 01:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Porter <jporterbugs <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 06 Oct 2024 01:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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 1 (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)]

Reply sent to Jim Porter <jporterbugs <at> gmail.com>:
You have taken responsibility. (Thu, 17 Oct 2024 04:58:02 GMT) Full text and rfc822 format available.

Notification sent to Jim Porter <jporterbugs <at> gmail.com>:
bug acknowledged by developer. (Thu, 17 Oct 2024 04:58:03 GMT) Full text and rfc822 format available.

Message #10 received at 73650-done <at> debbugs.gnu.org (full text, mbox):

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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Nov 2024 12:24:10 GMT) Full text and rfc822 format available.

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.