On Monday, September 24, 2012 11:49:10 AM UTC-7, Kevin Brubeck Unhammer wrote:
> davidandrewrogers 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).
Thanks! That basically worked for me. After fiddling with the regex a little
bit to compensate for the fact that the original %G gave the simple group name
and not the full group name, here's what I've come up with for my situation:
(defun gnus-user-format-function-G (arg)
(replace-regexp-in-string
"^.*[:/]"
""
gnus-tmp-group))
(setq gnus-group-line-format "%M%S%p%P%5y: %(%uG%)%l %6,6~(cut 2)d\n")
The new regex says (I hope it says!) "Match the colon or the slash and
everything before it".
Again, thanks for the help.
--
David
_______________________________________________
info-gnus-english mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/info-gnus-english