From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Sivaram N <nsivaram.net@gmail.com>
Cc: ding@gnus.org
Subject: Re: any way to timestamp Messages?
Date: Mon, 18 Jun 2007 16:12:06 +0900 [thread overview]
Message-ID: <b4msl8pybw9.fsf@jpl.org> (raw)
In-Reply-To: <ur6obu3dx.fsf@gmail.com>
>>>>> In <ur6obu3dx.fsf@gmail.com> Sivaram N wrote:
> I have
> (setq gnus-verbose 10)
> (setq gnus-verbose-backends 10)
> in my .gnus.el file. Is there a way to get it timestamped as it
> writes all those messages to the *Messages* buffer? A configurable
> option would be nice.
> Maybe get (current-time-string) to be called before writing?
You want timestamps to be only in the *Messages* buffer, don't
you? There seems to be no way to add timestamps only to the
*Messages* buffer but the following workaround will work:
--8<---------------cut here---------------start------------->8---
(defadvice gnus-message (before add-timestamp (level &rest args) activate)
"Add a timestamp."
(setcar args (concat (propertize (concat (current-time-string) "> ")
'invisible t)
(car args))))
(defadvice nnheader-message (before add-timestamp (level &rest args) activate)
"Add a timestamp."
(setcar args (concat (propertize (concat (current-time-string) "> ")
'invisible t)
(car args))))
--8<---------------cut here---------------end--------------->8---
And here's a version similar to `nntp-record-command'.
--8<---------------cut here---------------start------------->8---
(defadvice gnus-message (before add-timestamp (level &rest args) activate)
"Add a timestamp."
(setcar args
(concat (propertize
(let ((time (current-time)))
(concat (format-time-string "%Y%m%dT%H%M%S" time)
"." (format "%03d" (/ (nth 2 time) 1000))
"> "))
'invisible t)
(car args))))
(defadvice nnheader-message (before add-timestamp (level &rest args) activate)
[...same as above...]
--8<---------------cut here---------------end--------------->8---
next prev parent reply other threads:[~2007-06-18 7:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-16 19:04 Sivaram N
2007-06-18 7:12 ` Katsumi Yamaoka [this message]
2007-06-18 16:40 ` Sivaram N
2007-06-19 12:06 ` Katsumi Yamaoka
2007-06-19 13:52 ` Sivaram N
2007-06-19 23:49 ` Katsumi Yamaoka
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4msl8pybw9.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=ding@gnus.org \
--cc=nsivaram.net@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).