From: Jim Porter Date: Tue, 19 Sep 2023 01:00:07 +0000 (-0700) Subject: ; Add debug instrumention for queueing commands in Eshell X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=acdb77c28947f0349e63fdb9759c90729b64956b;p=emacs.git ; Add debug instrumention for queueing commands in Eshell * lisp/eshell/esh-cmd.el (eshell-eval-command): Log the new command form. --- diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index af50a485226..b4d9b044a7b 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -990,15 +990,19 @@ process(es) in a cons cell like: (:eshell-background . PROCESS)" (if eshell-current-command - ;; We can just stick the new command at the end of the current - ;; one, and everything will happen as it should. - (setcdr (last (cdr eshell-current-command)) - (list `(let ((here (and (eobp) (point)))) - ,(and input - `(insert-and-inherit ,(concat input "\n"))) - (if here - (eshell-update-markers here)) - (eshell-do-eval ',command)))) + (progn + ;; We can just stick the new command at the end of the current + ;; one, and everything will happen as it should. + (setcdr (last (cdr eshell-current-command)) + (list `(let ((here (and (eobp) (point)))) + ,(and input + `(insert-and-inherit ,(concat input "\n"))) + (if here + (eshell-update-markers here)) + (eshell-do-eval ',command)))) + (eshell-debug-command 'form + "enqueued command form for %S\n\n%s" + (or input "") (eshell-stringify eshell-current-command))) (eshell-debug-command-start input) (setq eshell-current-command command) (let* (result