]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add debug instrumention for queueing commands in Eshell
authorJim Porter <jporterbugs@gmail.com>
Tue, 19 Sep 2023 01:00:07 +0000 (18:00 -0700)
committerJim Porter <jporterbugs@gmail.com>
Tue, 19 Sep 2023 01:00:07 +0000 (18:00 -0700)
* lisp/eshell/esh-cmd.el (eshell-eval-command): Log the new command
form.

lisp/eshell/esh-cmd.el

index af50a485226e29aaa572455d020600e40cc00a28..b4d9b044a7b8115d92c37acc5b5708a829b75574 100644 (file)
@@ -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 "<no string>") (eshell-stringify eshell-current-command)))
     (eshell-debug-command-start input)
     (setq eshell-current-command command)
     (let* (result