From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53300 Path: main.gmane.org!not-for-mail From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de> Newsgroups: gmane.emacs.gnus.general Subject: Re: POP to IMAP Date: Tue, 01 Jul 2003 15:33:22 +0200 Organization: Dept. of Theoretical Physics, University of Ulm Sender: ding-owner@lists.math.uh.edu Message-ID: References: Reply-To: reiner.steib@gmx.de NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1057066793 21570 80.91.224.249 (1 Jul 2003 13:39:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 1 Jul 2003 13:39:53 +0000 (UTC) Original-X-From: ding-owner+M1844@lists.math.uh.edu Tue Jul 01 15:39:49 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 19XLLv-0005Yg-00 for ; Tue, 01 Jul 2003 15:39:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19XLLt-0008S0-00; Tue, 01 Jul 2003 08:39:21 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19XLLk-0008Rs-00 for ding@lists.math.uh.edu; Tue, 01 Jul 2003 08:39:12 -0500 Original-Received: (qmail 47595 invoked by alias); 1 Jul 2003 13:39:12 -0000 Original-Received: (qmail 47590 invoked from network); 1 Jul 2003 13:39:12 -0000 Original-Received: from main.gmane.org (80.91.224.249) by sclp3.sclp.com with SMTP; 1 Jul 2003 13:39:12 -0000 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19XLKh-0005QE-00 for ; Tue, 01 Jul 2003 15:38:07 +0200 Mail-Followup-To: ding@gnus.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19XLJl-0005L0-00 for ; Tue, 01 Jul 2003 15:37:09 +0200 Original-Lines: 73 Original-X-Complaints-To: usenet@main.gmane.org X-Face: :6KQZ[nyoS_edmB.%gw-=)BYth^|2+Y+^cu%I$FSx!&>-'om>3H7A|M&n(V7fIo3P.;yo.b yq4$p;ZaBtkv)\}biaiBQe"mD}iib1AA@99-fZ7i*bLhNRVC&0Wkxg9)SH?oWc@{ Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:Lpdmsh6qDleEZokTx5tkOJWuni8= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53300 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53300 On Mon, Jun 30 2003, Lute Kamstra wrote: > Firstly, if you use nnmail-split-fancy-with-parent and still have your > old POP (nnfolder) mail groups lying around, Gnus recognizes if new > mails refer to a mail you have in you old archive, but tries to split > them into a mailbox on the IMAP server with the same name as the group > the parent is in on the old backend. Adding the old groups to `nnmail-split-fancy-with-parent-ignore-groups' should avoid this problem. > Thirdly, it took quite some time to move all my archived messages to > the IMAP server. I had to go into every group (C-u RET), select all > messages (M P b), and move (B m) them an IMAP group.[...] I would > be nice if there were an easier way to do this. Maybe there is, but > I just don't know about it. You may loop over all relevant groups and let a function do the task. Something like this: --8<---------------cut here---------------start------------->8--- (defvar rs-gnus-migrate-old-group-regexp "^nnfolder.*Test" "Regexp matching old groups.") (defvar rs-gnus-migrate-target-group-prefix "nnimap+foo:" "Prefix for new groups.") (defun rs-gnus-migrate-loop () (interactive) (let (gnus-large-newsgroup gnus-parameters case-fold-search g-list full method g-name target) (dolist (group gnus-newsrc-alist) ;; loop over all groups (setq full (car group) g-name (gnus-replace-in-string full "^.*:" "") method (gnus-replace-in-string full (regexp-quote g-name) "") target (concat rs-gnus-migrate-target-group-prefix g-name)) (when (string-match rs-gnus-migrate-old-group-regexp full) (when (string= method "") (setq method nil)) (gnus-message 8 "full=`%s', method=`%s', group=`%s', target=`%s'" full method g-name target) ;; Create target group next to the old one: (gnus-group-jump-to-group full) ;; j ;; create target group unless it already exists: (save-excursion (if (gnus-gethash target gnus-newsrc-hashtb) (gnus-group-jump-to-group target) (gnus-group-make-group g-name ;; FIXME: Use Gnus functions instead of regexps. Which one? (gnus-replace-in-string rs-gnus-migrate-target-group-prefix "^\\([^+:]*\\).*$" "\\1") (gnus-replace-in-string rs-gnus-migrate-target-group-prefix "^[^+]+\\+\\([^:]+\\).*$" "\\1")))) (gnus-group-quick-select-group t) ;; 0 M-RET (gnus-summary-toggle-threads t) (gnus-summary-sort-by-date) ;; optional (gnus-uu-mark-buffer) ;; M P b ;; Maybe use `-move-' here: (gnus-summary-copy-article nil target) (gnus-summary-exit) ;; Maybe unsubscribe/delete old group here: ;; ... (gnus-message 7 "Processed `%s'" g-name))))) --8<---------------cut here---------------end--------------->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/