GNU logs - #12689, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Aidan Gauland <aidalgol@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 20 Oct 2012 08:09:02 +0000
Resent-Message-ID: <handler.12689.B.135072054026372 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 12689 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.135072054026372
          (code B ref -1); Sat, 20 Oct 2012 08:09:02 +0000
Received: (at submit) by debbugs.gnu.org; 20 Oct 2012 08:09:00 +0000
Received: from localhost ([127.0.0.1]:52591 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TPU78-0006rI-Px
	for submit <at> debbugs.gnu.org; Sat, 20 Oct 2012 04:08:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48185)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <aidalgol@HIDDEN>) id 1TPU74-0006r5-Ib
	for submit <at> debbugs.gnu.org; Sat, 20 Oct 2012 04:08:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <aidalgol@HIDDEN>) id 1TPU5Q-0007ru-WA
	for submit <at> debbugs.gnu.org; Sat, 20 Oct 2012 04:07:15 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:56151)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <aidalgol@HIDDEN>) id 1TPU5Q-0007rq-Sb
	for submit <at> debbugs.gnu.org; Sat, 20 Oct 2012 04:07:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43822)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <aidalgol@HIDDEN>) id 1TPU5O-00025M-QX
	for bug-gnu-emacs@HIDDEN; Sat, 20 Oct 2012 04:07:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <aidalgol@HIDDEN>) id 1TPU5M-0007r5-L5
	for bug-gnu-emacs@HIDDEN; Sat, 20 Oct 2012 04:07:10 -0400
Received: from jersey.rurallink.co.nz ([114.134.15.197]:47617
	helo=smtp.rurallink.co.nz) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <aidalgol@HIDDEN>) id 1TPU5L-0007pE-Sb
	for bug-gnu-emacs@HIDDEN; Sat, 20 Oct 2012 04:07:08 -0400
Received: from 114-134-8-135.rurallink.co.nz ([114.134.8.135]
	helo=dimension8.tehua.net) by smtp.rurallink.co.nz with esmtpsa
	(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)
	(envelope-from <aidalgol@HIDDEN>) id 1TPU51-0005R2-HQ
	for bug-gnu-emacs@HIDDEN; Sat, 20 Oct 2012 21:06:58 +1300
From: Aidan Gauland <aidalgol@HIDDEN>
Date: Sat, 20 Oct 2012 21:06:41 +1300
Message-ID: <87wqyl1sa6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rurallink-Authenticated-User: aidalgol@HIDDEN
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.118.235.17
X-Spam-Score: -6.2 (------)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.2 (------)

In Eshell, ${cmd} expands to nil.
e.g.
$ echo ${/bin/echo -e "foo\nbar"}
$ 
Note the absence of any output from `echo'.

$ echo ${/bin/echo -e "foo\nbar"}-foo
nil-foo
n$ 

`*echo' prints expected output, but only for the first case.
$ echo ${/bin/echo -e "foo\nbar"}
foo
bar
$ 

$ echo ${/bin/echo -e "foo\nbar"}-foo
("foo" "bar")-foo
$ 


In GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-10 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11203902
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.2/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_NZ.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: EShell

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x e s h <tab> <return> e c h o SPC $ { / b i n / 
e c h o M-b C-e SPC } <backspace> - e SPC " f o o <return> 
<backspace> \ n b a r " } <return> M-p - f o o <return> 
M-p C-a * <return> M-p <M-backspace> <backspace> <return> 
M-x r e p o r t <tab> <return>

Recent messages:
Loading em-dirs...done
Loading em-glob...done
Loading em-hist...done
Loading em-ls...done
Loading em-prompt...done
Loading em-script...done
Loading em-term...done
Loading em-unix...done
Expecting completion of delimiter { ...
History item: 128 [3 times]

Load-path shadows:
/usr/share/emacs/24.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/24.2/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.2/lisp/textmodes/flyspell
/usr/share/emacs/24.2/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.2/lisp/textmodes/ispell
/usr/local/share/emacs/site-lisp/org-freemind hides /usr/share/emacs/24.2/lisp/org/org-freemind
/usr/local/share/emacs/site-lisp/ob-octave hides /usr/share/emacs/24.2/lisp/org/ob-octave
/usr/local/share/emacs/site-lisp/ob-comint hides /usr/share/emacs/24.2/lisp/org/ob-comint
/usr/local/share/emacs/site-lisp/org-id hides /usr/share/emacs/24.2/lisp/org/org-id
/usr/local/share/emacs/site-lisp/org-timer hides /usr/share/emacs/24.2/lisp/org/org-timer
/usr/local/share/emacs/site-lisp/org-agenda hides /usr/share/emacs/24.2/lisp/org/org-agenda
/usr/local/share/emacs/site-lisp/org-vm hides /usr/share/emacs/24.2/lisp/org/org-vm
/usr/local/share/emacs/site-lisp/org-list hides /usr/share/emacs/24.2/lisp/org/org-list
/usr/local/share/emacs/site-lisp/ob-haskell hides /usr/share/emacs/24.2/lisp/org/ob-haskell
/usr/local/share/emacs/site-lisp/ob-lisp hides /usr/share/emacs/24.2/lisp/org/ob-lisp
/usr/local/share/emacs/site-lisp/org-mhe hides /usr/share/emacs/24.2/lisp/org/org-mhe
/usr/local/share/emacs/site-lisp/ob-ocaml hides /usr/share/emacs/24.2/lisp/org/ob-ocaml
/usr/local/share/emacs/site-lisp/org-xoxo hides /usr/share/emacs/24.2/lisp/org/org-xoxo
/usr/local/share/emacs/site-lisp/ob-calc hides /usr/share/emacs/24.2/lisp/org/ob-calc
/usr/local/share/emacs/site-lisp/org-rmail hides /usr/share/emacs/24.2/lisp/org/org-rmail
/usr/local/share/emacs/site-lisp/org-taskjuggler hides /usr/share/emacs/24.2/lisp/org/org-taskjuggler
/usr/local/share/emacs/site-lisp/org-mks hides /usr/share/emacs/24.2/lisp/org/org-mks
/usr/local/share/emacs/site-lisp/org-archive hides /usr/share/emacs/24.2/lisp/org/org-archive
/usr/local/share/emacs/site-lisp/org-bbdb hides /usr/share/emacs/24.2/lisp/org/org-bbdb
/usr/local/share/emacs/site-lisp/ob-eval hides /usr/share/emacs/24.2/lisp/org/ob-eval
/usr/local/share/emacs/site-lisp/org hides /usr/share/emacs/24.2/lisp/org/org
/usr/local/share/emacs/site-lisp/org-table hides /usr/share/emacs/24.2/lisp/org/org-table
/usr/local/share/emacs/site-lisp/org-docbook hides /usr/share/emacs/24.2/lisp/org/org-docbook
/usr/local/share/emacs/site-lisp/ob-exp hides /usr/share/emacs/24.2/lisp/org/ob-exp
/usr/local/share/emacs/site-lisp/ob-C hides /usr/share/emacs/24.2/lisp/org/ob-C
/usr/local/share/emacs/site-lisp/org-irc hides /usr/share/emacs/24.2/lisp/org/org-irc
/usr/local/share/emacs/site-lisp/org-footnote hides /usr/share/emacs/24.2/lisp/org/org-footnote
/usr/local/share/emacs/site-lisp/org-jsinfo hides /usr/share/emacs/24.2/lisp/org/org-jsinfo
/usr/local/share/emacs/site-lisp/org-bibtex hides /usr/share/emacs/24.2/lisp/org/org-bibtex
/usr/local/share/emacs/site-lisp/ob-perl hides /usr/share/emacs/24.2/lisp/org/ob-perl
/usr/local/share/emacs/site-lisp/org-publish hides /usr/share/emacs/24.2/lisp/org/org-publish
/usr/local/share/emacs/site-lisp/org-exp-blocks hides /usr/share/emacs/24.2/lisp/org/org-exp-blocks
/usr/local/share/emacs/site-lisp/ob-java hides /usr/share/emacs/24.2/lisp/org/ob-java
/usr/local/share/emacs/site-lisp/ob-table hides /usr/share/emacs/24.2/lisp/org/ob-table
/usr/local/share/emacs/site-lisp/ob-scheme hides /usr/share/emacs/24.2/lisp/org/ob-scheme
/usr/local/share/emacs/site-lisp/org-install hides /usr/share/emacs/24.2/lisp/org/org-install
/usr/local/share/emacs/site-lisp/ob-latex hides /usr/share/emacs/24.2/lisp/org/ob-latex
/usr/local/share/emacs/site-lisp/org-special-blocks hides /usr/share/emacs/24.2/lisp/org/org-special-blocks
/usr/local/share/emacs/site-lisp/ob-mscgen hides /usr/share/emacs/24.2/lisp/org/ob-mscgen
/usr/local/share/emacs/site-lisp/org-gnus hides /usr/share/emacs/24.2/lisp/org/org-gnus
/usr/local/share/emacs/site-lisp/org-beamer hides /usr/share/emacs/24.2/lisp/org/org-beamer
/usr/local/share/emacs/site-lisp/ob-sass hides /usr/share/emacs/24.2/lisp/org/ob-sass
/usr/local/share/emacs/site-lisp/org-datetree hides /usr/share/emacs/24.2/lisp/org/org-datetree
/usr/local/share/emacs/site-lisp/org-src hides /usr/share/emacs/24.2/lisp/org/org-src
/usr/local/share/emacs/site-lisp/org-mouse hides /usr/share/emacs/24.2/lisp/org/org-mouse
/usr/local/share/emacs/site-lisp/org-entities hides /usr/share/emacs/24.2/lisp/org/org-entities
/usr/local/share/emacs/site-lisp/org-odt hides /usr/share/emacs/24.2/lisp/org/org-odt
/usr/local/share/emacs/site-lisp/org-plot hides /usr/share/emacs/24.2/lisp/org/org-plot
/usr/local/share/emacs/site-lisp/org-eshell hides /usr/share/emacs/24.2/lisp/org/org-eshell
/usr/local/share/emacs/site-lisp/org-latex hides /usr/share/emacs/24.2/lisp/org/org-latex
/usr/local/share/emacs/site-lisp/ob-sql hides /usr/share/emacs/24.2/lisp/org/ob-sql
/usr/local/share/emacs/site-lisp/ob-ref hides /usr/share/emacs/24.2/lisp/org/ob-ref
/usr/local/share/emacs/site-lisp/ob-js hides /usr/share/emacs/24.2/lisp/org/ob-js
/usr/local/share/emacs/site-lisp/ob-gnuplot hides /usr/share/emacs/24.2/lisp/org/ob-gnuplot
/usr/local/share/emacs/site-lisp/org-remember hides /usr/share/emacs/24.2/lisp/org/org-remember
/usr/local/share/emacs/site-lisp/org-protocol hides /usr/share/emacs/24.2/lisp/org/org-protocol
/usr/local/share/emacs/site-lisp/ob-shen hides /usr/share/emacs/24.2/lisp/org/ob-shen
/usr/local/share/emacs/site-lisp/org-macs hides /usr/share/emacs/24.2/lisp/org/org-macs
/usr/local/share/emacs/site-lisp/ob-plantuml hides /usr/share/emacs/24.2/lisp/org/ob-plantuml
/usr/local/share/emacs/site-lisp/org-exp hides /usr/share/emacs/24.2/lisp/org/org-exp
/usr/local/share/emacs/site-lisp/ob-R hides /usr/share/emacs/24.2/lisp/org/ob-R
/usr/local/share/emacs/site-lisp/ob-sh hides /usr/share/emacs/24.2/lisp/org/ob-sh
/usr/local/share/emacs/site-lisp/org-capture hides /usr/share/emacs/24.2/lisp/org/org-capture
/usr/local/share/emacs/site-lisp/org-colview hides /usr/share/emacs/24.2/lisp/org/org-colview
/usr/local/share/emacs/site-lisp/org-clock hides /usr/share/emacs/24.2/lisp/org/org-clock
/usr/local/share/emacs/site-lisp/org-info hides /usr/share/emacs/24.2/lisp/org/org-info
/usr/local/share/emacs/site-lisp/org-ascii hides /usr/share/emacs/24.2/lisp/org/org-ascii
/usr/local/share/emacs/site-lisp/org-ctags hides /usr/share/emacs/24.2/lisp/org/org-ctags
/usr/local/share/emacs/site-lisp/ob-maxima hides /usr/share/emacs/24.2/lisp/org/ob-maxima
/usr/local/share/emacs/site-lisp/org-inlinetask hides /usr/share/emacs/24.2/lisp/org/org-inlinetask
/usr/local/share/emacs/site-lisp/ob-emacs-lisp hides /usr/share/emacs/24.2/lisp/org/ob-emacs-lisp
/usr/local/share/emacs/site-lisp/ob-python hides /usr/share/emacs/24.2/lisp/org/ob-python
/usr/local/share/emacs/site-lisp/org-lparse hides /usr/share/emacs/24.2/lisp/org/org-lparse
/usr/local/share/emacs/site-lisp/org-compat hides /usr/share/emacs/24.2/lisp/org/org-compat
/usr/local/share/emacs/site-lisp/org-docview hides /usr/share/emacs/24.2/lisp/org/org-docview
/usr/local/share/emacs/site-lisp/ob-dot hides /usr/share/emacs/24.2/lisp/org/ob-dot
/usr/local/share/emacs/site-lisp/org-feed hides /usr/share/emacs/24.2/lisp/org/org-feed
/usr/local/share/emacs/site-lisp/ob-keys hides /usr/share/emacs/24.2/lisp/org/ob-keys
/usr/local/share/emacs/site-lisp/org-mac-message hides /usr/share/emacs/24.2/lisp/org/org-mac-message
/usr/local/share/emacs/site-lisp/org-attach hides /usr/share/emacs/24.2/lisp/org/org-attach
/usr/local/share/emacs/site-lisp/org-mew hides /usr/share/emacs/24.2/lisp/org/org-mew
/usr/local/share/emacs/site-lisp/ob-ditaa hides /usr/share/emacs/24.2/lisp/org/ob-ditaa
/usr/local/share/emacs/site-lisp/ob-asymptote hides /usr/share/emacs/24.2/lisp/org/ob-asymptote
/usr/local/share/emacs/site-lisp/org-crypt hides /usr/share/emacs/24.2/lisp/org/org-crypt
/usr/local/share/emacs/site-lisp/ob-sqlite hides /usr/share/emacs/24.2/lisp/org/ob-sqlite
/usr/local/share/emacs/site-lisp/org-mobile hides /usr/share/emacs/24.2/lisp/org/org-mobile
/usr/local/share/emacs/site-lisp/ob-matlab hides /usr/share/emacs/24.2/lisp/org/ob-matlab
/usr/local/share/emacs/site-lisp/org-faces hides /usr/share/emacs/24.2/lisp/org/org-faces
/usr/local/share/emacs/site-lisp/ob-fortran hides /usr/share/emacs/24.2/lisp/org/ob-fortran
/usr/local/share/emacs/site-lisp/ob-ruby hides /usr/share/emacs/24.2/lisp/org/ob-ruby
/usr/local/share/emacs/site-lisp/ob-clojure hides /usr/share/emacs/24.2/lisp/org/ob-clojure
/usr/local/share/emacs/site-lisp/org-w3m hides /usr/share/emacs/24.2/lisp/org/org-w3m
/usr/local/share/emacs/site-lisp/ob-tangle hides /usr/share/emacs/24.2/lisp/org/ob-tangle
/usr/local/share/emacs/site-lisp/ob-screen hides /usr/share/emacs/24.2/lisp/org/ob-screen
/usr/local/share/emacs/site-lisp/ob-picolisp hides /usr/share/emacs/24.2/lisp/org/ob-picolisp
/usr/local/share/emacs/site-lisp/org-pcomplete hides /usr/share/emacs/24.2/lisp/org/org-pcomplete
/usr/local/share/emacs/site-lisp/ob-css hides /usr/share/emacs/24.2/lisp/org/ob-css
/usr/local/share/emacs/site-lisp/org-icalendar hides /usr/share/emacs/24.2/lisp/org/org-icalendar
/usr/local/share/emacs/site-lisp/org-indent hides /usr/share/emacs/24.2/lisp/org/org-indent
/usr/local/share/emacs/site-lisp/org-habit hides /usr/share/emacs/24.2/lisp/org/org-habit
/usr/local/share/emacs/site-lisp/ob hides /usr/share/emacs/24.2/lisp/org/ob
/usr/local/share/emacs/site-lisp/ob-ledger hides /usr/share/emacs/24.2/lisp/org/ob-ledger
/usr/local/share/emacs/site-lisp/org-html hides /usr/share/emacs/24.2/lisp/org/org-html
/usr/local/share/emacs/site-lisp/ob-org hides /usr/share/emacs/24.2/lisp/org/ob-org
/usr/local/share/emacs/site-lisp/ob-awk hides /usr/share/emacs/24.2/lisp/org/ob-awk
/usr/local/share/emacs/site-lisp/ob-lilypond hides /usr/share/emacs/24.2/lisp/org/ob-lilypond
/usr/local/share/emacs/site-lisp/org-wl hides /usr/share/emacs/24.2/lisp/org/org-wl
/usr/local/share/emacs/site-lisp/ob-lob hides /usr/share/emacs/24.2/lisp/org/ob-lob

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils pp em-unix pcomplete comint regexp-opt
ansi-color em-term term disp-table ehelp electric em-script em-prompt
em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner
em-alias ring esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc
help-fns esh-groups eshell esh-module esh-mode esh-util time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.428 (Entity 5.428)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Aidan Gauland <aidalgol@HIDDEN>
Subject: bug#12689: Acknowledgement (24.2; Eshell ${cmd} substitution)
Message-ID: <handler.12689.B.135072054026372.ack <at> debbugs.gnu.org>
References: <87wqyl1sa6.fsf@HIDDEN>
X-Gnu-PR-Message: ack 12689
X-Gnu-PR-Package: emacs
Reply-To: 12689 <at> debbugs.gnu.org
Date: Sat, 20 Oct 2012 08:09:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 12689 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
12689: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12689
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
References: <87wqyl1sa6.fsf@HIDDEN>
In-Reply-To: <87wqyl1sa6.fsf@HIDDEN>
Resent-From: samer <samer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 14 Dec 2014 12:45:02 +0000
Resent-Message-ID: <handler.12689.B12689.141856107414789 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Aidan Gauland <aidalgol@HIDDEN>
Cc: 12689 <at> debbugs.gnu.org
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.141856107414789
          (code B ref 12689); Sun, 14 Dec 2014 12:45:02 +0000
Received: (at 12689) by debbugs.gnu.org; 14 Dec 2014 12:44:34 +0000
Received: from localhost ([127.0.0.1]:45312 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y08XJ-0003qR-Rt
	for submit <at> debbugs.gnu.org; Sun, 14 Dec 2014 07:44:34 -0500
Received: from samertm.com ([162.243.37.26]:40113 helo=mail.samertm.com)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <samer@HIDDEN>) id 1Y08XG-0003qI-Ve
 for 12689 <at> debbugs.gnu.org; Sun, 14 Dec 2014 07:44:32 -0500
Received: from samertm.com (localhost [127.0.0.1])
 by mail.samertm.com (Postfix) with ESMTP id 7B75481133;
 Sun, 14 Dec 2014 12:44:04 +0000 (UTC)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Sun, 14 Dec 2014 04:44:04 -0800
From: samer <samer@HIDDEN>
Message-ID: <6c864c7f4302d40af7827e5f7ed7a100@HIDDEN>
X-Sender: samer@HIDDEN
User-Agent: Roundcube Webmail/0.9.5
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

There are two issues contained in this bug: eshell-plain-command doesn't
wait for the process to finish before returning, and echo parses output
from subcommands as lisp objects instead of as args.

The following patch makes eshell wait for external commands to finish
before getting their output.

The second bug is more complicated. Arguments are parsed with
eshell-parse-arguments, which takes into account eshell's rules and
syntax. When things are run in subshells, they're converted to lisp
objects with eshell-convert, with no further processing. For example,
for the command "echo ${/bin/echo hello there}" the subshell will return
"hello there", which is seen as a single argument by the outer "echo".
This isn't a big deal, but it means some constructions won't make sense.
For instance:

$ echo hello there
("hello" "there")
$ echo ${/bin/echo hello there}
hello there

I tried hacking with eshell-parse-variable-ref to parse the arguments
correctly, but it's trickier than it seems at first glance, so I'll work
on it later. This patch gets us 90% of the way there, though.

Best,
Samer

---- Patch below ----

Changes from HEAD to working tree
2 files changed, 6 insertions(+), 1 deletion(-)
  lisp/ChangeLog         |    5 +++++
  lisp/eshell/esh-cmd.el |    2 +-

	Modified   lisp/ChangeLog
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 45ba279..aa00661 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-14  Samer Masterson  <samer@HIDDEN>
+
+	* eshell/esh-cmd.el (eshell-plain-command): Wait for subprocess to
+	finish before evaluating command (bug#12680).
+
  2014-11-28  Martin Rudalics  <rudalics@HIDDEN>

  	Fix two issues around help-window-select.  (Bug#11039) (Bug#19012)
	Modified   lisp/eshell/esh-cmd.el
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index d20b66a..f17aa41 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -1241,7 +1241,7 @@ or an external command."
  	     (or esym eshell-prefer-lisp-functions
  		 (not (eshell-search-path command))))
  	(eshell-lisp-command sym args)
-      (eshell-external-command command args))))
+      (eshell-wait-for-process (eshell-external-command command 
args)))))

  (defun eshell-exec-lisp (printer errprint func-or-form args form-p)
    "Execute a lisp FUNC-OR-FORM, maybe passing ARGS.





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
References: <87wqyl1sa6.fsf@HIDDEN>
In-Reply-To: <87wqyl1sa6.fsf@HIDDEN>
Resent-From: Samer Masterson <samer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 24 Feb 2015 10:57:01 +0000
Resent-Message-ID: <handler.12689.B12689.142477538812627 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 12689 <at> debbugs.gnu.org
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.142477538812627
          (code B ref 12689); Tue, 24 Feb 2015 10:57:01 +0000
Received: (at 12689) by debbugs.gnu.org; 24 Feb 2015 10:56:28 +0000
Received: from localhost ([127.0.0.1]:56313 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YQDAB-0003HZ-7E
	for submit <at> debbugs.gnu.org; Tue, 24 Feb 2015 05:56:27 -0500
Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:60137
 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <samer@HIDDEN>) id 1YQDA8-0003HL-Rd
 for 12689 <at> debbugs.gnu.org; Tue, 24 Feb 2015 05:56:25 -0500
Received: from [10.1.10.35] (c-98-210-154-226.hsd1.ca.comcast.net
 [98.210.154.226])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by samertm.com (Postfix) with ESMTPSA id A648142D27
 for <12689 <at> debbugs.gnu.org>; Tue, 24 Feb 2015 10:56:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail;
 t=1424775372; bh=qehotZQxsjxGWq46CWdKsr9WRkSqL9w5kJ32w/pu3JY=;
 h=Date:From:Subject:To:From;
 b=PlDjU/rF1urTk+Zuyx95ZmhfPLri840BePkzAFGScp5HfD1wjv4qV8Lj2fVJ4VJHR
 LM5GIMMgB8kwfP4JGYseQg5Nfz+Hf9wMwtBdvJb/cALCfKwI0lseMXhbsM+L+jpsvN
 ZTMMOu9EJ6IJebTw+diGXY/udDaiqax0m7gL05c0=
Date: Tue, 24 Feb 2015 02:56:12 -0800
From: Samer Masterson <samer@HIDDEN>
Message-Id: <1424775372.11596.6@HIDDEN>
X-Mailer: geary/0.8.3
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=-MqMClZe9Hfn7SHT0rq/R"
X-Spam-Score: 0.4 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.4 (/)

--=-MqMClZe9Hfn7SHT0rq/R
Content-Type: text/plain; charset=utf-8; format=flowed

Hi,

My copyright papers have been processed. Can we apply this to master?

Best,
Samer

Changes from HEAD to working tree
2 files changed, 6 insertions(+), 1 deletion(-)
 lisp/ChangeLog         |    5 +++++
 lisp/eshell/esh-cmd.el |    2 +-

	Modified   lisp/ChangeLog
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 45ba279..aa00661 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-14  Samer Masterson  <samer <at> samertm.com>
+
+	* eshell/esh-cmd.el (eshell-plain-command): Wait for subprocess to
+	finish before evaluating command (bug#12680).
+
 2014-11-28  Martin Rudalics  <rudalics <at> gmx.at>

 	Fix two issues around help-window-select.  (Bug#11039) (Bug#19012)
	Modified   lisp/eshell/esh-cmd.el
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index d20b66a..f17aa41 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -1241,7 +1241,7 @@ or an external command."
 	     (or esym eshell-prefer-lisp-functions
 		 (not (eshell-search-path command))))
 	(eshell-lisp-command sym args)
-      (eshell-external-command command args))))
+      (eshell-wait-for-process (eshell-external-command command
args)))))

 (defun eshell-exec-lisp (printer errprint func-or-form args form-p)
   "Execute a lisp FUNC-OR-FORM, maybe passing ARGS.

--=-MqMClZe9Hfn7SHT0rq/R
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<div>Hi,</div><div><br></div><div>My copyright papers have been processed. =
Can we apply this to master?</div><div><br></div><div>Best,</div><div>Samer=
</div><div><br></div><div>Changes from HEAD to working tree</div><div>2 fil=
es changed, 6 insertions(+), 1 deletion(-)</div><div>&nbsp;lisp/ChangeLog &=
nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;5 +++++</div><div>&nbsp;lisp/eshe=
ll/esh-cmd.el | &nbsp; &nbsp;2 +-</div><div><br></div><div><span class=3D"A=
pple-tab-span" style=3D"white-space:pre">	</span>Modified &nbsp; lisp/Chang=
eLog</div><div>diff --git a/lisp/ChangeLog b/lisp/ChangeLog</div><div>index=
 45ba279..aa00661 100644</div><div>--- a/lisp/ChangeLog</div><div>+++ b/lis=
p/ChangeLog</div><div>@@ -1,3 +1,8 @@</div><div>+2014-12-14 &nbsp;Samer Mas=
terson &nbsp;&lt;samer &lt;at&gt; samertm.com&gt;</div><div>+</div><div>+<s=
pan class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>* eshell/esh=
-cmd.el (eshell-plain-command): Wait for subprocess to</div><div>+<span cla=
ss=3D"Apple-tab-span" style=3D"white-space:pre">	</span>finish before evalu=
ating command (bug#12680).</div><div>+</div><div>&nbsp;2014-11-28 &nbsp;Mar=
tin Rudalics &nbsp;&lt;rudalics &lt;at&gt; gmx.at&gt;</div><div><br></div><=
div>&nbsp;<span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>=
Fix two issues around help-window-select. &nbsp;(Bug#11039) (Bug#19012)</di=
v><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>Mod=
ified &nbsp; lisp/eshell/esh-cmd.el</div><div>diff --git a/lisp/eshell/esh-=
cmd.el b/lisp/eshell/esh-cmd.el</div><div>index d20b66a..f17aa41 100644</di=
v><div>--- a/lisp/eshell/esh-cmd.el</div><div>+++ b/lisp/eshell/esh-cmd.el<=
/div><div>@@ -1241,7 +1241,7 @@ or an external command."</div><div>&nbsp;<s=
pan class=3D"Apple-tab-span" style=3D"white-space:pre">	</span> &nbsp; &nbs=
p; (or esym eshell-prefer-lisp-functions</div><div>&nbsp;<span class=3D"App=
le-tab-span" style=3D"white-space:pre">		</span> (not (eshell-search-path c=
ommand))))</div><div>&nbsp;<span class=3D"Apple-tab-span" style=3D"white-sp=
ace:pre">	</span>(eshell-lisp-command sym args)</div><div>- &nbsp; &nbsp; &=
nbsp;(eshell-external-command command args))))</div><div>+ &nbsp; &nbsp; &n=
bsp;(eshell-wait-for-process (eshell-external-command command&nbsp;</div><d=
iv>args)))))</div><div><br></div><div>&nbsp;(defun eshell-exec-lisp (printe=
r errprint func-or-form args form-p)</div><div>&nbsp; &nbsp;"Execute a lisp=
 FUNC-OR-FORM, maybe passing ARGS.</div>=

--=-MqMClZe9Hfn7SHT0rq/R--





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 03 Mar 2015 15:55:01 +0000
Resent-Message-ID: <handler.12689.B12689.142539806710615 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Samer Masterson <samer@HIDDEN>
Cc: 12689 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.142539806710615
          (code B ref 12689); Tue, 03 Mar 2015 15:55:01 +0000
Received: (at 12689) by debbugs.gnu.org; 3 Mar 2015 15:54:27 +0000
Received: from localhost ([127.0.0.1]:34074 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YSp9P-0002l9-9J
	for submit <at> debbugs.gnu.org; Tue, 03 Mar 2015 10:54:27 -0500
Received: from mtaout24.012.net.il ([80.179.55.180]:38756)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1YSp9M-0002ku-Ge
 for 12689 <at> debbugs.gnu.org; Tue, 03 Mar 2015 10:54:25 -0500
Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il
 (HyperSendmail v2007.08) id <0NKN00B007OZ3U00@HIDDEN> for
 12689 <at> debbugs.gnu.org; Tue, 03 Mar 2015 17:46:20 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NKN001IP7T7WQ90@HIDDEN>; Tue, 03 Mar 2015 17:46:19 +0200 (IST)
Date: Tue, 03 Mar 2015 17:54:10 +0200
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <1424775372.11596.6@HIDDEN>
X-012-Sender: halo1@HIDDEN
Message-id: <83bnkaqdp9.fsf@HIDDEN>
References: <1424775372.11596.6@HIDDEN>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Tue, 24 Feb 2015 02:56:12 -0800
> From: Samer Masterson <samer@HIDDEN>
> 
> Changes from HEAD to working tree
> 2 files changed, 6 insertions(+), 1 deletion(-)
> lisp/ChangeLog | 5 +++++
> lisp/eshell/esh-cmd.el | 2 +-
> 
> Modified lisp/ChangeLog
> diff --git a/lisp/ChangeLog b/lisp/ChangeLog
> index 45ba279..aa00661 100644
> --- a/lisp/ChangeLog
> +++ b/lisp/ChangeLog
> @@ -1,3 +1,8 @@
> +2014-12-14 Samer Masterson <samer <at> samertm.com>
> +
> + * eshell/esh-cmd.el (eshell-plain-command): Wait for subprocess to
> + finish before evaluating command (bug#12680).

Does this have any effect on the feature where Eshell can run several
commands simultaneously via a shell-like pipe?

Thanks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Samer Masterson <samer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 04 Mar 2015 12:15:02 +0000
Resent-Message-ID: <handler.12689.B12689.142547126529103 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 12689 <at> debbugs.gnu.org
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.142547126529103
          (code B ref 12689); Wed, 04 Mar 2015 12:15:02 +0000
Received: (at 12689) by debbugs.gnu.org; 4 Mar 2015 12:14:25 +0000
Received: from localhost ([127.0.0.1]:34674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YT8C0-0007ZK-Qi
	for submit <at> debbugs.gnu.org; Wed, 04 Mar 2015 07:14:25 -0500
Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:35049
 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <samer@HIDDEN>) id 1YT8By-0007Z5-IR
 for 12689 <at> debbugs.gnu.org; Wed, 04 Mar 2015 07:14:23 -0500
Received: from [10.0.1.9] (199-83-223-33.PUBLIC.monkeybrains.net
 [199.83.223.33])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by samertm.com (Postfix) with ESMTPSA id 1FAC942D22;
 Wed,  4 Mar 2015 12:14:01 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail;
 t=1425471242; bh=YEVP2201BgZ7l2xH0Zrg9b/7+VtWYXxkt9DsejMkItQ=;
 h=Date:From:Subject:To:Cc:In-Reply-To:References:From;
 b=Z+eXGPXUut1idoSHmgrUsdwH891vUJZyORH+w8VINqeorZC7uRXSFyPqMAEgTOmKj
 uJbAZgnuXJ6/ztZQ/rTu0XHDmqf4kJA4Y6AsJPNpJPc5cqrX9gVUbaTJECK0+NnmWx
 CoisWfIMl3FH6mI2ZCKR4C+Ygjqkw74vH9lVkCj0=
Date: Wed, 04 Mar 2015 04:14:07 -0800
From: Samer Masterson <samer@HIDDEN>
Message-Id: <1425471247.1450.2@HIDDEN>
In-Reply-To: <83bnkaqdp9.fsf@HIDDEN>
References: <1424775372.11596.6@HIDDEN> <83bnkaqdp9.fsf@HIDDEN>
X-Mailer: geary/0.9.1
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=-mKlQu5t04a1vrM8PAeVm"
X-Spam-Score: 0.4 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.4 (/)

--=-mKlQu5t04a1vrM8PAeVm
Content-Type: text/plain; charset=utf-8; format=flowed

On Tue, Mar 3, 2015 at 7:54 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> Does this have any effect on the feature where Eshell can run several
> commands simultaneously via a shell-like pipe?
> 
> Thanks.

I don't know what feature you're describing. Here is the output from 
running regular pipes:

~ $ echo hello | /bin/echo there | /bin/echo hey | echo hi # Without 
patch
hi
hey
~ $ echo hello | /bin/echo there | /bin/echo hey | echo hi # With patch
hi
hey
there
hello

First, we should ignore the fact that echo does nothing with stdin, and 
the above commands print "hi" in bash. I do not understand why the 
command without the patch only prints out "hey\nhi", but it printed 
that consistently on my computer. The second output is incorrect (or at 
the very least unexpected?), but less incorrect than the first. If this 
is what you were talking about, then the commands may have appeared to 
be simultaneous because they were racing, but I'm not sure if that's 
intentional.

--=-mKlQu5t04a1vrM8PAeVm
Content-Type: text/html; charset=utf-8

On Tue, Mar 3, 2015 at 7:54 AM, Eli Zaretskii &lt;eliz@HIDDEN&gt; wrote:<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">Does this have any effect on the feature where Eshell can run several
commands simultaneously via a shell-like pipe?

Thanks.</div></blockquote><br><div>I don't know what feature you're describing. Here is the output from running regular pipes:</div><div><br></div><div><div>~ $ echo hello | /bin/echo there | /bin/echo hey | echo hi # Without patch</div><div>hi</div><div>hey</div><div>~ $ echo hello | /bin/echo there | /bin/echo hey | echo hi # With patch</div><div>hi</div><div>hey</div><div>there</div><div>hello</div></div><div><br></div><div>First, we should ignore the fact that echo does nothing with stdin, and the above commands print "hi" in bash. I do not understand why the command without the patch only prints out "hey\nhi", but it printed that consistently on my computer. The second output is incorrect (or at the very least unexpected?), but less incorrect than the first. If this is what you were talking about, then the commands may have appeared to be simultaneous because they were racing, but I'm not sure if that's intentional.</div>
--=-mKlQu5t04a1vrM8PAeVm--





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 04 Mar 2015 17:39:01 +0000
Resent-Message-ID: <handler.12689.B12689.14254907277082 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Samer Masterson <samer@HIDDEN>
Cc: 12689 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.14254907277082
          (code B ref 12689); Wed, 04 Mar 2015 17:39:01 +0000
Received: (at 12689) by debbugs.gnu.org; 4 Mar 2015 17:38:47 +0000
Received: from localhost ([127.0.0.1]:35210 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YTDFu-0001q9-Gz
	for submit <at> debbugs.gnu.org; Wed, 04 Mar 2015 12:38:46 -0500
Received: from mtaout27.012.net.il ([80.179.55.183]:53692)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1YTDFr-0001pv-Ua
 for 12689 <at> debbugs.gnu.org; Wed, 04 Mar 2015 12:38:44 -0500
Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il
 (HyperSendmail v2007.08) id <0NKP00D007AGIB00@HIDDEN> for
 12689 <at> debbugs.gnu.org; Wed, 04 Mar 2015 19:33:10 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NKP00AMF7F6JL40@HIDDEN>; Wed, 04 Mar 2015 19:33:10 +0200 (IST)
Date: Wed, 04 Mar 2015 19:38:30 +0200
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <1425471247.1450.2@HIDDEN>
X-012-Sender: halo1@HIDDEN
Message-id: <83ioegpsrt.fsf@HIDDEN>
References: <1424775372.11596.6@HIDDEN> <83bnkaqdp9.fsf@HIDDEN>
 <1425471247.1450.2@HIDDEN>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Wed, 04 Mar 2015 04:14:07 -0800
> From: Samer Masterson <samer@HIDDEN>
> Cc: 12689 <at> debbugs.gnu.org
> 
> On Tue, Mar 3, 2015 at 7:54 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> 
>     Does this have any effect on the feature where Eshell can run several
>     commands simultaneously via a shell-like pipe? Thanks.
> 
> I don't know what feature you're describing.

eshell-execute-pipeline was what I had in mind.

It's been a while since I last hacked Eshell, so perhaps that was a
stupid question, but what prompted it was the fact that your change
would wait until a process exited under some conditions, so I wondered
whether it will prevent Eshell from firing up several asynchronous
processes connected through a pipe.

> Here is the output from running
> regular pipes:
> 
> ~ $ echo hello | /bin/echo there | /bin/echo hey | echo hi # Without patch
> hi
> hey
> ~ $ echo hello | /bin/echo there | /bin/echo hey | echo hi # With patch
> hi
> hey
> there
> hello

Not sure why you intersperse internal and external echo, or why did
you use echo to begin with.

In any case, what you see are bugs, at least in the case of a pipe
that cannot connect because the receiving end doesn't read stdin.

> First, we should ignore the fact that echo does nothing with stdin, and the
> above commands print "hi" in bash. I do not understand why the command without
> the patch only prints out "hey\nhi", but it printed that consistently on my
> computer. The second output is incorrect (or at the very least unexpected?),
> but less incorrect than the first. If this is what you were talking about, then
> the commands may have appeared to be simultaneous because they were racing, but
> I'm not sure if that's intentional.

I'd rather see that a pipe that does make sense, something like

  cat some-large-file | wc

with external commands works as expected, and both programs run
simultaneously in parallel (e.g., according to 'top' or a similar
tool), not sequentially.

Thanks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Samer Masterson <samer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 05 Mar 2015 10:35:01 +0000
Resent-Message-ID: <handler.12689.B12689.14255516593138 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 12689 <at> debbugs.gnu.org
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.14255516593138
          (code B ref 12689); Thu, 05 Mar 2015 10:35:01 +0000
Received: (at 12689) by debbugs.gnu.org; 5 Mar 2015 10:34:19 +0000
Received: from localhost ([127.0.0.1]:35655 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YTT6g-0000oW-DK
	for submit <at> debbugs.gnu.org; Thu, 05 Mar 2015 05:34:19 -0500
Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:35537
 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <samer@HIDDEN>) id 1YTT6e-0000oI-Fc
 for 12689 <at> debbugs.gnu.org; Thu, 05 Mar 2015 05:34:17 -0500
Received: from [10.1.10.16] (c-98-210-154-226.hsd1.ca.comcast.net
 [98.210.154.226])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by samertm.com (Postfix) with ESMTPSA id EABE742D22;
 Thu,  5 Mar 2015 10:33:54 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail;
 t=1425551635; bh=SSNoc9BY8bhBKcKP7Sf9k/5EOzqJ2GnZK7AcW2WnaZY=;
 h=Date:From:Subject:To:Cc:In-Reply-To:References:From;
 b=ljAXDlx/WHO+KWCesXuxsFQj2IzO9Cv1i2uBd7625PLuiC8PqvubHhfT6+NB8po7v
 dbzI36vexIM+Q7o4MeV5m5SZU2Wcm+KRaCnWRoEzEC7fi9KDOWpSjrglNuVTl0O4Nv
 plPveOOFzgPfRQXP6CpqIEuj3RNgoU3mmlyAIGNU=
Date: Thu, 05 Mar 2015 02:34:00 -0800
From: Samer Masterson <samer@HIDDEN>
Message-Id: <1425551640.2108.1@HIDDEN>
In-Reply-To: <83ioegpsrt.fsf@HIDDEN>
References: <1424775372.11596.6@HIDDEN> <83bnkaqdp9.fsf@HIDDEN>
 <1425471247.1450.2@HIDDEN> <83ioegpsrt.fsf@HIDDEN>
X-Mailer: geary/0.9.1
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=-wakbot8dxsMXbfS7cYam"
X-Spam-Score: 0.4 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.4 (/)

--=-wakbot8dxsMXbfS7cYam
Content-Type: text/plain; charset=utf-8; format=flowed


On Wed, Mar 4, 2015 at 9:38 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> eshell-execute-pipeline was what I had in mind.
> 
> It's been a while since I last hacked Eshell, so perhaps that was a
> stupid question, but what prompted it was the fact that your change
> would wait until a process exited under some conditions, so I wondered
> whether it will prevent Eshell from firing up several asynchronous
> processes connected through a pipe.

Oh, I see what you're saying. My confusion came from not knowing that 
piped programs executed in parallel in traditional shells.
> 
> Not sure why you intersperse internal and external echo, or why did
> you use echo to begin with.
I thought the external echos would race and output out-of-order, but 
they just cut off after the first external echo.
> I'd rather see that a pipe that does make sense, something like
> 
>   cat some-large-file | wc
> 
> with external commands works as expected, and both programs run
> simultaneously in parallel (e.g., according to 'top' or a similar
> tool), not sequentially.
The following command

~$ sleep 1 | sleep 1 | sleep 1

runs in 1 second without my patch and 3 with it (which doesn't conform 
with Bash). Also

~$ cat any-file | wc

never returns with my patch. Thanks for catching these errors, and I'll 
ping this bug report when my new patch is ready.
-s

--=-wakbot8dxsMXbfS7cYam
Content-Type: text/html; charset=utf-8

<br>On Wed, Mar 4, 2015 at 9:38 AM, Eli Zaretskii &lt;eliz@HIDDEN&gt; wrote:<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">eshell-execute-pipeline was what I had in mind.

It's been a while since I last hacked Eshell, so perhaps that was a
stupid question, but what prompted it was the fact that your change
would wait until a process exited under some conditions, so I wondered
whether it will prevent Eshell from firing up several asynchronous
processes connected through a pipe.</div></blockquote><div><br></div>Oh, I see what you're saying. My confusion came from not knowing that piped programs executed in parallel in traditional shells.<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">
Not sure why you intersperse internal and external echo, or why did
you use echo to begin with.</div></blockquote>I thought the external echos would race and output out-of-order, but they just cut off after the first external echo.<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">I'd rather see that a pipe that does make sense, something like

  cat some-large-file | wc

with external commands works as expected, and both programs run
simultaneously in parallel (e.g., according to 'top' or a similar
tool), not sequentially.</div></blockquote><div>The following command</div><br><div>~$ sleep 1 | sleep 1 | sleep 1</div><div><br></div><div>runs in 1 second without my patch and 3 with it (which doesn't conform with Bash). Also</div><div><br></div><div>~$&nbsp;cat any-file | wc</div><div><br></div><div>never returns with my patch. Thanks for catching these errors, and I'll ping this bug report when my new patch is ready.</div><div>-s</div>
--=-wakbot8dxsMXbfS7cYam--





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Samer Masterson <samer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 06 Apr 2015 03:42:02 +0000
Resent-Message-ID: <handler.12689.B12689.142829168918246 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: John Wiegley <johnw@HIDDEN>, 12689 <at> debbugs.gnu.org
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.142829168918246
          (code B ref 12689); Mon, 06 Apr 2015 03:42:02 +0000
Received: (at 12689) by debbugs.gnu.org; 6 Apr 2015 03:41:29 +0000
Received: from localhost ([127.0.0.1]:45740 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Yexui-0004kD-P5
	for submit <at> debbugs.gnu.org; Sun, 05 Apr 2015 23:41:29 -0400
Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:55333
 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <samer@HIDDEN>) id 1Yexug-0004jv-27
 for 12689 <at> debbugs.gnu.org; Sun, 05 Apr 2015 23:41:26 -0400
Received: from [10.20.0.210] (208-90-214-199.PUBLIC.monkeybrains.net
 [208.90.214.199])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by samertm.com (Postfix) with ESMTPSA id 49AB141B6B;
 Mon,  6 Apr 2015 03:40:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail;
 t=1428291635; bh=pGSHr6QrnON+Y/FCxPLN8d35gaKNbHaGxfCXFuhhEwk=;
 h=Date:From:Subject:To:Cc:In-Reply-To:References:From;
 b=ex5h1ij1E0DxcNvB6aVI0FzZ9MNXZ2zrZrqR8ve2hlJi1p6Lfuxw9/34H3vg3xklj
 5fAiHdB0T0Wlhd3iK4azeumO15zYsHZ9Ts+iirkyZtpIOVByV+Tagsmzn7NLNsCT3q
 jNVg8X/yUHpcEikPty2A2/xrxiWuM09HctzxUItE=
Date: Sun, 05 Apr 2015 20:41:04 -0700
From: Samer Masterson <samer@HIDDEN>
Message-Id: <1428291664.14271.0@HIDDEN>
In-Reply-To: <1425551640.2108.1@HIDDEN>
References: <1424775372.11596.6@HIDDEN> <83bnkaqdp9.fsf@HIDDEN>
 <1425471247.1450.2@HIDDEN> <83ioegpsrt.fsf@HIDDEN>
 <1425551640.2108.1@HIDDEN>
X-Mailer: geary/0.9.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
X-Spam-Score: 0.4 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.4 (/)

Hi,

I haven't finished, but I'm putting this work on hold for now as I've 
spent ages on it, and I'll return to this when I've learned more about 
eshell's architecture. The state of my work is below.

The patch below addresses the points you brought up, but it is 
incomplete for two reasons:
 - my code uses eshell-wait-for-process, which doesn't seem to be the 
correct wait to actually wait for a process to end because it locks up 
Emacs (because the core of eshell-wait-for-process is a while loop).
 - "prompt$ ${ext_command_one} | ext_command_two" will not reset the 
eshell prompt to normal if ext_command_one takes longer than 
ext_command_two. It works normally when ext_command_two takes longer 
than ext_command_one.

So I need to figure out a couple things in order to unblock myself:
 - how eshell knows to wait for other external processes (excluding 
eshell-wait-for-process), and whether that can be used at command-level 
granularity. E.g. for "cmd ${ext_cmd0} | ext_cmd1", the entire process 
needs to wait for both sides of the pipe to finish, and "cmd" needs to 
wait for "ext_cmd0" to finish before executing). "cmd ${ext_cmd0}" also 
shouldn't lock Emacs.
 - where the entry point is for the command prompt, and how the command 
prompt is reset after a set of commands finishes.

I've cc'd johnw because he might know the answer to the above 
questions, and what the correct approach to fixing this should be. I'll 
return to this when I've learned more about how eshell works.

-samer

work-in-progress patch:

--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -851,8 +851,9 @@ This is used on systems where `start-process' is 
not supported."
 (defmacro eshell-as-subcommand (command)
   "Execute COMMAND using a temp buffer.
 This is used so that certain Lisp commands, such as `cd', when
-executed in a subshell, do not disturb the environment of the main
-Eshell buffer."
+executed in a subshell, do not disturb the environment of the
+main Eshell buffer.  If COMMAND is an external command, it is
+called synchronously."
   `(let ,eshell-subcommand-bindings
      ,command))

@@ -1234,14 +1235,21 @@ COMMAND may result in an alias being executed, 
or a plain command."
 (defun eshell-plain-command (command args)
   "Insert output from a plain COMMAND, using ARGS.
 COMMAND may result in either a Lisp function being executed by name,
-or an external command."
+or an external command.
+
+If COMMAND is in an external command and `eshell-in-subcommand-p'
+is true, `eshell-plain-command' is synchronous and waits for
+COMMAND to finish."
   (let* ((esym (eshell-find-alias-function command))
 	 (sym (or esym (intern-soft command))))
     (if (and sym (fboundp sym)
 	     (or esym eshell-prefer-lisp-functions
 		 (not (eshell-search-path command))))
 	(eshell-lisp-command sym args)
-      (eshell-external-command command args))))
+      (let ((ext (eshell-external-command command args)))
+        (if eshell-in-subcommand-p
+            (eshell-wait-for-process ext)
+          ext)))))







Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: John Wiegley <johnw@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 06 Apr 2015 04:20:01 +0000
Resent-Message-ID: <handler.12689.B12689.142829399321846 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Samer Masterson <samer@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 12689 <at> debbugs.gnu.org
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.142829399321846
          (code B ref 12689); Mon, 06 Apr 2015 04:20:01 +0000
Received: (at 12689) by debbugs.gnu.org; 6 Apr 2015 04:19:53 +0000
Received: from localhost ([127.0.0.1]:45757 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YeyVt-0005gH-5M
	for submit <at> debbugs.gnu.org; Mon, 06 Apr 2015 00:19:53 -0400
Received: from mail-ig0-f178.google.com ([209.85.213.178]:33544)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <jwiegley@HIDDEN>) id 1YeyVr-0005g0-GP
 for 12689 <at> debbugs.gnu.org; Mon, 06 Apr 2015 00:19:51 -0400
Received: by ignm3 with SMTP id m3so13359699ign.0
 for <12689 <at> debbugs.gnu.org>; Sun, 05 Apr 2015 21:19:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:from:to:cc:subject:in-reply-to:date:message-id:references
 :user-agent:mime-version:content-type;
 bh=LEp3o4w6fQ+xfKYuh/QTt7Rt/S/RgbHF7z2wTkKNHcU=;
 b=vumk4NokyoIwQrhvgDxrO1AblBsDigle7zZRUDYa/rZEOpbdDadZ///d6imy8IV2az
 0ulzKsh5Rr5pnIex/a2Ht0Dqpc6vE7tsx2rbgyQK17A4XyP5yeU/8JL++t4xHuL/Eccr
 VQBnITtFYeyeu+MoOZBX0m9tBlH/g/os+zRR/KiCan2dPoI8CX38Efow387m+saT05hI
 u0GqY9/lG6JjTuPNS0ZBIOoraUq7trcaAqAMXQyZkm1CZ5SNFz0GhaC8od3EcY4bhmtb
 fgfeltOiI3FETdQpUBpRW91BQW6wIw+Gih6MaSwKA9FMHkptpi1hdRmn+Y/euh+uRVur
 aD7Q==
X-Received: by 10.50.111.233 with SMTP id il9mr20213200igb.13.1428293985875;
 Sun, 05 Apr 2015 21:19:45 -0700 (PDT)
Received: from Vulcan.local (c-98-214-120-98.hsd1.il.comcast.net.
 [98.214.120.98])
 by mx.google.com with ESMTPSA id y9sm2206157igl.6.2015.04.05.21.19.44
 (version=TLSv1 cipher=RC4-SHA bits=128/128);
 Sun, 05 Apr 2015 21:19:44 -0700 (PDT)
Received: by Vulcan.local (Postfix, from userid 501)
 id DC9F98783A94; Sun,  5 Apr 2015 23:19:43 -0500 (CDT)
From: John Wiegley <johnw@HIDDEN>
In-Reply-To: <1428291664.14271.0@HIDDEN> (Samer Masterson's message
 of "Sun, 05 Apr 2015 20:41:04 -0700")
Date: Sun, 05 Apr 2015 23:19:42 -0500
Message-ID: <m2twwtvqg1.fsf@HIDDEN>
References: <1424775372.11596.6@HIDDEN> <83bnkaqdp9.fsf@HIDDEN>
 <1425471247.1450.2@HIDDEN> <83ioegpsrt.fsf@HIDDEN>
 <1425551640.2108.1@HIDDEN>
 <1428291664.14271.0@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

>>>>> Samer Masterson <samer@HIDDEN> writes:

> So I need to figure out a couple things in order to unblock myself: - how
> eshell knows to wait for other external processes (excluding
> eshell-wait-for-process), and whether that can be used at command-level
> granularity. E.g. for "cmd ${ext_cmd0} | ext_cmd1", the entire process needs
> to wait for both sides of the pipe to finish, and "cmd" needs to wait for
> "ext_cmd0" to finish before executing). "cmd ${ext_cmd0}" also shouldn't
> lock Emacs. - where the entry point is for the command prompt, and how the
> command prompt is reset after a set of commands finishes.

> I've cc'd johnw because he might know the answer to the above questions, and
> what the correct approach to fixing this should be. I'll return to this when
> I've learned more about how eshell works.

I don't really know the answer anymore (Eshell is 16 years old now!), but I'm
wondering what the rationale is for making this change?  Anything that messes
with the way sub-processes are handled should be treated with extreme care.

John




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Samer Masterson <samer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 06 Apr 2015 04:55:02 +0000
Resent-Message-ID: <handler.12689.B12689.142829609424991 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: John Wiegley <johnw@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 12689 <at> debbugs.gnu.org
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.142829609424991
          (code B ref 12689); Mon, 06 Apr 2015 04:55:02 +0000
Received: (at 12689) by debbugs.gnu.org; 6 Apr 2015 04:54:54 +0000
Received: from localhost ([127.0.0.1]:45762 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Yez3m-0006V0-C1
	for submit <at> debbugs.gnu.org; Mon, 06 Apr 2015 00:54:54 -0400
Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:55402
 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <samer@HIDDEN>) id 1Yez3k-0006Un-40
 for 12689 <at> debbugs.gnu.org; Mon, 06 Apr 2015 00:54:52 -0400
Received: from [10.20.0.210] (208-90-214-199.PUBLIC.monkeybrains.net
 [208.90.214.199])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by samertm.com (Postfix) with ESMTPSA id BA8F341B6B;
 Mon,  6 Apr 2015 04:53:59 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail;
 t=1428296041; bh=KzPGVjNjYXZoBrQNifXCfqcoxHjuWOpSIZg/MNbLQiM=;
 h=Date:From:Subject:To:Cc:In-Reply-To:References:From;
 b=vqWd34wT4ZmSIbQ3YAfEV1cb8aUmVSjIap32TdZkxk4+etoWfpK34ozwCy37tFVB4
 F+7hOSM3Rpi0p2fl2g4ueZ/lxzyTSa+zKycir9gST1I/TEIsUZXCTcPgaVGllZKljD
 qDkpIR19C0guewKYKr1qIqLEk3ktR3wvs5Ghc8TE=
Date: Sun, 05 Apr 2015 21:54:35 -0700
From: Samer Masterson <samer@HIDDEN>
Message-Id: <1428296075.15170.2@HIDDEN>
In-Reply-To: <m2twwtvqg1.fsf@HIDDEN>
References: <1424775372.11596.6@HIDDEN> <83bnkaqdp9.fsf@HIDDEN>
 <1425471247.1450.2@HIDDEN> <83ioegpsrt.fsf@HIDDEN>
 <1425551640.2108.1@HIDDEN> <1428291664.14271.0@HIDDEN>
 <Samer Masterson's message	of "Sun, 05 Apr 2015 20:41:04 -0700">
X-Mailer: geary/0.9.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-Spam-Score: 0.4 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.4 (/)

On Sun, Apr 5, 2015 at 9:19 PM, John Wiegley <johnw@HIDDEN> wrote
> I'm wondering what the rationale is for making this change?

The issue is that subprocesses that call external commands don't
wait for the command to complete before returning. For instance,
the following command:

  $ echo ${/bin/echo "hi"}

returns nothing w/o the patch applied, where:

  $ echo ${echo "hi"}

returns "hi".

-samer





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 09 Feb 2022 09:14:02 +0000
Resent-Message-ID: <handler.12689.B12689.164439799121044 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Aidan Gauland <aidalgol@HIDDEN>
Cc: 12689 <at> debbugs.gnu.org
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.164439799121044
          (code B ref 12689); Wed, 09 Feb 2022 09:14:02 +0000
Received: (at 12689) by debbugs.gnu.org; 9 Feb 2022 09:13:11 +0000
Received: from localhost ([127.0.0.1]:49772 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nHj2E-0005TM-MH
	for submit <at> debbugs.gnu.org; Wed, 09 Feb 2022 04:13:10 -0500
Received: from quimby.gnus.org ([95.216.78.240]:33480)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nHj2C-0005T0-Cv
 for 12689 <at> debbugs.gnu.org; Wed, 09 Feb 2022 04:13:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=jNHCBTi0X+oa6NoJGvyBZaZlhtbvXYEJUhMizdCMrpU=; b=iTvHZ5Cz5yE3BBGljy5ohU0Veb
 /MNZyIoRVRKx1Y8jmfvLWVaKx4QPpn9NN+V5vGMEwFkdKxHPu6Nbcsdwa8eB/YrLW4yhJMfq+9bBA
 nEwMmHWxRNDcXH4jFe1SEQK04S8D9gXJz6LIi+qebFEMsfjvZljYJ0cntvlNHAalzyAc=;
Received: from [84.212.220.105] (helo=giant)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1nHj20-000091-8S; Wed, 09 Feb 2022 10:13:00 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <87wqyl1sa6.fsf@HIDDEN>
X-Now-Playing: NLF3's _Twenty Years of Prohibited Records: Curiosities_:
 "Coelum Terra Aer Aqua"
Date: Wed, 09 Feb 2022 10:12:53 +0100
In-Reply-To: <87wqyl1sa6.fsf@HIDDEN> (Aidan Gauland's message of
 "Sat, 20 Oct 2012 21:06:41 +1300")
Message-ID: <87czjwo12i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Aidan Gauland <aidalgol@HIDDEN> writes: > In
 Eshell, 
 ${cmd} expands to nil. > e.g. > $ echo ${/bin/echo -e "foo\nbar"} > $ > Note
 the absence of any output from `echo'. > > $ echo ${/bin/echo -e
 "foo\nbar"}-foo > nil-foo > n$ 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Aidan Gauland <aidalgol@HIDDEN> writes:

> In Eshell, ${cmd} expands to nil.
> e.g.
> $ echo ${/bin/echo -e "foo\nbar"}
> $ 
> Note the absence of any output from `echo'.
>
> $ echo ${/bin/echo -e "foo\nbar"}-foo
> nil-foo
> n$ 

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Looks like this has been fixed in the decade since it was reported:

/ $ echo ${/bin/echo -e "foo\nbar"}
("foo" "bar")
/ $ echo ${/bin/echo -e "foo\nbar"}-foo
("foo" "bar")-foo

So I'm therefore closing this bug report.  If there's more to be done
here, please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 9 Feb 2022 09:13:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 09 04:13:14 2022
Received: from localhost ([127.0.0.1]:49775 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nHj2H-0005Tb-TG
	for submit <at> debbugs.gnu.org; Wed, 09 Feb 2022 04:13:14 -0500
Received: from quimby.gnus.org ([95.216.78.240]:33494)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nHj2H-0005T9-7T
 for control <at> debbugs.gnu.org; Wed, 09 Feb 2022 04:13:13 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=VYwpQhI0M2Te3wwyk3N2GcM2i22OCLZCn4zlA5tDFx8=; b=b/MazLOMBQGxKK72Ak0cQS+YyV
 o5XbFTCDhIb+fU9t6+6WoZAqfheesdSDjs9yJu8YGH9ybxuwf1HKjMJp3yapjRmKCzp6Bfwwh/3Hd
 0UIp4qr/70lMfOmhzmIXUbfOxlVGbplTCQZn9Zh2sh6MeDQC6km+69t6ZEQOi4hz+Sd4=;
Received: from [84.212.220.105] (helo=giant)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1nHj29-00009G-1a
 for control <at> debbugs.gnu.org; Wed, 09 Feb 2022 10:13:07 +0100
Date: Wed, 09 Feb 2022 10:13:04 +0100
Message-Id: <87bkzgo127.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #12689
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  close 12689 quit 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

close 12689 
quit





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Jim Porter <jporterbugs@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 09 Feb 2022 19:02:02 +0000
Resent-Message-ID: <handler.12689.B12689.164443327518077 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Lars Ingebrigtsen <larsi@HIDDEN>, Aidan Gauland <aidalgol@HIDDEN>
Cc: 12689 <at> debbugs.gnu.org
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.164443327518077
          (code B ref 12689); Wed, 09 Feb 2022 19:02:02 +0000
Received: (at 12689) by debbugs.gnu.org; 9 Feb 2022 19:01:15 +0000
Received: from localhost ([127.0.0.1]:52631 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nHsDK-0004hV-Vy
	for submit <at> debbugs.gnu.org; Wed, 09 Feb 2022 14:01:15 -0500
Received: from mail-pf1-f173.google.com ([209.85.210.173]:36799)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jporterbugs@HIDDEN>) id 1nHsDJ-0004hE-4t
 for 12689 <at> debbugs.gnu.org; Wed, 09 Feb 2022 14:01:13 -0500
Received: by mail-pf1-f173.google.com with SMTP id u16so206036pfg.3
 for <12689 <at> debbugs.gnu.org>; Wed, 09 Feb 2022 11:01:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=subject:to:cc:references:from:message-id:date:mime-version
 :in-reply-to:content-language:content-transfer-encoding;
 bh=T9G+f4N8kXJEJL7lQLsw5GZoCKQQToYFYPN9yt4fKEc=;
 b=Vxg/w4b6b97KmuoylHuwohgNlTUzbJT98xuOZx+4ssSGrGUYilD9jVaAv1Hz+ajBJx
 tsrQ6oohW5lmE5G9txDJ5YSz9mJfaftvSSrzaqjaw/+HyoTdiY0uf8dU9jDTqLbJi9aL
 IRjhy6DteebBd0MR1F531XXktGUgkuiX1S6mMbFFrhfjMHVU3inpTUjLnuNhDmTid86S
 C9yHw/VhqYIh2cEZc42046rxKhTy9/gGeLQN2KpeZZcp0Ns6wJKQSBU2rB/kK1zsJ7PG
 88uDWjWu5IBSabIuiCAoL16D6Nw43uSXaGcEGa3TNpcHrgiQPJoTxdMg1y/Btf/xw0W0
 VKCQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:subject:to:cc:references:from:message-id:date
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=T9G+f4N8kXJEJL7lQLsw5GZoCKQQToYFYPN9yt4fKEc=;
 b=thF5qGzLwF5WyVk61nYLW5LOfe6nKPKNarYPTXwVExeQjikjZ/dS55jzMaIOaoUPxo
 SCHO5R0PLUcWTubzbibSFOb4H4Hx4FYDzWrUZgCVdYzDkeIWjyu287+Aqs6TiUA6Ep55
 +EY7pV4zV3/5cY42FFjAhhtNb6fZpWXwmca39LY+rq8QoNYHuJ1rMR3YJJ1mfw6LxtHZ
 iLXPz2BGjV72W/U1oGJ61GMofVUB+Dej6+eonMdOQWps+Tcn4vZ7F41gWenMXlmz+ypw
 bb+TtQLBdheQ5ANHl46npTITQ6jMKqpuohZsl1+PAoG9L92Nr6sOVGWuggDQW8qj92aF
 Yh8Q==
X-Gm-Message-State: AOAM532MYUtV/K/K3tXwIquXJQJGZaGp0Y9b5VuN2L2tQODRYBhXr2pn
 +ULZb8qoXNVTp+ftiW14r+4XBzZ60NwHuw==
X-Google-Smtp-Source: ABdhPJzs5zRNYJGuRdP7CaD63tWWiqkjLrIc/tNNbZaaNqMZNyp5m9LumGLkcw1oemDrIRIshjGsdg==
X-Received: by 2002:a63:6c01:: with SMTP id h1mr3050775pgc.118.1644433266943; 
 Wed, 09 Feb 2022 11:01:06 -0800 (PST)
Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com.
 [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id
 k12sm21449597pfc.107.2022.02.09.11.01.05
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 09 Feb 2022 11:01:06 -0800 (PST)
References: <87wqyl1sa6.fsf@HIDDEN> <87czjwo12i.fsf@HIDDEN>
From: Jim Porter <jporterbugs@HIDDEN>
Message-ID: <25243bc1-06d5-59d5-14f9-d13aad818227@HIDDEN>
Date: Wed, 9 Feb 2022 11:01:05 -0800
MIME-Version: 1.0
In-Reply-To: <87czjwo12i.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2/9/2022 1:12 AM, Lars Ingebrigtsen wrote:
> Aidan Gauland <aidalgol@HIDDEN> writes:
> 
>> In Eshell, ${cmd} expands to nil.
>> e.g.
>> $ echo ${/bin/echo -e "foo\nbar"}
>> $
>> Note the absence of any output from `echo'.
>>
>> $ echo ${/bin/echo -e "foo\nbar"}-foo
>> nil-foo
>> n$
> 
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
> 
> Looks like this has been fixed in the decade since it was reported:
> 
> / $ echo ${/bin/echo -e "foo\nbar"}
> ("foo" "bar")
> / $ echo ${/bin/echo -e "foo\nbar"}-foo
> ("foo" "bar")-foo
> 
> So I'm therefore closing this bug report.  If there's more to be done
> here, please respond to the debbugs address and we'll reopen.

I think the fix is from bug#30725. I'd meant to post an update to this 
bug as well, but I haven't had a chance to investigate the other half of 
this bug yet. Specifically, I think there's at least an argument that 
the result *should* look like this:

   / $ echo ${/bin/echo -e "foo\nbar"}
   foo
   bar
   / $ echo ${/bin/echo -e "foo\nbar"}-foo
   foo
   bar-foo

I'm still not 100% sure what's going on here, but I think the ${} 
subcommand evaluation splits the output on "\n" to make a list (which 
seems reasonable to me). However, when it gets converted back to a 
string (either to print directly, as in the first case, or to 
concatenate, as in the second case), it ends up looking like '("foo" 
"bar")'. You can see a little more clearly how these cases are different 
by calling `message' instead of `echo':

   ~ $ message %S ${*echo -e "foo\nbar"}
   ("foo" "bar")
   ~ $ message %S ${*echo -e "foo\nbar"}-foo
   "(\"foo\" \"bar\")-foo"

So the result of "${...}" is a list, and the result of "${...}-foo" is a 
string.

I think it would make sense to do something to improve how "foo\nbar" 
gets round-tripped here so that the result is more consistent with 
regular shells. I have a couple of ideas, but I'll need a bit of time to 
tinker with things to see how they work, and to find a solution that 
keeps incompatible changes to a minimum.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 09 Feb 2022 20:13:02 +0000
Resent-Message-ID: <handler.12689.B12689.164443756826399 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12689
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Jim Porter <jporterbugs@HIDDEN>
Cc: 12689 <at> debbugs.gnu.org, Aidan Gauland <aidalgol@HIDDEN>
Received: via spool by 12689-submit <at> debbugs.gnu.org id=B12689.164443756826399
          (code B ref 12689); Wed, 09 Feb 2022 20:13:02 +0000
Received: (at 12689) by debbugs.gnu.org; 9 Feb 2022 20:12:48 +0000
Received: from localhost ([127.0.0.1]:52829 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nHtKZ-0006rj-Nh
	for submit <at> debbugs.gnu.org; Wed, 09 Feb 2022 15:12:48 -0500
Received: from quimby.gnus.org ([95.216.78.240]:39476)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nHtKX-0006rM-Ex
 for 12689 <at> debbugs.gnu.org; Wed, 09 Feb 2022 15:12:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=VKnhLaMHJ/LX2oXMPyE7hwOky1dZgZDV9Ucy2jn8wNI=; b=YzGpdJb75H6KuJF1wR/N1dHH8U
 iqp8jtwKsKUxeTD5gVoES+XxP8Zz2uQn+My8pOZPVARY1jsARsxiTz97D3g6VjGzt2Ks8IPWN9r4X
 povKM1hNLkAqnowN8fCY18rWM+MWsFzykBVmiTifDaXafx8PFltwprvzgMeVCrfG1sh0=;
Received: from [84.212.220.105] (helo=giant)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1nHtKL-0006fI-TS; Wed, 09 Feb 2022 21:12:37 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <87wqyl1sa6.fsf@HIDDEN> <87czjwo12i.fsf@HIDDEN>
 <25243bc1-06d5-59d5-14f9-d13aad818227@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEVPKhRiUDWKbks0
 FgUjGhDZuXDUtm3///+pBA8CAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+YCCRQMDLUtRl4AAAF7SURB
 VDjLjZPBioMwEIYnjdtzItKzltZzwH2AKLN7LgU911J9/0fYmUkEbSPsIKj/5/yTcRIAyM+pgKaB
 dDSNblIB8QaOLq01uDfglDAKvQFKpARwmhXtQOut1W5x18Si+g2wP/k4B/AGDC/JKAcKtgD4yfGK
 9f+KJ8H3Hug2vzsrENtSwFe/jqJC/L0J+Fnr8ytHPD0S4NYRGD/BcG8RrwnQz8UO6F974L4HhhSY
 pJPEqobr0PcXPATQ1v39GMDYTQyOoUGv6kcn+tNkJ8koI7AXAVMJgFcCPF+2Alu09dQPkwHEenoh
 mPjbn1k3c1DTaOcLqgjqGdunDMNm6M+41GhpOj7ovFPMB7AGveUy2JXLaMmgIlkRwzWgaZIC1pIX
 g3axKunFk0xGGQNvaO9xH4tOCVnMYCCPohvF3yh7Ht0CVDAKFWw+ukYACICg02teCfBQ4KoApRwW
 kEUQdPRLhkUMJRZgKynuyYH8fTSSPuTIYfIU7B2cXeD+AMqs3g245F3CAAAAJXRFWHRkYXRlOmNy
 ZWF0ZQAyMDIyLTAyLTA5VDIwOjEyOjEyKzAwOjAw9CN9ugAAACV0RVh0ZGF0ZTptb2RpZnkAMjAy
 Mi0wMi0wOVQyMDoxMjoxMiswMDowMIV+xQYAAAAASUVORK5CYII=
X-Now-Playing: Karen Dalton's _In My Own Time_: "In A Station"
Date: Wed, 09 Feb 2022 21:12:31 +0100
In-Reply-To: <25243bc1-06d5-59d5-14f9-d13aad818227@HIDDEN> (Jim Porter's
 message of "Wed, 9 Feb 2022 11:01:05 -0800")
Message-ID: <871r0bhk9c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Jim Porter <jporterbugs@HIDDEN> writes: > I think it would
 make sense to do something to improve how "foo\nbar" > gets round-tripped
 here so that the result is more consistent with > regular shells. I have
 a couple of ideas, but I'll need a [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Jim Porter <jporterbugs@HIDDEN> writes:

> I think it would make sense to do something to improve how "foo\nbar"
> gets round-tripped here so that the result is more consistent with
> regular shells. I have a couple of ideas, but I'll need a bit of time
> to tinker with things to see how they work, and to find a solution
> that keeps incompatible changes to a minimum.

OK; I'm reopening this bug report, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message received at fakecontrol@fakecontrolmessage:


Received: (at fakecontrol) by fakecontrolmessage;
To: internal_control <at> debbugs.gnu.org
From: Debbugs Internal Request <help-debbugs@HIDDEN>
Subject: Internal Control
Message-Id: Did not alter fixed versions and reopened.
Date: Wed, 09 Feb 2022 20:13:03 +0000
User-Agent: Fakemail v42.6.9

# This is a fake control message.
#
# The action:
# Did not alter fixed versions and reopened.
thanks
# This fakemail brought to you by your local debbugs
# administrator



Last modified: Wed, 9 Feb 2022 20:15:01 UTC

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