discussion and development of piem
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: piem@inbox.kyleam.com
Subject: [PATCH] process buffer: Add time to header
Date: Fri, 27 Nov 2020 15:58:15 -0500
Message-ID: <20201127205815.17313-1-kyle@kyleam.com> (raw)

Recording the time makes it easier to digest and group the subprocess
commands when inspecting the buffer later.
---
 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 @@ (defcustom piem-after-mail-injection-functions nil
 
 (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 @@ (defun piem--process-go (dir program program-args fn)
       (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)

base-commit: c936086abd17576b708e5d654a24d78f9eaf9a4a
-- 
2.29.2


             reply	other threads:[~2020-11-27 20:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27 20:58 Kyle Meyer [this message]
2020-12-09  0:32 ` [PATCH] process buffer: Restore header's leading newline Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://git.kyleam.com/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201127205815.17313-1-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=piem@inbox.kyleam.com \
    --subject='Re: [PATCH] process buffer: Add time to header' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

discussion and development of piem

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.kyleam.com/piem/0 piem/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 piem piem/ https://inbox.kyleam.com/piem \
		piem@inbox.kyleam.com
	public-inbox-index piem

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.piem


code repositories for project(s) associated with this inbox:

	https://git.kyleam.com/piem/

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git