From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Re: Problem with Gnus Date: Wed, 20 Oct 2004 18:42:07 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1098290610 10326 80.91.229.6 (20 Oct 2004 16:43:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Oct 2004 16:43:30 +0000 (UTC) Cc: emacs-devel@gnu.org, Kevin Greiner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 20 18:43:14 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CKJYP-00083M-00 for ; Wed, 20 Oct 2004 18:43:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CKJfn-0002nK-VS for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2004 12:50:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CKJfg-0002n5-BH for emacs-devel@gnu.org; Wed, 20 Oct 2004 12:50:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CKJff-0002mo-NC for emacs-devel@gnu.org; Wed, 20 Oct 2004 12:50:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CKJff-0002me-IV for emacs-devel@gnu.org; Wed, 20 Oct 2004 12:50:43 -0400 Original-Received: from [134.60.1.1] (helo=mail-new.rz.uni-ulm.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CKJXW-0007yZ-GH for emacs-devel@gnu.org; Wed, 20 Oct 2004 12:42:19 -0400 Original-Received: from lumberjack.physik.uni-ulm.de (lumberjack.physik.uni-ulm.de [134.60.10.173]) by mail.uni-ulm.de (8.13.1/8.13.1) with ESMTP id i9KGg8sd013272; Wed, 20 Oct 2004 18:42:08 +0200 (MEST) Original-Received: by lumberjack.physik.uni-ulm.de (Postfix, from userid 170) id CF4DB1817E; Wed, 20 Oct 2004 18:42:07 +0200 (CEST) Mail-Followup-To: "Kim F. Storm" , Kevin Greiner , Original-To: "Kim F. Storm" 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@{ User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-DCC-RollaNet-Metrics: gemini 1004; Body=3 Fuz1=3 Fuz2=3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28668 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28668 --=-=-= On Wed, Oct 20 2004, Kim F. Storm wrote: [ Changing the order of the questions...] > Q2: What about legacy-gnus-agent.el ? > > Looking at the code in gnus-start.el, it seems to expect > a file named legacy-gnus-agent.el (also according to ChangeLog). > > Anybody else having seen this? Yes. After adding `legacy-gnus-agent.el' (from the current Gnus trunk; see attachment) to emacs/lisp/gnus, it worked for me. Kevin has synched some agent-related bugfixes from the trunk to the v5-10 branch. It seems he forgot to install `legacy-gnus-agent.el' in the v5-10 branch. In order to minimize the inconvenience, I think it's best if I "cvs add legacy-gnus-agent.el" in Emacs soon (instead of fixing it in Gnus/v5-10 and waiting for the semi-automatic syncing). I have to leave now, but I can do it in a couple of hours unless someone has a better suggestion. > When I do M-x gnus, it now asks me > > Convert gnus from version '5.11' to '5.11' (n/y/?) > > Q1: Is this to be expected? > > Both gnus-version and gnus-newsrc-file-version are "Gnus v5.11". Kevin, could you check for which versions a migration in `gnus-convert-old-newsrc' is necessary for users of Gnus v5.11? (This version is the same as in the v5-10 branch; (gnus-continuum-version) gives 5.11 whereas No Gnus has 5.110003.) A problem might be that the version numbers are not really one-dimensional anymore in the sense of features. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/ --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=legacy-gnus-agent.el Content-Transfer-Encoding: quoted-printable (require 'gnus-start) (require 'gnus-util) (require 'gnus-range) (require 'gnus-agent) ; Oort Gnus v0.08 - This release updated agent to no longer use ; history file and to support a compressed alist. (defvar gnus-agent-compressed-agentview-search-only nil) (defun gnus-agent-convert-to-compressed-agentview (converting-to) "Iterates over all agentview files to ensure that they have been converted to the compressed format." (let ((search-in (list gnus-agent-directory)) here members member converted-something) (while (setq here (pop search-in)) (setq members (directory-files here t)) (while (setq member (pop members)) (cond ((string-match "/\\.\\.?$" member) nil) ((file-directory-p member) (push member search-in)) ((equal (file-name-nondirectory member) ".agentview") (setq converted-something=20 (or (gnus-agent-convert-agentview member) converted-something)))))) (if converted-something (gnus-message 4 "Successfully converted Gnus %s offline (agent) fil= es to %s" gnus-newsrc-file-version converting-to)))) (defun gnus-agent-convert-to-compressed-agentview-prompt () (catch 'found-file-to-convert (let ((gnus-agent-compressed-agentview-search-only t)) (gnus-agent-convert-to-compressed-agentview nil)))) (gnus-convert-mark-converter-prompt 'gnus-agent-convert-to-compressed-agent= view 'gnus-agent-convert-to-compressed-agentview-prompt) (defun gnus-agent-convert-agentview (file) "Load FILE and do a `read' there." (with-temp-buffer (nnheader-insert-file-contents file) (goto-char (point-min)) (let ((inhibit-quit t) (alist (read (current-buffer))) (version (condition-case nil (read (current-buffer)) (end-of-file 0))) changed-version history-file) (cond ((=3D version 0) (let (entry (gnus-command-method nil)) (mm-disable-multibyte) ;; everything is binary (erase-buffer) (insert "\n") (let ((file (concat (file-name-directory file) "/history"))) (when (file-exists-p file) (nnheader-insert-file-contents file) (setq history-file file))) (goto-char (point-min)) (while (not (eobp)) (if (and (looking-at "[^\t\n]+\t\\([0-9]+\\)\t\\([^ \n]+\\) \\([0-9]+\\)") (string=3D (gnus-agent-article-name ".agentview" (match-string 2)) file) (setq entry (assoc (string-to-number (match-string 3)) alist))) (setcdr entry (string-to-number (match-string 1)))) (forward-line 1)) (setq changed-version t))) ((=3D version 1) (setq changed-version t))) (when changed-version (when gnus-agent-compressed-agentview-search-only (throw 'found-file-to-convert t)) (erase-buffer) (let ((compressed nil)) (mapcar (lambda (pair) (let* ((article-id (car pair)) (day-of-download (cdr pair)) (comp-list (assq day-of-download compressed))) (if comp-list (setcdr comp-list (cons article-id (cdr comp-list))) (setq compressed (cons (list day-of-download article-id) compressed))) nil)) alist) (mapcar (lambda (comp-list) (setcdr comp-list (gnus-compress-sequence (nreverse (cdr comp-list))))) compressed) (princ compressed (current-buffer))) (insert "\n2\n") (write-file file) (when history-file (delete-file history-file)) t)))) ;; End of Oort Gnus v0.08 updates ;; No Gnus v0.3 - This release provides a mechanism for upgrading gnus ;; from previous versions. Therefore, the previous ;; hacks to handle a gnus-agent-expire-days that ;; specifies a list of values can be removed. (defun gnus-agent-unlist-expire-days (converting-to) (when (listp gnus-agent-expire-days) (let (buffer) (unwind-protect (save-window-excursion (setq buffer (gnus-get-buffer-create " *Gnus agent upgrade*")) (set-buffer buffer) (erase-buffer) (insert "The definition of gnus-agent-expire-days has been chan= ged.\nYou currently have it set to the list:\n ") (gnus-pp gnus-agent-expire-days) (insert "\nIn order to use version '" converting-to "' of gnus,= you will need to set\n") (insert "gnus-agent-expire-days to an integer. If you still wis= h to set different\n") (insert "expiration days to individual groups, you must instead= set the\n") (insert "'agent-days-until-old group and/or topic parameter.\n") (insert "\n") (insert "If you would like, gnus can iterate over every group c= omparing its name to the\n") (insert "regular expressions that you currently have in gnus-ag= ent-expire-days. When\n") (insert "gnus finds a match, it will update that group's 'agent= -days-until-old group\n") (insert "parameter to the value associated with the regular exp= ression.\n") (insert "\n") (insert "Whether gnus assigns group parameters, or not, gnus wi= ll terminate with an\n") (insert "ERROR as soon as this function completes. The reason = is that you must\n") (insert "manually edit your configuration to either not set gnu= s-agent-expire-days or\n") (insert "to set it to an integer before gnus can be used.\n") (insert "\n") (insert "Once you have successfully edited gnus-agent-expire-da= ys, gnus will be able to\n") (insert "execute past this function.\n") (insert "\n") (insert "Should gnus use gnus-agent-expire-days to assign\n") (insert "agent-days-until-old parameters to individual groups? = (Y/N)") (switch-to-buffer buffer) (beep) (beep) (let ((echo-keystrokes 0) c) (while (progn (setq c (read-char-exclusive)) (cond ((or (eq c ?y) (eq c ?Y)) (save-excursion (let ((groups (gnus-group-listed= -groups))) (while groups (let* ((group (pop groups)) (days gnus-agent-expi= re-days) (day (catch 'found (while days (when (eq 0 = (string-match = (caar days) = group)) (throw 'fo= und (cadar days))) (setq days (= cdr days))) nil))) (when day (gnus-group-set-paramete= r group 'agent-days-until-old = day)))))) nil ) ((or (eq c ?n) (eq c ?N)) nil) (t t)))))) (kill-buffer buffer)) (error "Change gnus-agent-expire-days to an integer for gnus to start= .")))) ;; The gnus-agent-unlist-expire-days has its own conversion prompt. ;; Therefore, hide the default prompt. (gnus-convert-mark-converter-prompt 'gnus-agent-unlist-expire-days t) (defun gnus-agent-unhook-expire-days (converting-to) "Remove every lambda from gnus-group-prepare-hook that mention the symbol gnus-agent-do-once in their definition. This should NOT be necessary as gnus-agent.el no longer adds them. However, it is possible that the hook was persistently saved." (let ((h t)) ; iterate from bgn of hook (while h (let ((func (progn (when (eq h t) ;; init h to list of functions (setq h (cond ((listp gnus-group-prepare-hook) gnus-group-prepare-hook) ((boundp 'gnus-group-prepare-hoo= k) (list gnus-group-prepare-hook))= ))) (pop h)))) (when (cond ((eq (type-of func) 'compiled-function) ;; Search def. of compiled function for gnus-agent-d= o-once string (let* (definition=20 print-level=20 print-length (standard-output (lambda (char) (setq definition (cons char definition)))= )) (princ func) ; populates definition with reversed = list of characters (let* ((i (length definition)) (s (make-string i 0))) (while definition (aset s (setq i (1- i)) (pop definition))) (string-match "\\bgnus-agent-do-once\\b" s)))) ((listp func) (eq (cadr (nth 2 func)) 'gnus-agent-do-once) ; handl= es eval'd lambda )) (remove-hook 'gnus-group-prepare-hook func) ;; I don't what remove-hook is going to actually do to the ;; hook list so start over from the beginning. (setq h t)))))) ;; gnus-agent-unhook-expire-days is safe in that it does not modify ;; the .newsrc.eld file. (gnus-convert-mark-converter-prompt 'gnus-agent-unhook-expire-days t) ;;; arch-tag: 845c7b8a-88f7-4468-b8d7-94e8fc72cf1a --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--