GNU bug report logs -
#27361
24.4; eshell/echo silently ignores -n argument
Previous Next
Reported by: Phil Hagelberg <phil <at> hagelb.org>
Date: Wed, 14 Jun 2017 16:17:02 UTC
Severity: wishlist
Found in version 24.4
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 27361 <at> debbugs.gnu.org (full text, mbox):
It seems easy to get the behaviour that you want, for the
eshell-plain-echo-behavior case, which is the only relevant one.
At the same time, we can fix eshell/printnl for that case,
to avoid the doubled newlines that it currently gives.
I don't know how to explain in --help what -n means though. :)
--- a/lisp/eshell/em-basic.el
+++ b/lisp/eshell/em-basic.el
@@ -88,7 +88,8 @@ eshell-echo
It returns a formatted value that should be passed to `eshell-print'
or `eshell-printn' for display."
(if eshell-plain-echo-behavior
- (concat (apply 'eshell-flatten-and-stringify args) "\n")
+ (concat (apply 'eshell-flatten-and-stringify args)
+ (unless output-newline "\n"))
(let ((value
(cond
((= (length args) 0) "")
@@ -126,7 +127,8 @@ eshell/printnl
"Print out each of the arguments, separated by newlines."
(let ((elems (eshell-flatten-list args)))
(while elems
- (eshell-printn (eshell-echo (list (car elems))))
+ (eshell-printn (eshell-echo (list (car elems))
+ eshell-plain-echo-behavior))
(setq elems (cdr elems)))))
(defun eshell/listify (&rest args)
This bug report was last modified 3 years and 123 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.