* gnus-art.el (gnus-article-encrypt-body): Inhibit encrypting of a delayed or
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 5 Nov 2002 09:30:02 +0000 (09:30 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 5 Nov 2002 09:30:02 +0000 (09:30 +0000)
 a queued article as well as a draft.

* gnus-sum.el (gnus-summary-edit-article): Inhibit editing of a delayed or a
 queued article in the raw format;
 treat a delayed article as a raw article as well as a draft.
(gnus-summary-setup-default-charset): Clear gnus-newsgroup-charset for the
 delayed group.

* nndraft.el (nndraft-request-article): Ignore auto save files for a delayed
 or a queued article;
 don't bother to decode a queued article;
 don't bind nnmail-file-coding-system for a queued article.

* nnmail.el (nnmail-split-fancy-with-parent): Ignore the delayed and the queue
 group.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-sum.el
lisp/nndraft.el
lisp/nnmail.el

index d41242f..a9915c1 100644 (file)
@@ -1,3 +1,21 @@
+2002-11-05  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-encrypt-body): Inhibit encrypting of
+       a delayed or a queued article as well as a draft.
+
+       * gnus-sum.el (gnus-summary-edit-article): Inhibit editing of a
+       delayed or a queued article in the raw format; treat a delayed
+       article as a raw article as well as a draft.
+       (gnus-summary-setup-default-charset): Clear gnus-newsgroup-charset
+       for the delayed group.
+
+       * nndraft.el (nndraft-request-article): Ignore auto save files for
+       a delayed or a queued article; don't bother to decode a queued
+       article; don't bind nnmail-file-coding-system for a queued article.
+
+       * nnmail.el (nnmail-split-fancy-with-parent): Ignore the delayed
+       and the queue group.
+
 2002-11-04  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-group.el (gnus-group-delete-group):
index 6dafc0a..83e08ab 100644 (file)
@@ -6179,10 +6179,11 @@ For example:
   (let ((func (cdr (assoc protocol gnus-article-encrypt-protocol-alist))))
     (unless func
       (error (format "Can't find the encrypt protocol %s" protocol)))
-    (if (equal gnus-newsgroup-name "nndraft:drafts")
-       (error "Can't encrypt the article in group nndraft:drafts"))
-    (if (equal gnus-newsgroup-name "nndraft:queue")
-       (error "Don't encrypt the article in group nndraft:queue"))
+    (if (member gnus-newsgroup-name '("nndraft:delayed"
+                                     "nndraft:drafts"
+                                     "nndraft:queue"))
+       (error "Can't encrypt the article in group %s"
+              gnus-newsgroup-name))
     (gnus-summary-iterate n
       (save-excursion
        (set-buffer gnus-summary-buffer)
index 997b3fc..00c2ce0 100644 (file)
@@ -8949,8 +8949,12 @@ groups."
                     (setq gnus-article-mime-handles nil))))))
      (t
       (setq force t)))
-    (when (and raw (not force) (equal gnus-newsgroup-name "nndraft:drafts"))
-      (error "Can't edit the raw article in group nndraft:drafts"))
+    (when (and raw (not force)
+              (member gnus-newsgroup-name '("nndraft:delayed"
+                                            "nndraft:drafts"
+                                            "nndraft:queue")))
+      (error "Can't edit the raw article in group %s"
+            gnus-newsgroup-name))
     (save-excursion
       (set-buffer gnus-summary-buffer)
       (let ((mail-parse-charset gnus-newsgroup-charset)
@@ -8963,7 +8967,7 @@ groups."
        (when (and (not raw) (gnus-buffer-live-p gnus-article-buffer))
          (with-current-buffer gnus-article-buffer
            (mm-enable-multibyte)))
-       (if (equal gnus-newsgroup-name "nndraft:drafts")
+       (if (member gnus-newsgroup-name '("nndraft:delayed" "nndraft:drafts"))
            (setq raw t))
        (gnus-article-edit-article
         (if raw 'ignore
@@ -10927,7 +10931,7 @@ UNREAD is a sorted list."
 
 (defun gnus-summary-setup-default-charset ()
   "Setup newsgroup default charset."
-  (if (equal gnus-newsgroup-name "nndraft:drafts")
+  (if (member gnus-newsgroup-name '("nndraft:delayed" "nndraft:drafts"))
       (setq gnus-newsgroup-charset nil)
     (let* ((ignored-charsets
            (or gnus-newsgroup-ephemeral-ignored-charsets
index 2c03bf2..dddd6a6 100644 (file)
     ;; "real" file.
     (let* ((file (nndraft-article-filename id))
           (auto (nndraft-auto-save-file-name file))
-          (newest (if (file-newer-than-file-p file auto) file auto))
+          (newest (if (or (member group '("drafts" "delayed"))
+                          (file-newer-than-file-p file auto))
+                      file
+                    auto))
           (nntp-server-buffer (or buffer nntp-server-buffer))
           ;; The default value for `message-draft-coding-system' was
           ;; `emacs-mule' for Emacs in the past, and the existing draft
           ;; files may have been saved using that coding-system.
           (maybe-emacs-mule-p (and (not (featurep 'xemacs))
+                                   (not (equal "queue" group))
                                    (eq message-draft-coding-system
                                        ;; The present default value.
                                        'iso-2022-7bit)
                                    (mm-coding-system-p 'emacs-mule))))
       (when (and (file-exists-p newest)
-                (let ((nnmail-file-coding-system
-                       (if (file-newer-than-file-p file auto)
-                           (if (member group '("drafts" "delayed"))
-                               (if maybe-emacs-mule-p
-                                   mm-text-coding-system
-                                 message-draft-coding-system)
-                             mm-text-coding-system)
-                         mm-auto-save-coding-system)))
-                  (nnmail-find-file newest)))
+                (if (equal "queue" group)
+                    (nnmail-find-file newest)
+                  (let ((nnmail-file-coding-system
+                         (if (file-newer-than-file-p file auto)
+                             (if (member group '("drafts" "delayed"))
+                                 (if maybe-emacs-mule-p
+                                     mm-text-coding-system
+                                   message-draft-coding-system)
+                               mm-text-coding-system)
+                           mm-auto-save-coding-system)))
+                    (nnmail-find-file newest))))
        (save-excursion
          (set-buffer nntp-server-buffer)
          (when maybe-emacs-mule-p
index 40faa02..1a6aafb 100644 (file)
@@ -1550,7 +1550,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
        (nnmail-cache-open))
       (mapcar (lambda (x)
                (setq res (or (nnmail-cache-fetch-group x) res))
-               (when (or (string= "drafts" res)
+               (when (or (member res '("delayed" "drafts" "queue"))
                          (and regexp res (string-match regexp res)))
                  (setq res nil)))
              references)