From: yamaoka Date: Sun, 4 Sep 2005 22:32:18 +0000 (+0000) Subject: Synch to No Gnus 200509041918. X-Git-Tag: t-gnus-6_17_4-quimby-~397 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd2a078732cab89246419b9ce57cf2817807e80c;p=elisp%2Fgnus.git- Synch to No Gnus 200509041918. --- diff --git a/GNUS-NEWS b/GNUS-NEWS index 0e32f3c..a0dcfb8 100644 --- a/GNUS-NEWS +++ b/GNUS-NEWS @@ -1,6 +1,5 @@ GNUS NEWS -- history of user-visible changes. -Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, - 2005 Free Software Foundation, Inc. +Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. See the end for copying conditions. Please send Gnus bug reports to bugs@gnus.org. @@ -41,7 +40,8 @@ data in `~/.newsrc.eld'. format=flowed messages. Also, flowed text is disabled when sending inline PGP signed messages. -** You can now drag and drop attachments to the Message buffer. +** You can now drag and drop attachments to the Message buffer. See +`mml-dnd-protocol-alist' and `mml-dnd-attach-options' *Note MIME::. ** The option `message-yank-empty-prefix' now controls how empty lines are prefixed in cited text. *Note (message)Insertion Variables::. @@ -53,7 +53,7 @@ articles (`gnus-article-treat-ansi-sequences'). ** International host names (IDNA) can now be decoded inside article bodies using `W i' (`gnus-summary-idna-message'). This require that -GNU Libidn (`http://www.gnu.org/software/libidn/') has been installed. +GNU Libidn () has been installed. ** Gnus includes an Emacs Lisp SASL library. @@ -124,8 +124,7 @@ To From Newsgroups::. ---------------------------------------------------------------------- Copyright information: -Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, - 2005 Free Software Foundation, Inc. +Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 13992f8..2532555 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2005-09-04 Reiner Steib + + * mml.el (mml-dnd-protocol-alist, mml-dnd-attach-options): New + variables. + (mml-dnd-attach-file, mml-mode): Use them. + + * nnweb.el (nnweb-type-definition, nnweb-google-wash-article): + Make fetching article by MID work again for Google Groups. Added + FIXME concerning gnus-group-make-web-group. + + * mml-smime.el (mml-smime-sign-query, mml-smime-get-dns-cert): + Don't depend on Gnus by using mail-extract-address-components if + gnus-extract-address-components is not bound. + +2005-09-04 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-mime-display-security): Don't display the + signature, but only the signed part. + 2005-09-02 Katsumi Yamaoka * gnus-sum.el (gnus-thread-hide-subtree): Doc fix. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index d948123..663bdd2 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -7916,7 +7916,7 @@ For example: (narrow-to-region (point) (point)) (unless (gnus-unbuttonized-mime-type-p (car handle)) (gnus-insert-mime-security-button handle)) - (gnus-mime-display-mixed (cdr handle)) + (gnus-mime-display-part (cadr handle)) (unless (bolp) (insert "\n")) (unless (gnus-unbuttonized-mime-type-p (car handle)) diff --git a/lisp/mml-smime.el b/lisp/mml-smime.el index 0c2e2b3..0802dac 100644 --- a/lisp/mml-smime.el +++ b/lisp/mml-smime.el @@ -80,7 +80,10 @@ (list 'keyfile (if (= (length smime-keys) 1) (cadar smime-keys) - (or (let ((from (cadr (funcall gnus-extract-address-components + (or (let ((from (cadr (funcall (if (boundp + 'gnus-extract-address-components) + gnus-extract-address-components + 'mail-extract-address-components) (or (save-excursion (save-restriction (message-narrow-to-headers) @@ -106,7 +109,10 @@ (while (not result) (setq who (read-from-minibuffer (format "%sLookup certificate for: " (or bad "")) - (cadr (funcall gnus-extract-address-components + (cadr (funcall (if (boundp + 'gnus-extract-address-components) + gnus-extract-address-components + 'mail-extract-address-components) (or (save-excursion (save-restriction (message-narrow-to-headers) diff --git a/lisp/mml.el b/lisp/mml.el index 36b8344..116a2ae 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -940,9 +940,7 @@ See Info node `(emacs-mime)Composing'. (easy-menu-add mml-menu mml-mode-map) (when (boundp 'dnd-protocol-alist) (set (make-local-variable 'dnd-protocol-alist) - '(("^file:///" . mml-dnd-attach-file) - ("^file://" . dnd-open-file) - ("^file:" . mml-dnd-attach-file)))) + (append mml-dnd-protocol-alist dnd-protocol-alist))) (run-hooks 'mml-mode-hook))) ;;; @@ -1040,6 +1038,36 @@ See Info node `(emacs-mime)Composing'. ;;; Attachment functions. +(defcustom mml-dnd-protocol-alist + '(("^file:///" . mml-dnd-attach-file) + ("^file://" . dnd-open-file) + ("^file:" . mml-dnd-attach-file)) + "The functions to call when a drop in `mml-mode' is made. +See `dnd-protocol-alist' for more information. When nil, behave +as in other buffers." + :type '(choice (repeat (cons (regexp) (function))) + (const :tag "Behave as in other buffers" nil)) + :version "23.0" ;; No Gnus + :group 'message) + +(defcustom mml-dnd-attach-options nil + "Which options should be queried when attaching a file via drag and drop. + +If it is a list, valid members are `type', `description' and +`disposition'. `disposition' implies `type'. If it is nil, +don't ask for options. If it is t, ask the user whether or not +to specify options." + :type '(choice + (const :tag "Non" nil) + (const :tag "Query" t) + (list :value (type description disposition) + (set :inline t + (const type) + (const description) + (const disposition)))) + :version "23.0" ;; No Gnus + :group 'message) + (defun mml-attach-file (file &optional type description disposition) "Attach a file to the outgoing MIME message. The file is not inserted or encoded until you send the message with @@ -1061,12 +1089,27 @@ description of the attachment." 'description description)) (defun mml-dnd-attach-file (uri action) - "Attach a drag and drop file." + "Attach a drag and drop file. + +Ask for type, description or disposition according to +`mml-dnd-attach-options'." (let ((file (dnd-get-local-file-name uri t))) (when (and file (file-regular-p file)) - (let* ((type (mml-minibuffer-read-type file)) - (description (mml-minibuffer-read-description)) - (disposition (mml-minibuffer-read-disposition type))) + (let ((mml-dnd-attach-options mml-dnd-attach-options) + type description disposition) + (setq mml-dnd-attach-options + (when (and (eq mml-dnd-attach-options t) + (not + (y-or-n-p + "Use default type, disposition and description? "))) + '(type description disposition))) + (when (or (memq 'type mml-dnd-attach-options) + (memq 'disposition mml-dnd-attach-options)) + (setq type (mml-minibuffer-read-type file))) + (when (memq 'description mml-dnd-attach-options) + (setq description (mml-minibuffer-read-description))) + (when (memq 'disposition mml-dnd-attach-options) + (setq disposition (mml-minibuffer-read-disposition type))) (mml-attach-file file type description disposition))))) (defun mml-attach-buffer (buffer &optional type description) diff --git a/lisp/nnweb.el b/lisp/nnweb.el index d4f85ae..2e7c315 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -27,6 +27,12 @@ ;; Note: You need to have `w3' installed for some functions to work. +;; FIXME: Due to changes in the HTML output of Google Groups and Gmane, stuff +;; related to web groups (gnus-group-make-web-group) doesn't work anymore. + +;; Fetching an article by MID (cf. gnus-refer-article-method) over Google +;; Groups should work. + ;;; Code: (eval-when-compile (require 'cl)) @@ -54,13 +60,13 @@ Valid types include `google', `dejanews', and `gmane'.") (defvar nnweb-type-definition '((google - (article . ignore) - (id . "http://groups.google.de/groups?selm=%s&output=gplain") + (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source") + (article . nnweb-google-wash-article) (reference . identity) (map . nnweb-google-create-mapping) (search . nnweb-google-search) - (address . "http://groups.google.de/groups") - (base . "http://groups.google.de") + (address . "http://groups.google.com/groups") + (base . "http://groups.google.com") (identifier . nnweb-google-identity)) (dejanews ;; alias of google (article . ignore) @@ -306,35 +312,19 @@ Valid types include `google', `dejanews', and `gmane'.") (current-buffer)))))) ;;; -;;; Deja bought by google.com +;;; groups.google.com ;;; (defun nnweb-google-wash-article () - (let ((case-fold-search t) url) - (goto-char (point-min)) - (re-search-forward "^
" nil t)
-    (narrow-to-region (point-min) (point))
-    (search-backward "" nil t)
-      (replace-match "\n"))
-    (mm-url-remove-markup)
+    (delete-region (point-min)
+		   (1+ (re-search-forward "^
" nil t)))
     (goto-char (point-min))
-    (while (re-search-forward "^[ \t]*\n" nil t)
-      (replace-match ""))
-    (goto-char (point-max))
-    (insert "\n")
-    (widen)
-    (narrow-to-region (point) (point-max))
-    (search-forward "
" nil t) - (delete-region (point) (point-max)) - (mm-url-remove-markup) - (widen))) + (delete-region (- (re-search-forward "^" nil t) (length "")) + (point-max)) + (mm-url-decode-entities))) (defun nnweb-google-parse-1 (&optional Message-ID) (let ((i 0) diff --git a/texi/ChangeLog b/texi/ChangeLog index b2c6f9a..1c347d8 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,10 @@ +2005-09-04 Reiner Steib + + * message.texi (MIME): Describe mml-dnd-protocol-alist and + mml-dnd-attach-options. + + * gnus-news.texi: Added reference. + 2005-09-02 Katsumi Yamaoka * gnus.texi (Choosing Variables): Fix descriptions. diff --git a/texi/gnus-news.texi b/texi/gnus-news.texi index 6942d8b..fb8af6f 100644 --- a/texi/gnus-news.texi +++ b/texi/gnus-news.texi @@ -53,6 +53,8 @@ format=flowed messages. Also, flowed text is disabled when sending inline @acronym{PGP} signed messages. @item You can now drag and drop attachments to the Message buffer. +See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options} +@xref{MIME}. @item The option @code{message-yank-empty-prefix} now controls how empty lines are prefixed in cited text. diff --git a/texi/message-ja.texi b/texi/message-ja.texi index fdca168..b00e8f8 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -811,10 +811,21 @@ automatically add the @code{Content-Type} and @code{Content-Transfer-Encoding} headers. The most typical thing users want to use the multipart things in -@acronym{MIME} for is to add ``attachments'' to mail they send out. This can -be done with the @kbd{C-c C-a} command, which will prompt for a file -name and a @acronym{MIME} type. If your Emacs supports drag -and drop, you can also drop the file in the Message buffer. +@acronym{MIME} for is to add ``attachments'' to mail they send out. +This can be done with the @kbd{C-c C-a} command, which will prompt for +a file name and a @acronym{MIME} type. + +@vindex mml-dnd-protocol-alist +@vindex mml-dnd-attach-options +If your Emacs supports drag and drop, you can also drop the file in the +Message buffer. The variable @code{mml-dnd-protocol-alist} specifies +what kind of action is done when you drop a file into the Message +buffer. The variable @code{mml-dnd-attach-options} controls which +@acronym{MIME} options you want to specify when dropping a file. If it +is a list, valid members are @code{type}, @code{description} and +@code{disposition}. @code{disposition} implies @code{type}. If it is +@code{nil}, don't ask for options. If it is @code{t}, ask the user +whether or not to specify options. You can also create arbitrarily complex multiparts using the @acronym{MML} language (@pxref{Composing, , Composing, emacs-mime, The Emacs MIME diff --git a/texi/message.texi b/texi/message.texi index dc4c502..d14307d 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -813,8 +813,19 @@ automatically add the @code{Content-Type} and The most typical thing users want to use the multipart things in @acronym{MIME} for is to add ``attachments'' to mail they send out. This can be done with the @kbd{C-c C-a} command, which will prompt for -a file name and a @acronym{MIME} type. If your Emacs supports drag -and drop, you can also drop the file in the Message buffer. +a file name and a @acronym{MIME} type. + +@vindex mml-dnd-protocol-alist +@vindex mml-dnd-attach-options +If your Emacs supports drag and drop, you can also drop the file in the +Message buffer. The variable @code{mml-dnd-protocol-alist} specifies +what kind of action is done when you drop a file into the Message +buffer. The variable @code{mml-dnd-attach-options} controls which +@acronym{MIME} options you want to specify when dropping a file. If it +is a list, valid members are @code{type}, @code{description} and +@code{disposition}. @code{disposition} implies @code{type}. If it is +@code{nil}, don't ask for options. If it is @code{t}, ask the user +whether or not to specify options. You can also create arbitrarily complex multiparts using the @acronym{MML} language (@pxref{Composing, , Composing, emacs-mime, The Emacs MIME