Gnus development mailing list
 help / color / mirror / Atom feed
* date group last read
@ 1996-02-09 17:30 Roderick Schertler
  1996-02-09 21:44 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Roderick Schertler @ 1996-02-09 17:30 UTC (permalink / raw)


Here's a Red feature request:  I'd like to be able to display on each
group's *Group* line the date that I last entered that group.  (Is this
information already tracked?)

-- 
Roderick Schertler
roderick@gate.net


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: date group last read
  1996-02-09 17:30 date group last read Roderick Schertler
@ 1996-02-09 21:44 ` Lars Magne Ingebrigtsen
  1996-02-11 18:07   ` Brian Edmonds
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-02-09 21:44 UTC (permalink / raw)


Roderick Schertler <roderick@gate.net> writes:

> Here's a Red feature request:  I'd like to be able to display on each
> group's *Group* line the date that I last entered that group.  (Is this
> information already tracked?)

No, it isn't.  I think that seems like too much work for too little
gain.

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: date group last read
  1996-02-09 21:44 ` Lars Magne Ingebrigtsen
@ 1996-02-11 18:07   ` Brian Edmonds
  1996-02-12  6:36     ` Jason L Tibbitts III
  0 siblings, 1 reply; 8+ messages in thread
From: Brian Edmonds @ 1996-02-11 18:07 UTC (permalink / raw)
  Cc: ding

-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:

> Here's a Red feature request: I'd like to be able to display on each
> group's *Group* line the date that I last entered that group.

Lars> I think that seems like too much work for too little gain.

I agree.  If you really want this, you could approximate it by grabbing
the creation time of the lowest numbered unread article in the group.
Assuming nnml, of course.  I suppose a more general approach would be to
grab the Date: header of said article.  Not perfect, and sometimes it
might be very wrong, but in general it would be a reasonable
approximation.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBMR4wXJM3vmyXnQsJAQFnOwQAlYW7tYkHASXAy2s0cOixPLv/IEKWKQtL
gP2kq2go4sOS5TGHsw1MpfOnckJMcVK7ThB2WFy84EbSWiZXb2wHgDCqGpLVS9yF
wRDGJEDYM7UYdg6CT5NkZnWr3KafYPPSiHNxX4frQhECTyZR4phsUk9NMEbrAaOg
32xCoBgzNVI=
=8ZAo
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: date group last read
  1996-02-11 18:07   ` Brian Edmonds
@ 1996-02-12  6:36     ` Jason L Tibbitts III
  1996-02-12 18:22       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Jason L Tibbitts III @ 1996-02-12  6:36 UTC (permalink / raw)


>>>>> "BE" == Brian Edmonds <edmonds@cs.ubc.ca> writes:
>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:

[Attributions lost; original message was about keeping track of the date
the group was last read]

Lars> I think that seems like too much work for too little gain.

BE> I agree.  If you really want this, you could approximate it by grabbing
BE> the creation time of the lowest numbered unread article in the group.
[...]

Couldn't this be done using something like (warning; really untested and
probably nasty-looking lisp):

(add-hook gnus-select-group-hook
  (lambda ()
    (gnus-group-add-parameter group  
       (cons 'date-last-entered (list (current-time-string))))))

Of course, actually doing something with this data is up to you.

 - J<


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: date group last read
  1996-02-12  6:36     ` Jason L Tibbitts III
@ 1996-02-12 18:22       ` Lars Magne Ingebrigtsen
  1996-02-12 23:15         ` Jason L Tibbitts III
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-02-12 18:22 UTC (permalink / raw)


Jason L Tibbitts III <tibbs@hpc.uh.edu> writes:

> Couldn't this be done using something like (warning; really untested and
> probably nasty-looking lisp):
> 
> (add-hook gnus-select-group-hook
>   (lambda ()
>     (gnus-group-add-parameter group  
>        (cons 'date-last-entered (list (current-time-string))))))

Yup.  I've now added this to the Red Gnus todo list.

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: date group last read
  1996-02-12 18:22       ` Lars Magne Ingebrigtsen
@ 1996-02-12 23:15         ` Jason L Tibbitts III
  1996-02-13 19:58           ` Jason L Tibbitts III
  0 siblings, 1 reply; 8+ messages in thread
From: Jason L Tibbitts III @ 1996-02-12 23:15 UTC (permalink / raw)
  Cc: roderick

>>>>> "LMI" == Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:

LMI> Yup.  I've now added this to the Red Gnus todo list.

It's pretty easy to do externally (no gnus changes required).  This has
been tested lightly.  (I'm using it at the moment.)  Comments on my lisp
are encouraged; I'm actually trying to learn it properly now.  Add the
following to .gnus, and add "%ud" somewhere in gnus-group-line-format.

(add-hook 'gnus-select-group-hook
  (lambda ()
    (gnus-group-add-parameter group
       (cons 'gnus-group-date-last-entered (list (current-time-string))))))

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

 - J<


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: date group last read
  1996-02-12 23:15         ` Jason L Tibbitts III
@ 1996-02-13 19:58           ` Jason L Tibbitts III
  1996-02-13 22:02             ` Colin Rafferty
  0 siblings, 1 reply; 8+ messages in thread
From: Jason L Tibbitts III @ 1996-02-13 19:58 UTC (permalink / raw)


>>>>> "JLT" == Jason L Tibbitts <tibbs@hpc.uh.edu> writes:

JLT> It's pretty easy to do externally (no gnus changes required).  This
JLT> has been tested lightly.

And, it seems, not enough.  gnus-group-add-parameter will blindly add a
parameter even if it already exists, causing a pile of the same parameter
to add up.  This could be considered a bug.  Currently *-add-parameter just
conses the new parameter to the existing list; it should probably check for
its existence first.  My lisp isn't good enough to patch it myself.

 - J<


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: date group last read
  1996-02-13 19:58           ` Jason L Tibbitts III
@ 1996-02-13 22:02             ` Colin Rafferty
  0 siblings, 0 replies; 8+ messages in thread
From: Colin Rafferty @ 1996-02-13 22:02 UTC (permalink / raw)
  Cc: Jason L Tibbitts III

Jason L Tibbitts writes:
>>>>>> "JLT" == Jason L Tibbitts <tibbs@hpc.uh.edu> writes:

JLT> It's pretty easy to do externally (no gnus changes required).  This
JLT> has been tested lightly.

> And, it seems, not enough.  gnus-group-add-parameter will blindly add a
> parameter even if it already exists, causing a pile of the same parameter
> to add up.  This could be considered a bug.  Currently *-add-parameter just
> conses the new parameter to the existing list; it should probably check for
> its existence first.  My lisp isn't good enough to patch it myself.

I have written a new function, gnus-group-set-parameter that will
replace an already existing parameter.  I have also altered Jason's lisp
so that it saves the date in a cons cell rather than a list.  Anyway, I
think that my function might be useful in Gnus itself, while Jason's
should probably be in my .gnus.

By the way, this will get rid of all the duplicate entries in the
parameter list that have crept in.

; New function:

(defun gnus-group-set-parameter (group name value)
  "Set parameter NAME to VALUE in GROUP."
  (let ((info (gnus-get-info group)))
    (if (not info)
	() ; This is a dead group.  We just ignore it.
      (let ((old-params (gnus-info-params info))
	    (new-params (list (cons name value))))
	(while old-params
	  (if (or (not (listp (car old-params)))
		  (not (eq (car (car old-params)) name)))
	      (setq new-params (append new-params (list (car old-params)))))
	  (setq old-params (cdr old-params)))
	(gnus-group-set-info new-params group 'params)))))

; Slight alteration of Jason L Tibbitts III <tibbs#uh.edu>'s code:

(add-hook 'gnus-select-group-hook
  (lambda ()
    (gnus-group-set-parameter group
			      'gnus-group-date-last-entered
			      (substring (current-time-string) 4 16))))

(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 "")))

; .sig follows

-- 
Colin Rafferty
Violate the Communications Decency Act.
"...shit, piss, fuck, cunt, cocksucker, mother-fucker, and tits."
                  -FCC v. Pacifica Foundation 438 U.S. 726 (1978)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1996-02-13 22:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-02-09 17:30 date group last read Roderick Schertler
1996-02-09 21:44 ` Lars Magne Ingebrigtsen
1996-02-11 18:07   ` Brian Edmonds
1996-02-12  6:36     ` Jason L Tibbitts III
1996-02-12 18:22       ` Lars Magne Ingebrigtsen
1996-02-12 23:15         ` Jason L Tibbitts III
1996-02-13 19:58           ` Jason L Tibbitts III
1996-02-13 22:02             ` Colin Rafferty

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).