1 ;;; gnus-move.el --- commands for moving Gnus from one server to another
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
4 ;; 2005 Free Software Foundation, Inc.
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
30 (eval-when-compile (require 'cl))
38 ;;; Moving by comparing Message-ID's.
42 (defun gnus-change-server (from-server to-server)
43 "Move from FROM-SERVER to TO-SERVER.
44 Update the .newsrc.eld file to reflect the change of nntp server."
46 (list gnus-select-method (gnus-read-method "Move to method: ")))
49 (let ((gnus-activate-level 0)
51 (nnmail-spool-file nil))
55 ;; Go through all groups and translate.
56 (let ((nntp-nov-gap nil))
57 (dolist (info gnus-newsrc-alist)
58 (when (gnus-group-native-p (gnus-info-group info))
59 (gnus-move-group-to-server info from-server to-server))))))