From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/51300 Path: main.gmane.org!not-for-mail From: Eric Knauel Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap, gnus-agent and `/' as a subfolder separator Date: Thu, 10 Apr 2003 16:47:10 +0200 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 1049986504 17968 80.91.224.249 (10 Apr 2003 14:55:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 10 Apr 2003 14:55:04 +0000 (UTC) Original-X-From: owner-ding@hpc.uh.edu Thu Apr 10 16:55: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 193dRD-0004Z1-00 for ; Thu, 10 Apr 2003 16:54:03 +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 193dQn-0007A8-00; Thu, 10 Apr 2003 09:53:37 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 10 Apr 2003 09:54:43 -0500 (CDT) Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id JAA10934 for ; Thu, 10 Apr 2003 09:54:29 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 193dPx-0004Rc-00 for ; Thu, 10 Apr 2003 16:52:45 +0200 Mail-Followup-To: ding@hpc.uh.edu X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@hpc.uh.edu Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 193dOm-0004MI-00 for ; Thu, 10 Apr 2003 16:51:32 +0200 Original-Lines: 84 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never X-Face: $h1drS;M-yJRg.]BD:qvqStjXHS)'jNUcm'"5`NOr9.SO8pyX.Re&4N1K#/$F 32&XUgw.O7dcBD9wT01Iy7[O\CBpJaHrE}'+I.hmkh%'JhMv&AJ5Z8}nBT[?fE0\K=XW [5uyKp'VQE!0@G}kH{XxILQ`vo/8y|>IEc;tLujSPQDi@#,)Im[hb;X%*:9!QN*/Mr|G!?8T5_, User-Agent: Gnus/5.090017 (Oort Gnus v0.17) XEmacs/21.4 (Portable Code, darwin) Cancel-Lock: sha1:8VAf3CHLrLX3vRsaKSqobxXZZRg= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:51300 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:51300 Hi Kevin, Kevin Greiner writes: > 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: > > 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. Maybe it's this: (defun nnmail-group-pathname (group dir &optional file) "Make file name for GROUP." (concat (let ((dir (file-name-as-directory (expand-file-name dir)))) (setq group (nnheader-replace-duplicate-chars-in-string ^^^^^^^^^ This probably should be `nnheader-replace-chars-in-string'. (nnheader-replace-chars-in-string group ?/ ?_) ?. ?_)) (setq group (nnheader-translate-file-chars group)) ;; If this directory exists, we use it directly. (file-name-as-directory (if (or nnmail-use-long-file-names (file-directory-p (concat dir group))) (expand-file-name group dir) ;; If not, we translate dots into slashes. (expand-file-name (mm-encode-coding-string (nnheader-replace-chars-in-string group ?. ?/) nnmail-pathname-coding-system) dir)))) (or file ""))) With `nnheader-replace-duplicate-chars-in-string' the periods remain in the group name: (nnheader-replace-duplicate-chars-in-string "mail.uni.pu" ?. ?_) => "mail.uni.pu" So the `(nnheader-replace-chars-in-string group ?. ?/)' in the `nnmail-use-long-file-names' != nil case might be actually be a hack. Using `dabbrev-expand' while coding Lisp is evil. ;-) >> 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. That seems to solve the problem! I removed all directories and links prefixed by "macnews/" in `/Users/knauel/.gnus/News/agent/nnimap/webmail.macnews.de'. The next `gnus-agent-fetch-session' created directories `macnews_xyz', which open up properly. Thanks! -Eric -- "Excuse me --- Di Du Du Duuuuh Di Dii --- Huh Weeeheeee" (Albert King)