GNU bug report logs - #59622
29.0.50; [PATCH] Regression in Eshell's handling of escaped newlines

Previous Next

Package: emacs;

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

Date: Sun, 27 Nov 2022 00:38:01 UTC

Severity: normal

Tags: patch

Found in version 29.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#59622: closed (Re: bug#59622: 29.0.50; [PATCH] Regression in
 Eshell's handling of escaped newlines)
Date: Fri, 09 Dec 2022 01:01:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#59622: 29.0.50; [PATCH] Regression in Eshell's handling of escaped newlines

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 59622 <at> debbugs.gnu.org.

-- 
59622: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59622
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: Eli Zaretskii <eliz <at> gnu.org>
Cc: 59622-done <at> debbugs.gnu.org
Subject: Re: bug#59622: 29.0.50; [PATCH] Regression in Eshell's handling of
 escaped newlines
Date: Thu, 8 Dec 2022 16:59:53 -0800
On 12/7/2022 9:47 PM, Jim Porter wrote:
> I'll leave this open until I merge the small cleanup patch to master 
> once my first patch has gotten there.

Pushed my followup patch to master as 
8c01829c01ca81c990eadf34bc16794b65d62c70. Closing this now.

[Message part 3 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [PATCH] Regression in Eshell's handling of escaped newlines
Date: Sat, 26 Nov 2022 16:36:59 -0800
[Message part 4 (text/plain, inline)]
Starting from "emacs -Q -f eshell":

  # Emacs 28
  ~ $ echo foo\
  bar

  foobar

  # Emacs 29
  ~ $ echo foo\
  bar

  foo
  bar

That is, Emacs 28 used to treat escaped newlines in the way you'd expect 
from other shells: it expands to the empty string. Now in Emacs 29, it 
inserts a literal newline.

There's also a similar bug when doing this inside double-quotes:

  # Emacs 28
  ~ $ echo "foo\
  bar"

  ("foo\\" "bar")

  # Emacs 29
  ~  $ echo "foo\
  bar"

  foo\
  bar

Here, both cases are wrong. In Emacs 29, it inserts the literal 
backslash+newline combo, but Emacs 28 is even worse: it returns a list 
of two elements! Wrapping arguments in quotes should always produce a 
string in Eshell.
[0001-Treat-escaped-newlines-in-Eshell-as-the-empty-string.patch (text/plain, attachment)]

This bug report was last modified 2 years and 188 days ago.

Previous Next


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