[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cleaner dates in summary buffers
From: |
João Távora |
Subject: |
Re: Cleaner dates in summary buffers |
Date: |
Sun, 01 Sep 2013 15:14:45 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (darwin) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Cleaner dates in summary buffers,
João Távora <=