Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Kevin Brubeck Unhammer <unhammer@fsfe.org>
To: info-gnus-english@gnu.org
Subject: Re: group-line-format and Gmail - stop displaying [Gmail]
Date: Mon, 24 Sep 2012 20:48:26 +0200	[thread overview]
Message-ID: <87zk4fxnnp.fsf@fsfe.org> (raw)
In-Reply-To: <afd38cbb-cc7c-4c54-b66c-114aacffe078@googlegroups.com>

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

  reply	other threads:[~2012-09-24 18:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 14:55 davidandrewrogers
2012-09-24 18:48 ` Kevin Brubeck Unhammer [this message]
     [not found] ` <mailman.9667.1348512549.855.info-gnus-english@gnu.org>
2012-09-24 20:25   ` davidandrewrogers
2012-09-24 22:14     ` davidandrewrogers

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=87zk4fxnnp.fsf@fsfe.org \
    --to=unhammer@fsfe.org \
    --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).