Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Brady Trainor <algebrat@uw.edu>
To: info-gnus-english@gnu.org
Subject: Refresh Summary buffer after modifying summary-line-format
Date: Sat, 20 Sep 2014 18:53:20 -0700	[thread overview]
Message-ID: <87vboh68of.fsf@uw.edu> (raw)


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	other threads:[~2014-09-21  1:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87vboh68of.fsf@uw.edu \
    --to=algebrat@uw.edu \
    --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).