2001-07-13 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 13 Jul 2001 17:14:04 +0000 (17:14 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 13 Jul 2001 17:14:04 +0000 (17:14 +0000)
* gnus.el (gnus-summary-line-format): Add %o.

* gnus-sum.el (gnus-summary-pipe-output): Don't configure as pipe
unless shell outputs something.

2001-07-13 07:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>

* gnus-art.el (gnus-boring-article-headers): Better doc.
(article-hide-headers): Better regexp.
Suggested by Matt Swift <swift@alum.mit.edu>.

* nnheader.el (nnheader-max-head-length): Better doc.
(nnheader-header-value): Skip spaces.
(nnheader-parse-head): Remove space.
Suggested by Matt Swift <swift@alum.mit.edu>.

* gnus-sum.el (gnus-summary-show-raw-article): New function.
(gnus-get-newsgroup-headers): Remove space.

2001-07-12 23:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>

* gnus-msg.el (gnus-msg-treat-broken-reply-to): Add force.
(gnus-summary-reply): Use it.
(gnus-summary-reply-broken-reply-to): New.
(gnus-msg-force-broken-reply-to): New.

* mm-view.el (mm-inline-text): Showing as text/plain when error.

2001-07-12 21:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>

* gnus-draft.el (gnus-draft-setup): Restore gnus-newsgroup-name.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-draft.el
lisp/gnus-msg.el
lisp/gnus-sum.el
lisp/gnus.el
lisp/mm-view.el
lisp/nnheader.el

index d3e73b8..30dfefd 100644 (file)
@@ -1,3 +1,37 @@
+2001-07-13 08:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus.el (gnus-summary-line-format): Add %o.
+
+       * gnus-sum.el (gnus-summary-pipe-output): Don't configure as pipe
+       unless shell outputs something.
+
+2001-07-13 07:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-art.el (gnus-boring-article-headers): Better doc. 
+       (article-hide-headers): Better regexp.
+       Suggested by Matt Swift <swift@alum.mit.edu>.
+
+       * nnheader.el (nnheader-max-head-length): Better doc.
+       (nnheader-header-value): Skip spaces.
+       (nnheader-parse-head): Remove space.
+       Suggested by Matt Swift <swift@alum.mit.edu>.
+
+       * gnus-sum.el (gnus-summary-show-raw-article): New function.
+       (gnus-get-newsgroup-headers): Remove space.
+
+2001-07-12 23:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-msg.el (gnus-msg-treat-broken-reply-to): Add force.
+       (gnus-summary-reply): Use it.
+       (gnus-summary-reply-broken-reply-to): New.
+       (gnus-msg-force-broken-reply-to): New.
+
+       * mm-view.el (mm-inline-text): Showing as text/plain when error.
+
+2001-07-12 21:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-draft.el (gnus-draft-setup): Restore gnus-newsgroup-name.
+
 2001-07-12 15:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mm-decode.el (mm-external-terminal-program): New variable.
index 33f72c1..c1ea7f4 100644 (file)
@@ -168,15 +168,23 @@ this list."
 
 (defcustom gnus-boring-article-headers '(empty followup-to reply-to)
   "Headers that are only to be displayed if they have interesting data.
-Possible values in this list are `empty', `newsgroups', `followup-to',
-`to-address', `reply-to', `date', `long-to', and `many-to'."
+Possible values in this list are:
+
+  'empty       Headers with no content.
+  'newsgroups  Newsgroup identical to Gnus group.
+  'to-address  To identical to To-address.
+  'followup-to Followup-to identical to Newsgroups.
+  'reply-to    Reply-to identical to From.
+  'date        Date less than four days old.
+  'long-to     To and/or Cc longer than 1024 characters.
+  'many-to     Multiple To and/or Cc."
   :type '(set (const :tag "Headers with no content." empty)
-             (const :tag "Newsgroups with only one group." newsgroups)
-             (const :tag "To identical to to-address." to-address)
-             (const :tag "Followup-to identical to newsgroups." followup-to)
-             (const :tag "Reply-to identical to from." reply-to)
+             (const :tag "Newsgroups identical to Gnus group." newsgroups)
+             (const :tag "To identical to To-address." to-address)
+             (const :tag "Followup-to identical to Newsgroups." followup-to)
+             (const :tag "Reply-to identical to From." reply-to)
              (const :tag "Date less than four days old." date)
-             (const :tag "Very long To and/or Cc header." long-to)
+             (const :tag "To and/or Cc longer than 1024 characters." long-to)
              (const :tag "Multiple To and/or Cc headers." many-to))
   :group 'gnus-article-hiding)
 
@@ -1269,7 +1277,7 @@ Initialized from `text-mode-syntax-table.")
          ;; `gnus-ignored-headers' and `gnus-visible-headers' to
          ;; select which header lines is to remain visible in the
          ;; article buffer.
-         (while (re-search-forward "^[^ \t]*:" nil t)
+         (while (re-search-forward "^[^ \t:]*:" nil t)
            (beginning-of-line)
            ;; Mark the rank of the header.
            (put-text-property
index c7d7863..654c9a1 100644 (file)
 (defun gnus-draft-edit-message ()
   "Enter a mail/post buffer to edit and send the draft."
   (interactive)
-  (let ((article (gnus-summary-article-number)))
+  (let ((article (gnus-summary-article-number))
+        (group gnus-newsgroup-name))
     (gnus-summary-mark-as-read article gnus-canceled-mark)
-    (gnus-draft-setup article gnus-newsgroup-name t)
+    (gnus-draft-setup article group t)
     (set-buffer-modified-p t)
     (save-excursion
       (save-restriction
         (message-remove-header "date")))
     (save-buffer)
     (let ((gnus-verbose-backends nil))
-      (gnus-request-expire-articles (list article) gnus-newsgroup-name t))
+      (gnus-request-expire-articles (list article) group t))
     (push
      `((lambda ()
         (when (gnus-buffer-exists-p ,gnus-summary-buffer)
       (gnus-backlog-remove-article group narticle)
       (when (and ga
                 (ignore-errors (setq ga (car (read-from-string ga)))))
+        (setq gnus-newsgroup-name 
+              (if (equal (car ga) "") nil (car ga)))
        (setq message-post-method
              `(lambda (arg)
                 (gnus-post-method arg ,(car ga))))
index 3d92933..3f25c7a 100644 (file)
@@ -147,6 +147,8 @@ use this option with care."
 (defvar gnus-last-posting-server nil)
 (defvar gnus-message-group-art nil)
 
+(defvar gnus-msg-force-broken-reply-to nil)
+
 (defconst gnus-bug-message
   "Sending a bug report to the Gnus Towers.
 ========================================
@@ -198,6 +200,8 @@ Thank you for your help in stamping out bugs.
   "m" gnus-summary-mail-other-window
   "u" gnus-uu-post-news
   "\M-c" gnus-summary-mail-crosspost-complaint
+  "Br" gnus-summary-reply-broken-reply-to
+  "BR" gnus-summary-reply-broken-reply-to-with-original
   "om" gnus-summary-mail-forward
   "op" gnus-summary-post-forward
   "Om" gnus-uu-digest-mail-forward
@@ -596,10 +600,11 @@ header line with the old Message-ID."
        (when yank
          (gnus-inews-yank-articles yank))))))
 
-(defun gnus-msg-treat-broken-reply-to ()
+(defun gnus-msg-treat-broken-reply-to (&optional force)
   "Remove the Reply-to header iff broken-reply-to."
-  (when (gnus-group-find-parameter
-        gnus-newsgroup-name 'broken-reply-to)
+  (when (or force 
+            (gnus-group-find-parameter
+             gnus-newsgroup-name 'broken-reply-to))
     (save-restriction
       (message-narrow-to-head)
       (message-remove-header "reply-to"))))
@@ -739,7 +744,7 @@ If VERY-WIDE, make a very wide reply."
              (message-narrow-to-head)
              (setq headers (concat headers (buffer-string)))))))
       (set-buffer (gnus-copy-article-buffer))
-      (gnus-msg-treat-broken-reply-to)
+      (gnus-msg-treat-broken-reply-to gnus-msg-force-broken-reply-to)
       (save-restriction
        (message-narrow-to-head)
        (when very-wide
@@ -757,6 +762,24 @@ The original article will be yanked."
   (interactive "P")
   (gnus-summary-reply (gnus-summary-work-articles n) wide))
 
+(defun gnus-summary-reply-broken-reply-to (&optional yank wide very-wide)
+  "Like `gnus-summary-reply' except removing reply-to field.
+If prefix argument YANK is non-nil, the original article is yanked
+automatically.
+If WIDE, make a wide reply.
+If VERY-WIDE, make a very wide reply."
+  (interactive
+   (list (and current-prefix-arg
+             (gnus-summary-work-articles 1))))
+  (let ((gnus-msg-force-broken-reply-to t))
+    (gnus-summary-reply yank wide very-wide)))
+
+(defun gnus-summary-reply-broken-reply-to-with-original (n &optional wide)
+  "Like `gnus-summary-reply-with-original' except removing reply-to field.
+The original article will be yanked."
+  (interactive "P")
+  (gnus-summary-reply-broken-reply-to (gnus-summary-work-articles n) wide))
+
 (defun gnus-summary-wide-reply (&optional yank)
   "Start composing a wide reply mail to the current message.
 If prefix argument YANK is non-nil, the original article is yanked
index b206c53..19504da 100644 (file)
@@ -1922,7 +1922,8 @@ increase the score of each group you read."
              ["Fetch current thread" gnus-summary-refer-thread t]
              ["Fetch article with id..." gnus-summary-refer-article t]
              ["Setup Mailing List Params" gnus-mailing-list-insinuate t]
-             ["Redisplay" gnus-summary-show-article t])))
+             ["Redisplay" gnus-summary-show-article t]
+             ["Raw article" gnus-summary-show-raw-article t])))
       (easy-menu-define
        gnus-summary-article-menu gnus-summary-mode-map ""
        (cons "Article" innards))
@@ -4998,22 +4999,21 @@ The resulting hash table is returned, or nil if no Xrefs were found."
            ;; Subject.
            (progn
              (goto-char p)
-             (if (search-forward "\nsubject: " nil t)
+             (if (search-forward "\nsubject:" nil t)
                  (funcall gnus-decode-encoded-word-function
                           (nnheader-header-value))
                "(none)"))
            ;; From.
            (progn
              (goto-char p)
-             (if (or (search-forward "\nfrom: " nil t)
-                     (search-forward "\nfrom:" nil t))
+             (if (search-forward "\nfrom:" nil t)
                  (funcall gnus-decode-encoded-word-function
                           (nnheader-header-value))
                "(nobody)"))
            ;; Date.
            (progn
              (goto-char p)
-             (if (search-forward "\ndate: " nil t)
+             (if (search-forward "\ndate:" nil t)
                  (nnheader-header-value) ""))
            ;; Message-ID.
            (progn
@@ -5030,7 +5030,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
            ;; References.
            (progn
              (goto-char p)
-             (if (search-forward "\nreferences: " nil t)
+             (if (search-forward "\nreferences:" nil t)
                  (progn
                    (setq end (point))
                    (prog1
@@ -5047,7 +5047,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
                ;; Get the references from the in-reply-to header if there
                ;; were no references and the in-reply-to header looks
                ;; promising.
-               (if (and (search-forward "\nin-reply-to: " nil t)
+               (if (and (search-forward "\nin-reply-to:" nil t)
                         (setq in-reply-to (nnheader-header-value))
                         (string-match "<[^>]+>" in-reply-to))
                    (let (ref2)
@@ -5077,7 +5077,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
            ;; Xref.
            (progn
              (goto-char p)
-             (and (search-forward "\nxref: " nil t)
+             (and (search-forward "\nxref:" nil t)
                   (nnheader-header-value)))
            ;; Extra.
            (when gnus-extra-headers
@@ -5086,7 +5086,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
                (while extra
                  (goto-char p)
                  (when (search-forward
-                        (concat "\n" (symbol-name (car extra)) ": ") nil t)
+                        (concat "\n" (symbol-name (car extra)) ":") nil t)
                    (push (cons (car extra) (nnheader-header-value))
                          out))
                  (pop extra))
@@ -7648,6 +7648,11 @@ without any article massaging functions being run."
   (gnus-summary-goto-subject gnus-current-article)
   (gnus-summary-position-point))
 
+(defun gnus-summary-show-raw-article ()
+  "Show the raw article without any article massaging functions being run."
+  (interactive)
+  (gnus-summary-show-article t))
+
 (defun gnus-summary-verbose-headers (&optional arg)
   "Toggle permanent full header display.
 If ARG is a positive number, turn header display on.
@@ -9552,7 +9557,10 @@ pipe those articles instead."
   (require 'gnus-art)
   (let ((gnus-default-article-saver 'gnus-summary-save-in-pipe))
     (gnus-summary-save-article arg t))
-  (gnus-configure-windows 'pipe))
+  (let ((buffer (get-buffer "*Shell Command Output*")))
+    (if (and buffer 
+             (with-current-buffer buffer (> (point-max) (point-min))))
+        (gnus-configure-windows 'pipe))))
 
 (defun gnus-summary-save-article-mail (&optional arg)
   "Append the current article to an mail file.
index d0dce0c..d757ff5 100644 (file)
@@ -2058,6 +2058,7 @@ with some simple extensions.
 %x   Contents of the Xref: header (string)
 %D   Date of the article (string)
 %d   Date of the article (string) in DD-MMM format
+%o   Date of the article (string) in YYYYMMDD`T'HHMMSS format
 %M   Message-id of the article (string)
 %r   References of the article (string)
 %c   Number of characters in the article (integer)
index 2adeb8f..7d46ca9 100644 (file)
                  (condition-case var
                      (w3-region (point-min) (point-max))
                    (error
+                     (delete-region (point-min) (point-max))
+                     (let ((b (point))
+                           (charset (mail-content-type-get
+                                     (mm-handle-type handle) 'charset)))
+                       (if (or (eq charset 'gnus-decoded)
+                               (eq mail-parse-charset 'gnus-decoded))
+                           (save-restriction
+                             (narrow-to-region (point) (point))
+                             (mm-insert-part handle)
+                             (goto-char (point-max)))
+                         (insert (mm-decode-string (mm-get-part handle) 
+                                                   charset))))
                     (message
                      "Error while rendering html; showing as text/plain"))))))
            (mm-handle-set-undisplayer
index 48754f6..cc5a0e2 100644 (file)
   (autoload 'gnus-sorted-complement "gnus-range"))
 
 (defvar nnheader-max-head-length 4096
-  "*Max length of the head of articles.")
+  "*Max length of the head of articles.
+
+Value is an integer, nil, or t.  Nil means read in chunks of a file
+indefinitely until a complete head is found\; t means always read the
+entire file immediately, disregarding `nnheader-head-chop-length'.
+
+Integer values will in effect be rounded up to the nearest multiple of
+`nnheader-head-chop-length'.")
 
 (defvar nnheader-head-chop-length 2048
   "*Length of each read operation when trying to fetch HEAD headers.")
@@ -182,7 +189,8 @@ on your system, you could say something like:
 ;; Parsing headers and NOV lines.
 
 (defsubst nnheader-header-value ()
-  (buffer-substring (match-end 0) (gnus-point-at-eol)))
+  (skip-chars-forward " \t")
+  (buffer-substring (point) (gnus-point-at-eol)))
 
 (defun nnheader-parse-head (&optional naked)
   (let ((case-fold-search t)
@@ -219,18 +227,17 @@ on your system, you could say something like:
           ;; Subject.
           (progn
             (goto-char p)
-            (if (search-forward "\nsubject: " nil t)
+            (if (search-forward "\nsubject:" nil t)
                 (nnheader-header-value) "(none)"))
           ;; From.
           (progn
             (goto-char p)
-            (if (or (search-forward "\nfrom: " nil t)
-                    (search-forward "\nfrom:" nil t))
+            (if (search-forward "\nfrom:" nil t)
                 (nnheader-header-value) "(nobody)"))
           ;; Date.
           (progn
             (goto-char p)
-            (if (search-forward "\ndate: " nil t)
+            (if (search-forward "\ndate:" nil t)
                 (nnheader-header-value) ""))
           ;; Message-ID.
           (progn
@@ -246,12 +253,12 @@ on your system, you could say something like:
           ;; References.
           (progn
             (goto-char p)
-            (if (search-forward "\nreferences: " nil t)
+            (if (search-forward "\nreferences:" nil t)
                 (nnheader-header-value)
               ;; Get the references from the in-reply-to header if there
               ;; were no references and the in-reply-to header looks
               ;; promising.
-              (if (and (search-forward "\nin-reply-to: " nil t)
+              (if (and (search-forward "\nin-reply-to:" nil t)
                        (setq in-reply-to (nnheader-header-value))
                        (string-match "<[^\n>]+>" in-reply-to))
                   (let (ref2)
@@ -277,7 +284,7 @@ on your system, you could say something like:
           ;; Xref.
           (progn
             (goto-char p)
-            (and (search-forward "\nxref: " nil t)
+            (and (search-forward "\nxref:" nil t)
                  (nnheader-header-value)))
 
           ;; Extra.
@@ -287,7 +294,7 @@ on your system, you could say something like:
               (while extra
                 (goto-char p)
                 (when (search-forward
-                       (concat "\n" (symbol-name (car extra)) ": ") nil t)
+                       (concat "\n" (symbol-name (car extra)) ":") nil t)
                   (push (cons (car extra) (nnheader-header-value))
                         out))
                 (pop extra))