nnheader.el (nnheader-parse-head): Bug fix. Properly position point.
authorAndrew Cohen <cohen@andy.bu.edu>
Tue, 23 Nov 2010 13:10:39 +0000 (08:10 -0500)
committerAndrew Cohen <cohen@andy.bu.edu>
Tue, 23 Nov 2010 13:10:39 +0000 (08:10 -0500)
lisp/ChangeLog
lisp/nnheader.el
lisp/nnspool.el

index 94a2761..c0c0042 100644 (file)
@@ -1,3 +1,11 @@
+2010-11-23  Andrew Cohen  <cohen@andy.bu.edu>
+
+       * nnheader.el (nnheader-parse-head): Bug fix.  Properly position
+       point when parsing headers.
+
+       * nnspool.el (nnspool-insert-nov-head): Bug fix.  Make sure point
+       is positioned properly when parsing headers.
+
 2010-11-23  Julien Danjou  <julien@danjou.info>
 
        * shr.el (shr-parse-style): Replace \n with space in style parsing.
index 4bf4588..08dc96d 100644 (file)
@@ -366,15 +366,13 @@ on your system, you could say something like:
              (setq num 0
                    beg (point-min)
                    end (point-max))
-           (goto-char (point-min))
            ;; Search to the beginning of the next header.  Error
            ;; messages do not begin with 2 or 3.
            (when (re-search-forward "^[23][0-9]+ " nil t)
-             (end-of-line)
              (setq num (read cur)
                    beg (point)
                    end (if (search-forward "\n.\n" nil t)
-                           (- (point) 2)
+                           (goto-char  (- (point) 2))
                          (point)))))
       (with-temp-buffer
        (insert-buffer-substring cur beg end)
index 3598727..1916c1a 100644 (file)
@@ -399,15 +399,16 @@ there.")
   "Read the head of ARTICLE, convert to NOV headers, and insert."
   (save-excursion
     (let ((cur (current-buffer))
-         buf)
+          buf)
       (setq buf (nnheader-set-temp-buffer " *nnspool head*"))
       (when (nnheader-insert-head
-            (nnspool-article-pathname nnspool-current-group article))
-       (nnheader-insert-article-line article)
-       (let ((headers (nnheader-parse-head)))
-         (set-buffer cur)
-         (goto-char (point-max))
-         (nnheader-insert-nov headers)))
+             (nnspool-article-pathname nnspool-current-group article))
+        (nnheader-insert-article-line article)
+        (goto-char (point-min))
+        (let ((headers (nnheader-parse-head)))
+          (set-buffer cur)
+          (goto-char (point-max))
+          (nnheader-insert-nov headers)))
       (kill-buffer buf))))
 
 (defun nnspool-sift-nov-with-sed (articles file)