info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Refresh Summary buffer after modifying summary-line-format


From: Brady Trainor
Subject: Refresh Summary buffer after modifying summary-line-format
Date: Sat, 20 Sep 2014 18:53:20 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi, I'm trying to make Gnus a little more reactive to my impulses. 

I like the defaults, and I try to add on a little customization as I go.
So far, I've managed to start making keybindings that will modify the
window configurations, like 

(define-key gnus-summary-mode-map (kbd "v 2") 'my-gnus-layout-2-pane)

The function includes a gnus-add-configuration, and a refresh via   
(gnus-summary-expand-window) (like `=' binding). 

But now, when I try to do the same for the summary-line-format, I cannot
see a good way to refresh the buffer. If I change the variable, then by
hand I can type `q' and then select the group again, and the summary
line will have the new formatting. But when I type `q', the cursor jumps
to a group with unread mail, though I was looking at my INBOX which
shows read mail, and ticked mail. 

Here are my functions:

(defun my-gnus-summary-line-time ()
  (interactive)
  (setq-default gnus-summary-line-format 
        "%&user-date; %U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
        gnus-user-date-format-alist '((t . "%d-%b-%y %H:%M"))
        )
  (gnus-summary-expand-window)
  )
(defun my-gnus-summary-line-date ()
  (interactive)
  (setq-default gnus-summary-line-format 
        "%d %U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
        )
  (gnus-summary-expand-window)
  )
(defun my-gnus-summary-line-default ()
  (interactive)
  (setq-default gnus-summary-line-format 
        "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
        )
  (gnus-summary-expand-window)
  )

And here are the shortcuts

(define-key gnus-summary-mode-map (kbd "v d") 'my-gnus-summary-line-default)
(define-key gnus-summary-mode-map (kbd "v D") 'my-gnus-summary-line-date)
(define-key gnus-summary-mode-map (kbd "v t") 'my-gnus-summary-line-time)


Thank you, 
Brady


reply via email to

[Prev in Thread] Current Thread [Next in Thread]