* bug#51852: Gnus: Add User-Defined Spec example
@ 2021-11-14 17:21 積丹尼 Dan Jacobson
2021-11-14 18:36 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-11-14 17:21 UTC (permalink / raw)
To: 51852
(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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#51852: Gnus: Add User-Defined Spec example
2021-11-14 17:21 bug#51852: Gnus: Add User-Defined Spec example 積丹尼 Dan Jacobson
@ 2021-11-14 18:36 ` Lars Ingebrigtsen
2021-11-15 18:44 ` 積丹尼 Dan Jacobson
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-14 18:36 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 51852
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> (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.
It's documented in the "Summary Buffer Lines" node:
@item &user-date;
Age sensitive date format. Various date format is defined in
@code{gnus-user-date-format-alist}.
There is (currently) no rest to list.
> 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 .
This seems sufficient?
---
All the specs allow for inserting user defined specifiers---@samp{u}.
The next character in the format string should be a letter. Gnus
will call the function @code{gnus-user-format-function-}@samp{X}, where
@samp{X} is the letter following @samp{%u}. The function will be passed
a single parameter---what the parameter means depends on what buffer
it's being called from.
---
So there doesn't seem to be anything here to do, and I'm closing this
bug report. If you want help with using Gnus, then I suggest asking on
an Emacs help-oriented mailing list.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-15 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-14 17:21 bug#51852: Gnus: Add User-Defined Spec example 積丹尼 Dan Jacobson
2021-11-14 18:36 ` Lars Ingebrigtsen
2021-11-15 18:44 ` 積丹尼 Dan Jacobson
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).