Gnus development mailing list
 help / color / mirror / Atom feed
From: Dave Abrahams <dave@boostpro.com>
To: ding@gnus.org
Subject: Where is gnus-simplify-group-name?
Date: Fri, 07 Oct 2011 20:47:40 -0400	[thread overview]
Message-ID: <m2d3e8ia1f.fsf@boostpro.com> (raw)


I was writing some code that opened groups today and I was disturbed to
find that Gnus would do something different if I spelled the same group
in two different ways.  My `gnus-select-method' is

  (nnimap "LocalIMAP" 
          (nnimap-address "localhost") (nnimap-user "dave")
          (nnimap-server-port 9143) (nnimap-stream network))

If I try to open the group as "nnimap+LocalIMAP:INBOX" instead of just
"INBOX", none of what Gnus has remembered about the group applies; it
has to fetch the list of unread articles newly, etc.  So I looked around
for something that would canonicalize group names and didn't find it.  I
ended up writing this, which *seems* to work (although I don't pretend
to know for sure):

  (defun gnus-simplify-group-name (group)
    (gnus-group-prefixed-name
     (gnus-group-real-name group)
     (gnus-group-method group)))

So, to my questions:

1. Surely this functionality exists somewhere and I've overlooked it?

2. If not, don't we need it?

3. Regardless, shouldn't more of gnus' functions do internal
   canonicalization so that handing them group names isn't so risky?

Thanks,

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com





             reply	other threads:[~2011-10-08  0:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-08  0:47 Dave Abrahams [this message]
2011-10-10  8:23 ` Julien Danjou
2011-10-10 22:53   ` Dave Abrahams
2011-10-11  8:24     ` Julien Danjou
2011-10-11 12:16       ` Dave Abrahams

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=m2d3e8ia1f.fsf@boostpro.com \
    --to=dave@boostpro.com \
    --cc=ding@gnus.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).