[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: group-line-format and Gmail - stop displaying [Gmail]
From: |
Kevin Brubeck Unhammer |
Subject: |
Re: group-line-format and Gmail - stop displaying [Gmail] |
Date: |
Mon, 24 Sep 2012 20:48:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
davidandrewrogers@gmail.com writes:
> Hi all
> I use Gnus for email only.
>
> To make small-screen usage easier, I'd like to get my Gnus group line
> to omit the square-bracketed word [Gmail]/ from the display.
>
> I currently have
>
> (setq gnus-group-line-format "%M%S%p%P%5y: %(%G%)%l %6,6~(cut 2)d\n")
>
> but I can't find any clues about how to convert the group name (the %G
> above) into something that will eliminate the relevant (I mean
> irrelevant) :) part.
Perhaps something like the following (totally untested):
(defun gnus-user-format-function-G (arg)
(replace-regexp-in-string
"\\[Gmail\\]"
""
gnus-tmp-group))
(setq gnus-group-line-format "%M%S%p%P%5y: %(%uG%)%l %6,6~(cut 2)d\n")
Note the use of %uG (see C-h v gnus-group-line-format).
--
Kevin Brubeck Unhammer
GPG: 0x766AC60C