Subject: Re: bug#12689: 24.2; Eshell ${cmd} substitution

From: Samer Masterson <[email-masked]>
Date: Tue, 24 Feb 2015 02:56:12 -0800

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.