]> git.eshelyaron.com Git - emacs.git/commitdiff
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-111
authorMiles Bader <miles@gnu.org>
Sat, 19 Feb 2005 13:24:16 +0000 (13:24 +0000)
committerMiles Bader <miles@gnu.org>
Sat, 19 Feb 2005 13:24:16 +0000 (13:24 +0000)
Merge from gnus--rel--5.10

Patches applied:

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-17
 - miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-19
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-20
   Merge from emacs--cvs-trunk--0

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-21
   More work on moving images to etc/images

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-22
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-23
   Fix errors with image-file installation

2005-02-19  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/gnus-msg.el (gnus-copy-article-buffer): Quote decoded words
   containing special characters.

   * lisp/gnus/gnus-sum.el (gnus-summary-edit-article): Ditto.

   * lisp/gnus/mml.el (mime-to-mml): Ditto.

   * lisp/gnus/rfc2047.el (rfc2047-encode-parameter): Use ietf-drums-tspecials.
   (rfc2047-quote-decoded-words-containing-tspecials): New variable.
   (rfc2047-decode-region): Quote decoded words containing special
   characters when rfc2047-quote-decoded-words-containing-tspecials
   is non-nil.

2005-02-16  Teodor Zlatanov  <tzz@lifelogs.com>

   * lisp/gnus/gnus-registry.el (gnus-registry-delete-group): minor bug fix

   * lisp/gnus/gnus.el (gnus-install-group-spam-parameters): Doc fix.

2005-02-15  Simon Josefsson  <jas@extundo.com>

   * lisp/gnus/nnimap.el (nnimap-debug): Doc fix.

   * lisp/gnus/imap.el (imap-debug): Doc fix.

2005-02-14  Reiner Steib  <Reiner.Steib@gmx.de>

   * lisp/gnus/gnus-group.el (gnus-group-make-doc-group): Mention prefix
   argument in doc string.  Make query for type more clear.

lisp/gnus/ChangeLog
lisp/gnus/gnus-group.el
lisp/gnus/gnus-msg.el
lisp/gnus/gnus-registry.el
lisp/gnus/gnus-sum.el
lisp/gnus/gnus.el
lisp/gnus/imap.el
lisp/gnus/mml.el
lisp/gnus/nnimap.el
lisp/gnus/rfc2047.el

index bc8b89a25196dd8d7eeb56a1e4d8a8b068e43e68..3cf7292deace465427894abc5e56ef633e8988dd 100644 (file)
@@ -1,3 +1,35 @@
+2005-02-19  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-msg.el (gnus-copy-article-buffer): Quote decoded words
+       containing special characters.
+
+       * gnus-sum.el (gnus-summary-edit-article): Ditto.
+
+       * mml.el (mime-to-mml): Ditto.
+
+       * rfc2047.el (rfc2047-encode-parameter): Use ietf-drums-tspecials.
+       (rfc2047-quote-decoded-words-containing-tspecials): New variable.
+       (rfc2047-decode-region): Quote decoded words containing special
+       characters when rfc2047-quote-decoded-words-containing-tspecials
+       is non-nil.
+
+2005-02-16  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-registry.el (gnus-registry-delete-group): minor bug fix
+
+       * gnus.el (gnus-install-group-spam-parameters): Doc fix.
+
+2005-02-15  Simon Josefsson  <jas@extundo.com>
+
+       * nnimap.el (nnimap-debug): Doc fix.
+
+       * imap.el (imap-debug): Doc fix.
+
+2005-02-14  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * gnus-group.el (gnus-group-make-doc-group): Mention prefix
+       argument in doc string.  Make query for type more clear.
+
 2005-02-13  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus.el (gnus-group-startup-message): Search for gnus images in
index 2d6137c0bb552949fc0a342c9ae0e738e67fdae5..5892235deac096c0967b4eb533ff245d924dc5da 100644 (file)
@@ -2502,7 +2502,9 @@ group already exists:
   (gnus-group-position-point))
 
 (defun gnus-group-make-doc-group (file type)
-  "Create a group that uses a single file as the source."
+  "Create a group that uses a single file as the source.
+
+If called with a prefix argument, ask for the file type."
   (interactive
    (list (read-file-name "File name: ")
         (and current-prefix-arg 'ask)))
@@ -2511,7 +2513,7 @@ group already exists:
          char found)
       (while (not found)
        (message
-        "%sFile type (mbox, babyl, digest, forward, mmdf, guess) [mbdfag]: "
+        "%sFile type (mbox, babyl, digest, forward, mmdf, guess) [m, b, d, f, a, g]: "
         err)
        (setq found (cond ((= (setq char (read-char)) ?m) 'mbox)
                          ((= char ?b) 'babyl)
index 65b3d78aca3e3ca0d57233c5a35eb58b0fba6594..a71dce313d6fc968843a8cd9ec5c60e945f77322 100644 (file)
@@ -876,7 +876,8 @@ header line with the old Message-ID."
            ;; Decode charsets.
            (let ((gnus-article-decode-hook
                   (delq 'article-decode-charset
-                        (copy-sequence gnus-article-decode-hook))))
+                        (copy-sequence gnus-article-decode-hook)))
+                 (rfc2047-quote-decoded-words-containing-tspecials t))
              (run-hooks 'gnus-article-decode-hook)))))
       gnus-article-copy)))
 
index 0971fea5485a3658edaad17677c33fb8224a709a..3b7d6e43b43010ad0a3775e29c6d17e8891aaf51 100644 (file)
@@ -606,7 +606,9 @@ Returns the first place where the trail finds a group name."
       (when gnus-registry-trim-articles-without-groups
        (unless (gnus-registry-group-count id)
          (gnus-registry-delete-id id)))
-      (gnus-registry-store-extra-entry id 'mtime (current-time)))))
+      ;; is this ID still in the registry?
+      (when (gethash id gnus-registry-hashtb)
+       (gnus-registry-store-extra-entry id 'mtime (current-time))))))
 
 (defun gnus-registry-delete-id (id)
   "Delete a message ID from the registry."
index 1af9e0ca1a73c746e82c9f69bce713e931fb03cd..b5467aa5921fe75e368fd183451e97828b267829 100644 (file)
@@ -9485,7 +9485,8 @@ groups."
           `(lambda ()
              (let ((mbl mml-buffer-list))
                (setq mml-buffer-list nil)
-               (mime-to-mml ,'current-handles)
+               (let ((rfc2047-quote-decoded-words-containing-tspecials t))
+                 (mime-to-mml ,'current-handles))
                (let ((mbl1 mml-buffer-list))
                  (setq mml-buffer-list mbl)
                  (set (make-local-variable 'mml-buffer-list) mbl1))
index f5dcd296d2bf239213ffe1ceff755d2ee72da037..fa1da9e82f8e00f2e77f8ca774eb4ba151c40a85 100644 (file)
@@ -1819,11 +1819,12 @@ registry.")
    :variable gnus-spam-newsgroup-contents
    :variable-default nil
    :variable-document
-   "*Groups in which to automatically mark new articles as spam on
-summary entry.  If non-nil, this should be a list of group name
-regexps that should match all groups in which to do automatic spam
-tagging, associated with a classification (spam, ham, or neither).
-This only makes sense for mail groups."
+   "*Group classification (spam, ham, or neither).  Only
+meaningful when spam.el is loaded.  If non-nil, this should be a
+list of group name regexps associated with a classification for
+each one.  In spam groups, new articles are marked as spam on
+summary entry.  There is other behavior associated with ham and
+no classification when spam.el is loaded - see the manual."
    :variable-group spam
    :variable-type '(repeat
                    (list :tag "Group contents spam/ham classification"
@@ -1840,7 +1841,9 @@ This only makes sense for mail groups."
                                  (const :tag "Unclassified" nil)))
    :parameter-document
    "The spam classification (spam, ham, or neither) of this group.
-When a spam group is entered, all unread articles are marked as spam.")
+When a spam group is entered, all unread articles are marked as
+spam.  There is other behavior associated with ham and no
+classification when spam.el is loaded - see the manual.")
 
   (defvar gnus-group-spam-exit-processor-ifile "ifile"
     "OBSOLETE: The ifile summary exit spam processor.")
index aba0e88b92f07688ab1195c340003766a57ccc99..c7f9d60339fb0be492bb2de92acf45fc391444b5 100644 (file)
@@ -250,7 +250,11 @@ variable unless you are comfortable with that."
   :type 'boolean)
 
 (defcustom imap-debug nil
-  "If non-nil, random debug spews are placed in *imap-debug* buffer."
+  "If non-nil, random debug spews are placed in *imap-debug* buffer.
+Note that username, passwords and other privacy sensitive
+information (such as e-mail) may be stored in the *imap-debug*
+buffer.  It is not written to disk, however.  Do not enable this
+variable unless you are comfortable with that."
   :group 'imap
   :type 'boolean)
 
index 0e018c6890321ca52d2b3141612f54a7148ef7a1..37f28337733f59e2fc7f52f4ec222ccb0a841948 100644 (file)
@@ -710,7 +710,8 @@ If HANDLES is non-nil, use it instead reparsing the buffer."
   ;; First decode the head.
   (save-restriction
     (message-narrow-to-head)
-    (mail-decode-encoded-word-region (point-min) (point-max)))
+    (let ((rfc2047-quote-decoded-words-containing-tspecials t))
+      (mail-decode-encoded-word-region (point-min) (point-max))))
   (unless handles
     (setq handles (mm-dissect-buffer t)))
   (goto-char (point-min))
index c3afd6381caa8c3ab4834dd5c647ce08b010fda3..59b0178de421299ac806d94e4f3537bc04f7a39e 100644 (file)
@@ -1,5 +1,5 @@
 ;;; nnimap.el --- imap backend for Gnus
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <jas@pdc.kth.se>
@@ -409,7 +409,11 @@ If this is 'imap-mailbox-lsub, then use a server-side subscription list to
 restrict visible folders.")
 
 (defcustom nnimap-debug nil
-  "If non-nil, random debug spews are placed in *nnimap-debug* buffer."
+  "If non-nil, random debug spews are placed in *nnimap-debug* buffer.
+Note that username, passwords and other privacy sensitive
+information (such as e-mail) may be stored in the *nnimap-debug*
+buffer.  It is not written to disk, however.  Do not enable this
+variable unless you are comfortable with that."
   :group 'nnimap
   :type 'boolean)
 
index e6461bf2627b0dbe494bfdc150fae906f4e25037..6086f422abdb296945a6d19700294dd39f2ea2d4 100644 (file)
@@ -1,5 +1,7 @@
 ;;; rfc2047.el --- functions for encoding and decoding rfc2047 messages
-;; Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+
+;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005
+;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;     MORIOKA Tomohiko <morioka@jaist.ac.jp>
@@ -50,6 +52,7 @@ Value is what BODY returns."
 
 (require 'qp)
 (require 'mm-util)
+(require 'ietf-drums)
 ;; Fixme: Avoid this (used for mail-parse-charset) mm dependence on gnus.
 (require 'mail-prsvr)
 (require 'base64)
@@ -639,6 +642,9 @@ By default, the region is treated as containing addresses (see
     "=\\?\\([^][\000-\040()<>@,\;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\
 \\?\\([!->@-~ +]*\\)\\?="))
 
+(defvar rfc2047-quote-decoded-words-containing-tspecials nil
+  "If non-nil, quote decoded words containing special characters.")
+
 ;; Fixme: This should decode in place, not cons intermediate strings.
 ;; Also check whether it needs to worry about delimiting fields like
 ;; encoding.
@@ -673,14 +679,66 @@ By default, the region is treated as containing addresses (see
          (insert (rfc2047-parse-and-decode
                   (prog1
                       (match-string 0)
-                    (delete-region (match-beginning 0) (match-end 0)))))
-         ;; Remove newlines between decoded words, though such things
-         ;; essentially must not be there.
+                    (delete-region e (match-end 0)))))
+         (while (looking-at rfc2047-encoded-word-regexp)
+           (insert (rfc2047-parse-and-decode
+                    (prog1
+                        (match-string 0)
+                      (delete-region (point) (match-end 0))))))
          (save-restriction
            (narrow-to-region e (point))
            (goto-char e)
+           ;; Remove newlines between decoded words, though such
+           ;; things essentially must not be there.
            (while (re-search-forward "[\n\r]+" nil t)
              (replace-match " "))
+           ;; Quote decoded words if there are special characters
+           ;; which might violate RFC2822.
+           (when (and rfc2047-quote-decoded-words-containing-tspecials
+                      (let ((regexp (car (rassq
+                                          'address-mime
+                                          rfc2047-header-encoding-alist))))
+                        (when regexp
+                          (save-restriction
+                            (widen)
+                            (beginning-of-line)
+                            (while (and (memq (char-after) '(?  ?\t))
+                                        (zerop (forward-line -1))))
+                            (looking-at regexp)))))
+             (let (quoted)
+               (goto-char e)
+               (skip-chars-forward " \t")
+               (setq start (point))
+               (setq quoted (eq (char-after) ?\"))
+               (goto-char (point-max))
+               (skip-chars-backward " \t")
+               (if (setq quoted (and quoted
+                                     (> (point) (1+ start))
+                                     (eq (char-before) ?\")))
+                   (progn
+                     (backward-char)
+                     (setq start (1+ start)
+                           end (point-marker)))
+                 (setq end (point-marker)))
+               (goto-char start)
+               (while (search-forward "\"" end t)
+                 (when (prog2
+                           (backward-char)
+                           (zerop (% (skip-chars-backward "\\\\") 2))
+                         (goto-char (match-beginning 0)))
+                   (insert "\\"))
+                 (forward-char))
+               (when (and (not quoted)
+                          (progn
+                            (goto-char start)
+                            (re-search-forward
+                             (concat "[" ietf-drums-tspecials "]")
+                             end t)))
+                 (goto-char start)
+                 (insert "\"")
+                 (goto-char end)
+                 (insert "\""))
+               (set-marker end nil)))
            (goto-char (point-max)))
          (when (and (mm-multibyte-p)
                     mail-parse-charset