From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/51296 Path: main.gmane.org!not-for-mail From: Kevin Greiner Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap, gnus-agent and `/' as a subfolder separator Date: Wed, 09 Apr 2003 19:18:40 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1049933945 27945 80.91.224.249 (10 Apr 2003 00:19:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 10 Apr 2003 00:19:05 +0000 (UTC) Original-X-From: owner-ding@hpc.uh.edu Thu Apr 10 02:19:02 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 193PmQ-0007GR-00 for ; Thu, 10 Apr 2003 02:19:02 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 193PmV-0005T9-00; Wed, 09 Apr 2003 19:19:07 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 09 Apr 2003 19:20:12 -0500 (CDT) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [64.157.176.121]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id TAA09354 for ; Wed, 9 Apr 2003 19:19:59 -0500 (CDT) Original-Received: (qmail 58010 invoked by alias); 10 Apr 2003 00:18:49 -0000 Original-Received: (qmail 58005 invoked from network); 10 Apr 2003 00:18:49 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 10 Apr 2003 00:18:49 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 193PqP-0000bI-00 for ; Thu, 10 Apr 2003 02:23:09 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 101 Original-NNTP-Posting-Host: manchester-suites-iaf1047853.cust-rtr.ameritech.net Original-X-Trace: quimby.gnus.org 1049934189 2311 68.23.64.46 (10 Apr 2003 00:23:09 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 10 Apr 2003 00:23:09 GMT User-Agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.2 (windows-nt) Cancel-Lock: sha1:Wq0ayjO38KNeI/qHrvhe2ZDkfyo= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:51296 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:51296 Eric, I'm assuming that you mentioned nnmail-use-long-file-names because you debugged the code enough to localize the error. Thanks. Eric Knauel writes: > Hi, > > The gnus-agent of Oort Gnus 0.17 seems to be confused when `/' is used > as a subfolder separator on IMAP servers. I'm not sure whether this is > a bug: > > I subscribed some nnimap groups, > e.g. `nnimap+webmail.macnews.de:macnews/cocoa', accessing them in > `Plugged mode' works fine, so does fetching the articles with > gnus-agent `J s': > > ,---- > | [knauel@albert cocoa] pwd > | /Users/knauel/.gnus/News/agent/nnimap/webmail.macnews.de/macnews/cocoa > | [knauel@albert cocoa] ls > | 1 2 3 cocoa > `---- The function that I provide (see below) will not return this path. You'll need to rename it to /Users/knauel/.gnus/News/agent/nnimap/webmail.macnews.de/macnews_cocoa > However, if I try to access this group in `Unplugged mode' this will > happen: > > ,---- > | Signaling: (error "Couldn't request group nnimap+webmail.macnews.de:macnews/cocoa: Invalid group (no such directory)") > | signal(error ("Couldn't request group nnimap+webmail.macnews.de:macnews/cocoa: Invalid group (no such directory)")) > | cerror("Couldn't request group %s: %s" "nnimap+webmail.macnews.de:macnews/cocoa" "Invalid group (no such directory)") > | apply(cerror "Couldn't request group %s: %s" ("nnimap+webmail.macnews.de:macnews/cocoa" "Invalid group (no such directory)")) > | error("Couldn't request group %s: %s" "nnimap+webmail.macnews.de:macnews/cocoa" "Invalid group (no such directory)") > | gnus-select-newsgroup("nnimap+webmail.macnews.de:macnews/cocoa" nil nil) > | gnus-summary-read-group-1("nnimap+webmail.macnews.de:macnews/cocoa" nil t nil nil nil) > | gnus-summary-read-group("nnimap+webmail.macnews.de:macnews/cocoa" nil t nil nil nil nil) > | gnus-group-read-group(nil t) > | gnus-group-select-group(nil) > | gnus-topic-select-group(nil) > | call-interactively(gnus-topic-select-group) > `---- > > I suppose that gnus searches for the mail files in the wrong directory > or gnus-agent creates the mail folder in the wrong directory. The agent should use a path similar to that used by the backend. That would appear to indicate that the agent should use 'macnews_cocoa' rather than 'macnews/cocoa'. > By looking at the function `nnmail-group-pathname' in nnmail.el I > found out that it returns > `/Users/knauel/.gnus/Mail/nnml/macnews_cocoa' in this case. If I `ln > -s' that directory to the actual directory created by gnus-agent fetch > ---it works fine. You shouldn't link the nnml directory to the agent. Doing so means that both the nnml backend and the agent will try to manipulate the same local files. Both components believe that they have exclusive control over these files so this could be trouble. You've obviously read the code. I could use a second opinion. I've concluded that nnmail-group-pathname doesn't use nnmail-use-long-file-names as expected (at least as I would expected). The problem is that nnmail-group-pathname first converts periods (.) into underscores (_). It then checks nnmail-use-long-file-names and, if it is null, converts periods (.) into slashes (/). But what's the point? By this time, no periods should remain in the group name. > However, sometimes (I couldn't figure out why or when) gnus searches > these groups at > `/Users/knauel/.gnus/News/agent/nnimap/webmail.macnews.de', which is > quite correct, but it can't find the subfolder `macnews/cocoa' in this > directory. It's looking for `macnews_cocoa' there, so if make another > link there, it'll work. That's very confusing. ;-) > > BTW I'm using (setq nnmail-use-long-file-names t) in my gnus.el. Yes, nnmail-use-long-file-names appears to be the problem. Let's see if this function fixes your problem. (defun gnus-agent-group-path (group) "Translate GROUP into a file name." (nnheader-translate-file-chars (nnheader-replace-duplicate-chars-in-string (nnheader-replace-chars-in-string (gnus-group-real-name group) ?/ ?_) ?. ?_))) You can either replace the original in gnus-agent.el or simply eval this form after loading gnus-agent. Kevin