Gnus development mailing list
 help / color / mirror / Atom feed
* [patch] bug in timestamp example in gnus-3
@ 2002-01-17  5:16 Patric Mueller
  2002-01-19 23:52 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Patric Mueller @ 2002-01-17  5:16 UTC (permalink / raw)



Hi

The example for the user defined date format doesn't work. 
There's a typo (%ud not %Ud) and then it doesn't work as expected.

If the group has never been assigned a timestamp instead of nothing,
time will be nil and format-time-string then takes the current time. 

This little patch should fix that. 

Bye
Patric


--- gnus-3.orig Mon Jan 14 18:18:13 2002
+++ gnus-3      Thu Jan 17 05:42:53 2002
@@ -635,10 +635,10 @@
 trick:
 
      (setq gnus-group-line-format
-           "%M\%S\%p\%P\%5y: %(%-40,40g%) %Ud\n")
+           "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
      (defun gnus-user-format-function-d (headers)
        (let ((time (gnus-group-timestamp gnus-tmp-group)))
-         (format-time-string "%b %d  %H:%M" time)))
+         (if time (format-time-string "%b %d  %H:%M" time) (make-string 0 ?x))))
 
 
 File: gnus,  Node: File Commands,  Next: Sieve Commands,  Prev: Group Timestamp,  Up: Misc Group Stuff



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

* Re: [patch] bug in timestamp example in gnus-3
  2002-01-17  5:16 [patch] bug in timestamp example in gnus-3 Patric Mueller
@ 2002-01-19 23:52 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-19 23:52 UTC (permalink / raw)


Patric Mueller <bhaak@gmx.net> writes:

> The example for the user defined date format doesn't work. 
> There's a typo (%ud not %Ud) and then it doesn't work as expected.

Thanks for the patch; I've applied it to Oort Gnus v0.05 (i. e., CVS).

-- 
(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:[~2002-01-19 23:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-17  5:16 [patch] bug in timestamp example in gnus-3 Patric Mueller
2002-01-19 23:52 ` 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).