Subject: 25.1; 'M-x eshell-source-file' fails

From: Chunyang Xu <[email-masked]>
Date: Sat, 11 Mar 2017 17:57:24 +0800

After I open Eshell, the eshell-source-file is available as an
interactive command and in (info "(eshell) Scripts") it says

  Scripts are invoked from Eshell with ‘source’, or from anywhere in Emacs
  with ‘eshell-source-file’.

so it looks like to me I can run

  M-x eshell-source-file RET /tmp/foo.esh RET

the content of the file (which should not matter)

  ~ $ cat /tmp/foo.esh
  pwd
  ~ $

it fails by showing the following in the echo area

  eshell-source-file: No catch for tag: eshell-replace-command, (let ((eshell-command-name (quote "/tmp/foo.esh")) (eshell-command-arguments (quote nil))) (eshell-trap-errors (eshell-named-command "pwd")))

the backtrace is

Debugger entered--Lisp error: (no-catch eshell-replace-command (let ((eshell-command-name (quote "/tmp/foo.esh")) (eshell-command-arguments (quote nil))) (eshell-trap-errors (eshell-named-command "pwd"))))
  throw(eshell-replace-command (let ((eshell-command-name (quote "/tmp/foo.esh")) (eshell-command-arguments (quote nil))) (eshell-trap-errors (eshell-named-command "pwd"))))
  eshell-source-file("/tmp/foo.esh")
  funcall-interactively(eshell-source-file "/tmp/foo.esh")
  call-interactively(eshell-source-file record nil)
  command-execute(eshell-source-file record)
  execute-extended-command(nil "eshell-source-file" nil)
  funcall-interactively(execute-extended-command nil "eshell-source-file" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

I don't really sure about the purpose of making eshell-source-file
interactive, maybe it is a bug?