Gnus development mailing list
 help / color / mirror / Atom feed
From: Colin Rafferty <craffert@spspme.ml.com>
Subject: [++] Re: Feature request: time dependent hiliting
Date: 01 Oct 1996 17:00:52 -0400	[thread overview]
Message-ID: <ocr4tke8kmz.fsf@spssunp.spspme.ml.com> (raw)
In-Reply-To: David Moore's message of 01 Oct 1996 07:54:02 -0700

David Moore writes:

> 	I'd find it extremely useful if groups could be colored based on
> the amount of time since I last read them.

> It'd also be good to know just how long it's been since I haven't read
> someone's mail.

There was a discussion a long time ago about this.  The basic solution
is to save the current time in a group parameter, and access it in a
user-format-function for display.

Below is the code that I use.  When I select a group, I save a formatted
string of the current time as a group parameter.  I then use %ud in the
group-line-format to call a function that gets that parameter out.

If you follow this basic strategy, it should be cool.

.emacs:

(add-hook 'gnus-select-group-hook 'gnus-select-group-hook-update-current-time)

(defun gnus-select-group-hook-update-current-time ()
  "For consideration as a `gnus-select-group-hook'."
  (let ((now (current-time-string)))
    (gnus-group-set-parameter group
			      'gnus-group-date-last-entered
			      (concat (substring now 8 11)
				      (substring now 4 8)
				      (substring now 11 16)))))


(setq gnus-group-line-format "%M%S%p%5y: %(%-35g%) %ud\n")

(defun gnus-user-format-function-d (headers)
  "Return the date the group was last read."
  (cond ((gnus-group-get-parameter gnus-tmp-group
				   'gnus-group-date-last-entered))
	(t "")))

-- 
This posting adheres to the SELF-DISCIPLINE guidelines for better
USENET discussions. See http://www.eiffel.com/discipline.


  reply	other threads:[~1996-10-01 21:00 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 [this message]
1996-10-01 23:33   ` Colin Rafferty
1996-10-02  0:33   ` [++] " Lars Magne Ingebrigtsen
1996-10-01 21:59 ` Roderick Schertler

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=ocr4tke8kmz.fsf@spssunp.spspme.ml.com \
    --to=craffert@spspme.ml.com \
    --cc=craffert@ml.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).