bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Jim Porter
Subject: bug#59622: 29.0.50; [PATCH] Regression in Eshell's handling of escaped newlines
Date: Sat, 26 Nov 2022 16:36:59 -0800

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.

Attachment: 0001-Treat-escaped-newlines-in-Eshell-as-the-empty-string.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]