From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39317 Path: main.gmane.org!not-for-mail From: ShengHuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: [patch] age depending date-format Date: Tue, 16 Oct 2001 16:52:18 -0400 Sender: owner-ding@hpc.uh.edu Message-ID: <2n1yk3tiil.fsf@zsh.cs.rochester.edu> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175043 27245 80.91.224.250 (21 Oct 2002 04:37:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:37:23 +0000 (UTC) Return-Path: Original-Received: (qmail 28582 invoked from network); 16 Oct 2001 23:31:01 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 16 Oct 2001 23:31:01 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 15tdZu-0002Yg-00; Tue, 16 Oct 2001 18:24:54 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 16 Oct 2001 18:24:32 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id SAA29076 for ; Tue, 16 Oct 2001 18:24:21 -0500 (CDT) Original-Received: (qmail 28499 invoked by alias); 16 Oct 2001 23:24:35 -0000 Original-Received: (qmail 28494 invoked from network); 16 Oct 2001 23:24:34 -0000 Original-Received: from roc-24-95-193-9.rochester.rr.com (HELO zsh.2y.net) (@24.95.193.9) by gnus.org with SMTP; 16 Oct 2001 23:24:34 -0000 Original-Received: (from zsh@localhost) by zsh.2y.net (8.11.6/8.11.2) id f9GKqJj32717; Tue, 16 Oct 2001 16:52:19 -0400 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q Mail-Copies-To: never In-Reply-To: (Frank Schmitt's message of "Tue, 16 Oct 2001 21:42:57 +0200") Original-Lines: 38 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.107 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39317 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39317 Frank Schmitt writes: > Hi > > I did some more testing and error handling on my code I posted in > . > > It should work without problems. What it does is the following: > Add a new item (%q) to gnus-summary-line-format-alist which calls > gnus-user-date(date-header). > > gnus-user-date formats the date accordingly to > gnus-user-date-day > gnus-user-date-week > gnus-user-date-old > > That means that if the message is of today you get e.g. 10:24 > if not older than 7 days you Mon 12:35 > and if it's older you Okt 16 > > gnus-user-* can hold any valid value for format-time-string. It is cute, but we'd better let users use %uX instead of adding %q into g-s-l-f-a. For example, (defalias 'gnus-user-format-function-X 'gnus-user-date). A suggestion. Is it better to use a variable like gnus-user-data-format-alist instead of gnus-user-date-format-day and it friends? g-u-d-f-a is a list of cons of elapsed time (or symbol) and format. For example, (defvar gnus-user-data-format-alist '((day-in-seconds . "%k:%M") (604800 . "%a %k:%M") (t . "%d.%m)) "Blah blah") ShengHuo