[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51852: Gnus: Add User-Defined Spec example
From: |
積丹尼 Dan Jacobson |
Subject: |
bug#51852: Gnus: Add User-Defined Spec example |
Date: |
Mon, 15 Nov 2021 01:21:14 +0800 |
(info "(gnus) Formatting Basics") says
Also Gnus supports some extended format specifications, such as
‘%&user-date;’.
OK, please say what user-date is, and list the rest.
Wait, on (info "(gnus) User-Defined Specs") we see it is something we
create ourselves. So on (info "(gnus) Formatting Basics") the "foo"
example should be used, and not "user-date".
And mainly, on (info "(gnus) User-Defined Specs") there is no example of
how to make a User-Defined Spec. E.g., how to continue the example on
(info "(gnus) Advanced Formatting") to finally get 96/08/09 .
By the way, that (info "(gnus) Advanced Formatting") example,
Let’s take an example. The ‘%o’ spec in the summary mode lines will
return a date in compact ISO8601 format—‘19960809T230410’. This is
quite a mouthful, so we want to shave off the century number and the
time, leaving us with a six-character date. That would be ‘%~(cut-left
2)~(max-right 6)~(pad 6)o’. (Cutting is done before maxing, and we need
the padding to ensure that the date is never less than 6 characters to
make it look nice in columns.)
is bad programming: not Y10K proof.
- bug#51852: Gnus: Add User-Defined Spec example,
積丹尼 Dan Jacobson <=