From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/58260 Path: main.gmane.org!not-for-mail From: Jonas Steverud Newsgroups: gmane.emacs.gnus.general Subject: Re: Adulterate summary lines Date: Mon, 16 Aug 2004 17:40:09 +0200 Organization: The Deciples of Albericht Nibelungen Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1092670838 30190 80.91.224.253 (16 Aug 2004 15:40:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Aug 2004 15:40:38 +0000 (UTC) Original-X-From: ding-owner+M6801@lists.math.uh.edu Mon Aug 16 17:40:27 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bwjb0-0000ze-00 for ; Mon, 16 Aug 2004 17:40:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1Bwjan-0004IL-00; Mon, 16 Aug 2004 10:40:13 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1Bwjaj-0004IG-00 for ding@lists.math.uh.edu; Mon, 16 Aug 2004 10:40:09 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1Bwjaj-0008Ki-2F for ding@lists.math.uh.edu; Mon, 16 Aug 2004 10:40:09 -0500 Original-Received: from mxfep02.bredband.com (mxfep02.bredband.com [195.54.107.73]) by justine.libertine.org (Postfix) with ESMTP id BC7493A0058 for ; Mon, 16 Aug 2004 10:40:06 -0500 (CDT) Original-Received: from c-ed5372d5.036-4-67626721.cust.bredbandsbolaget.se.bredband.net ([213.114.83.158] [213.114.83.158]) by mxfep02.bredband.com with ESMTP id <20040816154004.EOUK345.mxfep02.bredband.com@c-ed5372d5.036-4-67626721.cust.bredbandsbolaget.se.bredband.net> for ; Mon, 16 Aug 2004 17:40:04 +0200 Original-To: ding@gnus.org Mail-Copies-To: never In-Reply-To: (Harry Putnam's message of "Mon, 16 Aug 2004 06:12:31 -0500") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (darwin) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:58260 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:58260 Harry Putnam writes: > Maybe something as simple as setting group summary line there. I think that is the way to go, with the %u specifier. > Where I loose it is where it says the function would be passed the > current header. Does that mean all headers in rotation or what. > Could it be parts of the body too? I wrote some test code: (defun gnus-user-format-function-x (STR) (message (prin1-to-string STR)) "test") (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %ux%]%) %s\n") ;; slight modification of my summary-line-format. Observe the %ux part. The Message buffer: [1841 "Adulterate summary lines" "Harry Putnam " "Mon, 16 Aug 2004 06:12:31 -0500" "" "" 4863 59 "c-ed5372d5.036-4-67626721.cust.bredbandsbolaget.se Ding:1841" ((To . "ding@gnus.org") (User-Agent . "Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)"))] I leave to others to interpret if that makes any sense or not. :-) > Using this option how would one make the Keywords line appear in > summary buffer or maybe the Date: line? Let the gnus-user-format-function-x above return what you want to add as a string. > I see a specifier `o' that already comes close... with: > > `o' > The `Date' in YYYYMMDD`T'HHMMSS format. > > But I'm finding that format too hard to read quickly. I'd like to have > my own function that produces MM/DD/YY HH:MM:SS and displays it in > summary buffer. Try to find the code for that and see if you wan write a gnus-user-format-function-x which uses format-time-string to produce what you want. I did some search in gnus-sum.el and found gnus-summary-line-format-alist. The line for 'd' was interesting: (?d (gnus-dd-mmm (mail-header-date gnus-tmp-header)) ?s) In gnus-util.el: (defun gnus-dd-mmm (messy-date) "Return a string like DD-MMM from a big messy string." (condition-case () (format-time-string "%d-%b" (safe-date-to-time messy-date)) (error " - "))) I then did: (defun gnus-user-format-function-x (STR) (condition-case () (format-time-string "%d/%m/%y %H:%M:%S" (safe-date-to-time (mail-header-date STR))) (error " - "))) I when I enter the Ding group, your message looks like this: [ 59: 16/08/04 13:12:31] Adulterate summary lines How to change to an 12-hour clock with AM/PM is left as an exercise to the reader but C-h f format-time-string is a big step in the right direction. > I'm thinking it would then be possible to close group call `G p' > > Change the letter following %u and call a different function. So one > could close and reopen with a series of homemade functions if need be. Sorry, but I don't understand those two paragraphs... :-( This, I think, should get you going. HTH. -- ( http://hem.bredband.net/steverud/ ! Wei Wu Wei ) ( Meaning of U2 Lyrics, Roleplaying ! To Do Without Do )