aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2020-11-27 15:58:15 -0500
committerKyle Meyer <kyle@kyleam.com>2020-11-28 11:51:57 -0500
commit94d028164dc6e9e94a2761af86d6a38e2873296d (patch)
treec64310fbb3a8e56fe86780d30536ebd05553d12c
parentc936086abd17576b708e5d654a24d78f9eaf9a4a (diff)
downloadpiem-94d028164dc6e9e94a2761af86d6a38e2873296d.tar.gz
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>
-rw-r--r--piem.el11
1 files 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)