From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/9385 Path: main.gmane.org!not-for-mail From: David Moore Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus date suggestion Date: 12 Jan 1997 14:07:54 -0800 Sender: dmoore@sdnp5.ucsd.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035149421 18159 80.91.224.250 (20 Oct 2002 21:30:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:30:21 +0000 (UTC) Cc: XEmacs Beta Discussion List Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.4/8.8.4) with SMTP id OAA15469 for ; Sun, 12 Jan 1997 14:18:26 -0800 Original-Received: from UCSD.EDU (mailbox1.ucsd.edu [132.239.1.53]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sun, 12 Jan 1997 23:10:15 +0100 Original-Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by UCSD.EDU (8.8.3/8.6.9) with SMTP id OAA16094; Sun, 12 Jan 1997 14:10:10 -0800 (PST) Original-Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4) id OAA10745; Sun, 12 Jan 1997 14:07:55 -0800 Original-To: "(ding) Gnus Mailing List" X-Face: "oX;zS#-JU$-,WKSzG.1gGE]x^cIg!hW.dq>.f6pzS^A+(k!T|M:}5{_%>Io<>L&{hO7W4cicOQ|>/lZ1G(m%7iaCf,6Qgk0%%Bz7b2-W3jd0m_UG\Y;?]}4s0O-U)uox>P3JN)9cm]O\@,vy2e{`3pb!"pqmRy3peB90*2L Mail-Copies-To: never In-Reply-To: jason@mastaler.com's message of 12 Jan 1997 14:12:38 -0500 Original-Lines: 77 X-Mailer: Red Gnus v0.80/XEmacs 19.15 Xref: main.gmane.org gmane.emacs.gnus.general:9385 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:9385 jason@mastaler.com (Jason R. Mastaler) writes: > Don't you think it would be more standard and helpful for gnus to > display the day of the week in the "Date" mail header by default? > > Gnus = Date: 12 Jan 1997 13:17:58 -0500 > MH/Mozilla = Date: Sun, 12 Jan 1997 14:06:24 -0500 > ELM/Pine = Date: Sun, 12 Jan 1997 14:08:29 -0500 (EST) Yeah, that might be nice, or more generally provide you with a format for displaying article times. Gnus currently uses timezone-make-date-arpa-standard to generate those times, but that is only truly needed in message.el for outgoing messages. It'd be great to be able to use format-time-string for this. And I just spent an hour trying to fake it out to do so, but it's not friendly enough. Thoughts & proposal: Being able to do that helps a lot with strftime in general, which is why one should try to provide that functionality whenever you make strftime available to people. And also the ability to tell it not to use 'localtime' on the time but 'gmtime'. This is great, because you can then use strftime to display time deltas conviently also. If something runs N seconds, but you want it in hour, minute, second format you just do (format-time-string "%H:%M:%S" (list 0 N) t). And if you want'd to have differently displayed time messages in Gnus, you could use something like: (defcustom gnus-article-time-format "%a, %b %d %Y %T %Z" "Format for display of Date headers in article bodies. See `format-time-zone' for the possible values." :type 'string :group 'article) (defun gnus-art-make-date (date &optional local timezone) (let ((tz-date (timezone-fix-time date local timezone))) (format-time-string "%a, %b %d %Y %T %Z" (encode-time (aref tz-date 5) (aref tz-date 4) (aref tz-date 3) (aref tz-date 2) (aref tz-date 1) (aref tz-date 0) (aref tz-date 6)) (aref tz-date 6) ; let %Z get the right name )) )) Proposed changed interface to format-time-string: format-time-string: (FORMAT-STRING TIME &optional ZONE) -- a built-in function. Use FORMAT-STRING to format the time TIME. TIME is specified as (HIGH LOW . IGNORED) or (HIGH . LOW), as from `current-time' and `file-attributes'. FORMAT-STRING may contain %-sequences to substitute parts of the time. ZONE defaults to the current time zone rule. This can be a string (as from `set-time-zone-rule'), or it can be a list (as from `current-time-zone'), or an integer (as from `decode-time') applied without consideration for daylight savings time, or it can be T which specifies the time is a delta rather than a true time. I would like to see this, or equivalent functionality, in xemacs (and gnu emacs), and I'm quite willing to code it, if there is a consensus on how it should be done. -- David Moore | Computer Systems Lab __o UCSD Dept. Computer Science - 0114 | Work: (619) 534-8604 _ \<,_ La Jolla, CA 92093-0114 | Fax: (619) 534-1445 (_)/ (_) | In cloud bones of steel.