From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80213 Path: news.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.gnus.general Subject: Where is gnus-simplify-group-name? Date: Fri, 07 Oct 2011 20:47:40 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318035615 6878 80.91.229.12 (8 Oct 2011 01:00:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 8 Oct 2011 01:00:15 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28507@lists.math.uh.edu Sat Oct 08 03:00:11 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RCLGt-00089B-39 for ding-account@gmane.org; Sat, 08 Oct 2011 03:00:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1RCLGJ-00046k-0h; Fri, 07 Oct 2011 19:59:35 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RCLGH-00046X-Dl for ding@lists.math.uh.edu; Fri, 07 Oct 2011 19:59:33 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RCLGF-0007zm-Hv for ding@lists.math.uh.edu; Fri, 07 Oct 2011 19:59:32 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RCLGC-0007mX-Ku for ding@gnus.org; Sat, 08 Oct 2011 02:59:28 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RCLGC-00081H-J8 for ding@gnus.org; Sat, 08 Oct 2011 02:59:28 +0200 Original-Received: from 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com ([207.172.223.249]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Oct 2011 02:59:28 +0200 Original-Received: from dave by 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Oct 2011 02:59:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (darwin) Cancel-Lock: sha1:Q6ZG3dqCREniKZfkLchJ1u1bGYE= X-Spam-Score: -5.4 (-----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80213 Archived-At: 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