aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2005-02-19 13:24:16 +0000
committerMiles Bader <[email protected]>2005-02-19 13:24:16 +0000
commit270a576a4222c76b9483a322769fc4d3d2e29a82 (patch)
treee0be8d073df1534be0a9304b1c5418a64e24e45e /lisp
parent2511035dc74e5637fb020eefdb193f3dd3e810b8 (diff)
Revision: [email protected]/emacs--cvs-trunk--0--patch-111
Merge from gnus--rel--5.10 Patches applied: * [email protected]/gnus--rel--5.10--patch-17 - [email protected]/gnus--rel--5.10--patch-19 Update from CVS * [email protected]/gnus--rel--5.10--patch-20 Merge from emacs--cvs-trunk--0 * [email protected]/gnus--rel--5.10--patch-21 More work on moving images to etc/images * [email protected]/gnus--rel--5.10--patch-22 Update from CVS * [email protected]/gnus--rel--5.10--patch-23 Fix errors with image-file installation 2005-02-19 Katsumi Yamaoka <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * lisp/gnus/nnimap.el (nnimap-debug): Doc fix. * lisp/gnus/imap.el (imap-debug): Doc fix. 2005-02-14 Reiner Steib <[email protected]> * lisp/gnus/gnus-group.el (gnus-group-make-doc-group): Mention prefix argument in doc string. Make query for type more clear.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog32
-rw-r--r--lisp/gnus/gnus-group.el6
-rw-r--r--lisp/gnus/gnus-msg.el3
-rw-r--r--lisp/gnus/gnus-registry.el4
-rw-r--r--lisp/gnus/gnus-sum.el3
-rw-r--r--lisp/gnus/gnus.el15
-rw-r--r--lisp/gnus/imap.el6
-rw-r--r--lisp/gnus/mml.el3
-rw-r--r--lisp/gnus/nnimap.el8
-rw-r--r--lisp/gnus/rfc2047.el66
10 files changed, 127 insertions, 19 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index bc8b89a251..3cf7292dea 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,35 @@
+2005-02-19 Katsumi Yamaoka <[email protected]>
+
+ * 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 <[email protected]>
+
+ * gnus-registry.el (gnus-registry-delete-group): minor bug fix
+
+ * gnus.el (gnus-install-group-spam-parameters): Doc fix.
+
+2005-02-15 Simon Josefsson <[email protected]>
+
+ * nnimap.el (nnimap-debug): Doc fix.
+
+ * imap.el (imap-debug): Doc fix.
+
+2005-02-14 Reiner Steib <[email protected]>
+
+ * 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 <[email protected]>
* gnus.el (gnus-group-startup-message): Search for gnus images in
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 2d6137c0bb..5892235dea 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -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)
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 65b3d78aca..a71dce313d 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -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)))
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 0971fea548..3b7d6e43b4 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -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."
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 1af9e0ca1a..b5467aa592 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -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))
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index f5dcd296d2..fa1da9e82f 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -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.")
diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el
index aba0e88b92..c7f9d60339 100644
--- a/lisp/gnus/imap.el
+++ b/lisp/gnus/imap.el
@@ -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)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 0e018c6890..37f2833773 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -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))
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index c3afd6381c..59b0178de4 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -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 <[email protected]>
@@ -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)
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el
index e6461bf262..6086f422ab 100644
--- a/lisp/gnus/rfc2047.el
+++ b/lisp/gnus/rfc2047.el
@@ -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 <[email protected]>
;; MORIOKA Tomohiko <[email protected]>
@@ -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