From: joaotavora@gmail.com (João Távora)
To: info-gnus-english@gnu.org
Subject: Re: Cleaner dates in summary buffers
Date: Sun, 01 Sep 2013 15:14:45 +0100 [thread overview]
Message-ID: <m2ppsseii2.fsf@gmail.com> (raw)
In-Reply-To: <m238ppfo0u.fsf@gmail.com>
joaotavora@gmail.com (João Távora) writes:
> Hi all,
>
> Is there any way to turn this
>
> U. 2013-08-30 16:37 [ Julien Cubizolles ] `->
> U. 2013-08-30 23:27 [ Catonano ] v o-blog (helpwith
> U. 2013-08-31 02:12 [ Jambunathan K ] `->
> U. 2013-08-31 22:26 [ Catonano ] `->
>
> Into this?
>
> U. 2013-08-30 16:37 [ Julien Cubizolles ] `->
> U. 23:27 [ Catonano ] v o-blog (helpwith
> U. 2013-08-31 02:12 [ Jambunathan K ] `->
> U. 22:26 [ Catonano ] `->
>
Well, this seems to be working:
(add-hook 'gnus-summary-update-hook
'joaot/gnus-summary-fancify-date)
(defvar joaot/gnus-date-regexp "^....\\([[:digit:]]\\{4\\}-[[:digit:]]\\{2\\}-[[:digit:]]\\{2\\}\\) .*")
(defun joaot/gnus-summary-fancify-date ()
(goto-char (point-min))
(loop with last-date = nil
while (search-forward-regexp joaot/gnus-date-regexp nil t)
for this-date = (match-string 1)
when (and last-date
(string= this-date last-date))
do
(let ((inhibit-read-only t))
(add-text-properties (match-beginning 1)
(match-end 1)
`(face (:foreground ,(frame-parameter (selected-frame)
'background-color)))))
do (setq last-date this-date)))
Just in case anyone finds it useful or wants to improve it. The regexp
bit is a little fragile.
J
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
prev parent reply other threads:[~2013-09-01 14:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-31 23:17 João Távora
2013-09-01 14:14 ` João Távora [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ppsseii2.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=info-gnus-english@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).