Gnus development mailing list
 help / color / mirror / Atom feed
* user summary line format not being called with headers
@ 1997-06-02 10:20 Darren/Torin/Who Ever...
  1997-06-06  3:24 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Darren/Torin/Who Ever... @ 1997-06-02 10:20 UTC (permalink / raw)


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

My gnus-user-format-function in gnus-summary-line-format seems to be
called with null headers.

Note the following line that says "Error" from the " *Message-Log*"
buffer:
>No more unread articles (Type n for nnmh:lists.soft.gnus [5])
>
>Retrieving newsgroup: nnmh:lists.soft.gnus...
>Error in summary date () line format: (error Specified time is not representable)
>Fetching headers for nnmh:lists.soft.gnus...
>Fetching headers for nnmh:lists.soft.gnus...done
>Scoring...
>Scoring...done
>Sorting threads...
>Sorting threads...done
>Generating summary...
>Generating summary...done

BTW, the entire header looks like: "[0      0 0 ]" when I print it out.
So, it appears to be an array from somewhere.

This comes from the following user-format:
>"%U%R %6,6uD %5,5N %I%(%[%4L: %-20,20uB%]%) %s\n"

set from gnus-summary-format-hook.  And the gnus-user-format-function-D
is:
>(defun gnus-user-format-function-D (header)
>  "Return a prettified date based on age (uses relevant-date)"
>  (let (date-header)
>    (condition-case err
>	(progn
>	  (setq date-header (mail-header-date header))
>	  (relevant-date (gnus-encode-date date-header)))
>      (error (message "Error in summary date (%s) line format: %s" date-header err) ""))))

and finally, relevant-date is:
>(defun relevant-date (date) "\
>Format DATE based on age from current time
>where date is emacs-time cons (hiword loword) and time is
>Within the day  - hh:mm
>Within the week - ddd
>Within the last six months - MMM DD
>Older than six months - YY MMM"
>  (let* ((time (gnus-time-minus (current-time) date))
>	 (seconds (+ (* (car time) 65536) (cadr time))))
>    (cond ((> seconds 15768000)					; half a year
>	   (format-time-string "%y %b" date))
>	  ((> seconds 604800)						; one week
>	   (format-time-string "%b %e" date))
>	  ((> seconds 86400)						; one day
>	   (format-time-string "%a" date))
>	  (t
>	   (format-time-string "%k:%M" date)))))

and finally the version of gnus:
>Gnus v5.4.55; nntp 5.0; nnmh 1.0

Any ideas?  If no answers are forthcoming, I'll probably slog through
the code.  I just want to see if I'm doing something obvious wrong.
(Like header *will* be passed as a null once, get used to it.)

- -- 
<torin@daft.com> <http://www.daft.com/~torin> <torin@debian.org> <torin@io.com>
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Do you have your clothes on? I probably don't. Take yours off. Feel better. @
@ Sysadmin, webweaver, postmaster for hire.  C/Perl/CGI programmer and tutor. @

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

iQCVAwUBM5Keao4wrq++1Ls5AQHVXAP/W6/AQFqYjKsJZr+i3uEgzje61fpEMlq3
8DIr9JSxKLUHsRSzRhIjIIuePQXZIORTfdcaLGDnnLGNd2ceLrhzYFUL5rC5OoAS
+kFzzbFQyGXGaG6b4+7mcfO9WuksmfdzmxOmVMtc1xqj+4gCiVZHsgloEEo1wNtA
FVcKAvVOxlk=
=d+MO
-----END PGP SIGNATURE-----


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

* Re: user summary line format not being called with headers
  1997-06-02 10:20 user summary line format not being called with headers Darren/Torin/Who Ever...
@ 1997-06-06  3:24 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-06-06  3:24 UTC (permalink / raw)


"Darren/Torin/Who Ever..." <torin@daft.com> writes:

> My gnus-user-format-function in gnus-summary-line-format seems to be
> called with null headers.

Quoth the manual:

All the specs allow for inserting user defined specifiers---`u'.  The
next character in the format string should be a letter.  Gnus will call
the function `gnus-user-format-function-'`X', where `X' is the letter
following `%u'.  The function will be passed a single parameter--what
the parameter means depends on what buffer it's being called from.  The
function should return a string, which will be inserted into the buffer
just like information from any other specifier.  This function may also
be called with dummy values, so it should protect against that.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1997-06-06  3:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-02 10:20 user summary line format not being called with headers Darren/Torin/Who Ever...
1997-06-06  3:24 ` Lars Magne Ingebrigtsen

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