From: Roderick Schertler <roderick@gate.net>
Cc: ding@ifi.uio.no
Subject: Re: Feature request: time dependent hiliting
Date: 01 Oct 1996 17:59:04 -0400 [thread overview]
Message-ID: <pzybhqibx3.fsf@eeyore.ibcinc.com> (raw)
In-Reply-To: <rv919q91md.fsf_-_@sdnp5.ucsd.edu>
On 01 Oct 1996 07:54:02 -0700, David Moore <dmoore@UCSD.EDU> said:
>
> I'd find it extremely useful if groups could be colored based on the
> amount of time since I last read them.
I got this from a helpful member of the list (Sorry! I didn't record
who you were.) Add
(add-hook 'gnus-select-group-hook
(lambda ()
(gnus-group-set-parameter group
'gnus-group-date-last-entered
(current-time))))
to your ~/.gnus then you can use
(gnus-group-get-parameter gnus-tmp-group
'gnus-group-date-last-entered)
inside a user format escape to retrieve the date and do something with
it. I use
(setq gnus-group-line-format
"%M%p%P %2ud %2ut %S %5y: %L %(%-40uc%) %18ue\n")
along with
(defun gnus-user-format-function-e (headers)
(let ((prev (gnus-group-get-parameter gnus-tmp-group
'gnus-group-date-last-entered)))
(if (not prev)
""
(let* ((diff (- (rjs-time-to-epoch (current-time))
(rjs-time-to-epoch prev)))
(days (/ diff (* 60 60 24)))
(diff (- diff (* days 60 60 24)))
(hours (/ diff (* 60 60)))
(diff (- diff (* hours 60 60)))
(minutes (/ diff 60))
(diff (- diff (* minutes 60)))
(seconds diff)
(diff nil))
(if (zerop days)
(format "%2d:%02d" hours minutes)
(substring "------------------------------"
0 (min 30 days)))))))
(which I'm sure is suboptimal, I don't know lisp very well). This
makes the *Group* buffer look something like
* 71 34 0: 2 mail.perl5-porters 1:31
* 4 0: 2 comp.lang.perl.misc 0:01
1 3 23: 2 mail.ding -
241: 2 mail.freebsd.questions 23:52
24: 2 mail.freebsd.ports -
3 7: 2 mail.ssh --
7: 2 mail.freebsd.security --
2: 2 mail.freebsd.chat --
1: 2 comp.windows.x.announce ---
37: 3 comp.mail.mh ------
57: 3 va.forsale ------
70: 3 comp.mail.mime -----------
525: 3 comp.dcom.sys.cisco ------------------
, the rightmost field is either the amount of time it's been since I
entered the group (if it's < 1 day) or a histogram of one dash per day
since I entered the group.
--
Roderick Schertler
roderick@gate.net
prev parent reply other threads:[~1996-10-01 21:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-01 14:54 David Moore
1996-10-01 21:00 ` [++] " Colin Rafferty
1996-10-01 23:33 ` Colin Rafferty
1996-10-02 0:33 ` [++] " Lars Magne Ingebrigtsen
1996-10-01 21:59 ` Roderick Schertler [this message]
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=pzybhqibx3.fsf@eeyore.ibcinc.com \
--to=roderick@gate.net \
--cc=ding@ifi.uio.no \
/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).