GNU bug report logs - #58810
29.0.50; [PATCH] 'eshell-stringify' sometimes produces wrong results

Previous Next

Package: emacs;

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

Date: Thu, 27 Oct 2022 01:23:02 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


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: 29.0.50; [PATCH] 'eshell-stringify' sometimes produces wrong results
Date: Wed, 26 Oct 2022 18:22:13 -0700
[Message part 1 (text/plain, inline)]
Starting from "emacs -Q -f -eshell":

  ~ $ echo $(list 'quote 'hello)
  'hell

The last character of "hello" was stripped. That's because 
'eshell-stringify' tries to remove the trailing newline from 
'pp-to-string', but it does so by always stripping the last character 
from the result. Obviously, that only works when the last character 
really is a newline.

Attached is a patch with regression tests for 'eshell-stringify' so that 
this works correctly.
[0001-Only-strip-newlines-when-stringifying-a-value-for-Es.patch (text/plain, attachment)]

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

Previous Next


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