From 94d028164dc6e9e94a2761af86d6a38e2873296d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 27 Nov 2020 15:58:15 -0500 Subject: process buffer: Add time to header Recording the time makes it easier to digest and group the subprocess commands when inspecting the buffer later. Message-Id: <20201127205815.17313-1-kyle@kyleam.com> --- piem.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/piem.el b/piem.el index 9db9a0c..addc27e 100644 --- a/piem.el +++ b/piem.el @@ -195,7 +195,8 @@ Functions should accept one argument, the message ID given to (defvar piem-process-mode-font-lock-keywords `((,(rx line-start - ";;; " (or "process" "directory") ":" (one-or-more not-newline) + ";;; " (or "process" "directory" "time") + ":" (one-or-more not-newline) line-end) (0 font-lock-comment-face t)) (,(rx line-start @@ -231,10 +232,14 @@ Functions should accept one argument, the message ID given to (goto-char (point-max)) (display-buffer buffer) (let ((inhibit-read-only t)) - (insert (format "\n%s\n;;; process: %S\n;;; directory: %s\n" + (insert (format (concat "%s\n" + ";;; process: %S\n" + ";;; directory: %s\n" + ";;; time: %s\n") (char-to-string 12) ; form feed (cons program program-args) - default-directory)) + default-directory + (format-time-string "%FT%T%z"))) (funcall fn))))) (defun piem-process-start (dir program &rest program-args) -- cgit v1.2.3