From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54580 Path: main.gmane.org!not-for-mail From: Jake Colman Newsgroups: gmane.emacs.gnus.general Subject: Re: Invalid Data on Line 1 - Please Help! Date: Thu, 30 Oct 2003 14:39:20 -0500 Sender: ding-owner@lists.math.uh.edu Message-ID: <76znfitt07.fsf@newjersey.ppllc.com> References: <76r80yg02a.fsf@newjersey.ppllc.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1067542780 7651 80.91.224.253 (30 Oct 2003 19:39:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Oct 2003 19:39:40 +0000 (UTC) Original-X-From: ding-owner+M3121@lists.math.uh.edu Thu Oct 30 20:39:37 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AFIdt-0004GK-00 for ; Thu, 30 Oct 2003 20:39:37 +0100 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 1AFIdj-0002hY-00; Thu, 30 Oct 2003 13:39:27 -0600 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AFIdd-0002hT-00 for ding@lists.math.uh.edu; Thu, 30 Oct 2003 13:39:21 -0600 Original-Received: from newjersey.ppllc.com (unknown [65.206.49.195]) by justine.libertine.org (Postfix) with ESMTP id A03593A0073 for ; Thu, 30 Oct 2003 13:39:20 -0600 (CST) Original-Received: (from colman@localhost) by newjersey.ppllc.com (8.9.3/8.9.3) id OAA04500; Thu, 30 Oct 2003 14:39:20 -0500 (EST) X-Authentication-Warning: newjersey.ppllc.com: colman set sender to colman@ppllc.com using -f Original-To: ding@gnus.org In-Reply-To: (Kevin Greiner's message of "Thu, 30 Oct 2003 12:54:21 -0600") User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Reasonable Discussion, usg-unix-v) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54580 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54580 --=-=-= >>>>> "KG" == Kevin Greiner writes: KG> 4) Start gnus as usual. KG> 5) Proceed until you get thrown into the debugger. KG> 6) While in the debugger, eval (current-buffer). If that buffer isn't KG> visible, select it so that you can see what is wrong with line 1. KG> 7) Exit gnus, edit the broken file to fix line 1, then start gnus to KG> see if you're OK. KG> I'd appreciate it if you'd post which file had the invalid line and KG> also the invalid line itself. Gnus may not be able to avoid the error KG> but it should, if at all possible, handle it with more grace. I've left just enough of your post to give some context. Just before I saw your reply, I completed my fight with edebug to gain some insight into what's going on. The problem is in (gnus-nov-parse-line). It correctly parses all of the components of the header line and then calls (widen). It is there that the error is triggered. I am not sure what's going on but I have my suspicions. I recently loaded a new library: narrow-stack.el. This package has the following line: (ad-enable-advice 'widen 'before 'ns-widen-advice)) I strongly suspect that this is the cause of the problem, though I have no idea why. I have removed narrow-stack.el and will see whether my problem goes away. In case you are interested, I am attaching narrow-stack.el with this message. Please let me know what you think of my diagnosis. -- Jake Colman Principia Partners LLC Phone: (201) 209-2467 Harborside Financial Center Fax: (201) 946-0320 902 Plaza Two E-mail: colman@ppllc.com Jersey City, NJ 07311 www.principiapartners.com --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=narrow-stack.el Content-Description: narrow-stack.el Content-Transfer-Encoding: quoted-printable ;;; narrow-stack version 1.0 ;; ;; Copyright (C) 1999 Jesper Kj=E6r Pedersen ;; ;; Author: Jesper Kj=E6r Pedersen ;; Home page: http://www.imada.sdu.dk/~blackie/emacs/ ;; Created: 18 Apr. 1999 ;; Keywords: narrow ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, you can either send email to this ;; program's maintainer or write to: The Free Software Foundation, ;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA. ;;; Commentary: ;; Narrowing, as implemented in Emacs has one limitation, which I find very ;; annoying, namely that it is not possible to narrow within a narrowing, ;; and then widen again to the previous narrowing. ;; This package implements an extension to narrowing, which makes this ;; possible. ;;=20 ;; This package has been developed as part of my job on writing the book ;; "Sams Teach yourself Emacs in 24 hours". ;; For more information about this book, please go to the page www.mcp.com ;; and search for the word Emacs. ;; ;; To install this package, copy this file to a directory in your load-path ;; and insert the following into your .emacs file: ;; (require 'narrow-stack) ;; (narrow-stack-mode) ;;; History Information ;; 1.0.1 Added documentation for functions ;; 1.0 First official relase. (require 'advice) (defvar ns-stack '() "the stack of earlier narrows") (make-variable-buffer-local 'ns-stack) (defvar narrow-stack-mode nil "narrow-stack-mode implements a stack of narrows. Thus with narrow-stack-mode you may narrow within narrowing, and widen to the previous narrowing.\n\nFor more information on narrowing, see narrow-to-reg= ion") (defun ns-narrow-to-region (start end) "narrow to the region marked, in a way, which makes it possible to widen to the given view later.\n\nFor more information on narrowing, see narrow-t= o-region" (interactive "r") (let* ((pm (point-marker)) (ns-elm (list (point-min) pm))) (set-marker pm (+ 1 (point-max))) (if (and (null ns-stack) (ns-is-narrowed)) (progn ;; narrow-stack do not have any information about ;; narrowing of this buffer, though it is narrowed. ;; Push an extra element to the stack, to avoid that the function ;; widen rather than ns-widen is called, when this element is wid= ened. (setq ns-stack (cons ns-elm (cons ns-elm ns-stack)))) (setq ns-stack (cons ns-elm ns-stack))) (narrow-to-region start end))) (defun ns-widen ()=20 "widen the view to the previous narrowing, or to the whole view if no previous narrowing exists.\n\nFor more information on narrowing, see narrow= -to-region" (interactive "") (if (<=3D (length ns-stack) 1) ; One element on the stack means that only one level of narrowing ; exists. Thus narrowing should be disabled. (widen) (let ((new-start (caar ns-stack)) (new-end (- (cadar ns-stack) 1))) (progn=20 (setq ns-stack (cdr ns-stack)) (narrow-to-region new-start new-end) ;; Delete the marker. Is this necessary? ;(set-marker new-end nil) )))) (defun ns-is-narrowed () (or (not (=3D (point-min) 1)) (not (=3D (1+ (buffer-size)) (point-max))))) ;;;###autoload (defun narrow-stack-mode (&optional arg) "narrow-stack-mode implements a stack of narrows. Thus with narrow-stack-mode you may narrow within narrowing, and widen to the previous narrowing\n\nFor more information on narrowing, see narrow-to-regi= on" (interactive "P") (setq narrow-stack-mode=20 (if (null arg)=20 (not narrow-stack-mode) (> (prefix-numeric-value arg) 0))) (if narrow-stack-mode (progn (substitute-key-definition 'narrow-to-region 'ns-narrow-to-region g= lobal-map) (substitute-key-definition 'widen 'ns-widen global-map) (ad-enable-advice 'widen 'before 'ns-widen-advice)) (progn (substitute-key-definition 'ns-narrow-to-region 'narrow-to-region gl= obal-map) (substitute-key-definition 'ns-widen 'widen global-map) (ad-disable-advice 'widen 'before 'ns-widen-advice))) (ad-activate 'widen)) (defadvice widen (before ns-widen-advice dis) (setq ns-stack '())) (provide 'narrow-stack) ;;; narrow-stack.el ends here --=-=-=--