Synch to No Gnus 200402070252.
authoryamaoka <yamaoka>
Sat, 7 Feb 2004 13:22:10 +0000 (13:22 +0000)
committeryamaoka <yamaoka>
Sat, 7 Feb 2004 13:22:10 +0000 (13:22 +0000)
lisp/ChangeLog
lisp/mml.el
texi/ChangeLog
texi/gnus-news.texi
texi/message-ja.texi
texi/message.texi

index 5fb0823..6976d25 100644 (file)
@@ -1,5 +1,12 @@
+2004-02-07  Jesper Harder  <harder@ifa.au.dk>
+
+       * mml.el (mml-compute-boundary-1): Don't uncompress files.
+
 2004-02-06  Jesper Harder  <harder@ifa.au.dk>
 
 2004-02-06  Jesper Harder  <harder@ifa.au.dk>
 
+       * mml.el (mml-mode, mml-x-dnd-attach-file): Attach drop and drag
+       files.
+
        * message.el (message-generate-headers-first): Don't quote nil
        and t in docstrings.
 
        * message.el (message-generate-headers-first): Don't quote nil
        and t in docstrings.
 
index 40b4a0d..157ea0e 100644 (file)
@@ -37,7 +37,8 @@
   (autoload 'gnus-make-local-hook "gnus-util")
   (autoload 'message-fetch-field "message")
   (autoload 'fill-flowed-encode "flow-fill")
   (autoload 'gnus-make-local-hook "gnus-util")
   (autoload 'message-fetch-field "message")
   (autoload 'fill-flowed-encode "flow-fill")
-  (autoload 'message-posting-charset "message"))
+  (autoload 'message-posting-charset "message")
+  (autoload 'x-dnd-get-local-file-name "x-dnd"))
 
 (defcustom mml-content-type-parameters
   '(name access-type expiration size permission format)
 
 (defcustom mml-content-type-parameters
   '(name access-type expiration size permission format)
@@ -582,7 +583,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
          (insert-buffer-substring (cdr (assq 'buffer cont))))
         ((and (setq filename (cdr (assq 'filename cont)))
               (not (equal (cdr (assq 'nofile cont)) "yes")))
          (insert-buffer-substring (cdr (assq 'buffer cont))))
         ((and (setq filename (cdr (assq 'filename cont)))
               (not (equal (cdr (assq 'nofile cont)) "yes")))
-         (mm-insert-file-contents filename))
+         (mm-insert-file-contents filename nil nil nil nil t))
         (t
          (insert (cdr (assq 'contents cont)))))
        (goto-char (point-min))
         (t
          (insert (cdr (assq 'contents cont)))))
        (goto-char (point-min))
@@ -888,6 +889,11 @@ See Info node `(emacs-mime)Composing'.
               (> (prefix-numeric-value arg) 0)))
     (add-minor-mode 'mml-mode " MML" mml-mode-map)
     (easy-menu-add mml-menu mml-mode-map)
               (> (prefix-numeric-value arg) 0)))
     (add-minor-mode 'mml-mode " MML" mml-mode-map)
     (easy-menu-add mml-menu mml-mode-map)
+    (when (boundp 'x-dnd-protocol-alist)
+      (set (make-local-variable 'x-dnd-protocol-alist)
+          '(("^file:///" . mml-x-dnd-attach-file)
+            ("^file://"  . x-dnd-open-file)
+            ("^file:"    . mml-x-dnd-attach-file))))
     (run-hooks 'mml-mode-hook)))
 
 ;;;
     (run-hooks 'mml-mode-hook)))
 
 ;;;
@@ -1005,6 +1011,15 @@ description of the attachment."
                        'disposition (or disposition "attachment")
                        'description description))
 
                        'disposition (or disposition "attachment")
                        'description description))
 
+(defun mml-x-dnd-attach-file (uri action)
+  "Attach a drag and drop file."
+  (let ((file (x-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)))
+       (mml-attach-file file type description disposition)))))
+
 (defun mml-attach-buffer (buffer &optional type description)
   "Attach a buffer to the outgoing MIME message.
 See `mml-attach-file' for details of operation."
 (defun mml-attach-buffer (buffer &optional type description)
   "Attach a buffer to the outgoing MIME message.
 See `mml-attach-file' for details of operation."
index 990cc2d..cf09028 100644 (file)
@@ -1,3 +1,9 @@
+2004-02-06  Jesper Harder  <harder@ifa.au.dk>
+
+       * gnus-news.texi: dnd attachments.
+
+       * message.texi (MIME): do.
+
 2004-02-03  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus.texi (Batching Agents): Fixed typo in example.  Reported
 2004-02-03  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus.texi (Batching Agents): Fixed typo in example.  Reported
index b06ab77..800951e 100644 (file)
@@ -18,6 +18,8 @@ this file (see `gnus-news.el').
 
 @itemize @bullet
 
 
 @itemize @bullet
 
+@item You can now drag and drop attachments to the Message buffer.
+
 @item @kbd{/ r} limits the summary buffer to replied articles.
 
 @item @acronym{ANSI} @acronym{SGR} control sequences can be transformed
 @item @kbd{/ r} limits the summary buffer to replied articles.
 
 @item @acronym{ANSI} @acronym{SGR} control sequences can be transformed
index 0387d28..0fafafa 100644 (file)
@@ -845,7 +845,8 @@ 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
 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.
+name and a @acronym{MIME} type.  If your Emacs supports drag
+and drop, you can also drop the file in the Message buffer.
 
 You can also create arbitrarily complex multiparts using the @acronym{MML}
 language (@pxref{Composing, , Composing, emacs-mime, The Emacs MIME
 
 You can also create arbitrarily complex multiparts using the @acronym{MML}
 language (@pxref{Composing, , Composing, emacs-mime, The Emacs MIME
index 5cc5e05..3238ca6 100644 (file)
@@ -828,9 +828,10 @@ automatically add the @code{Content-Type} and
 @code{Content-Transfer-Encoding} headers.
 
 The most typical thing users want to use the multipart things in
 @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.
+@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.
 
 You can also create arbitrarily complex multiparts using the @acronym{MML}
 language (@pxref{Composing, , Composing, emacs-mime, The Emacs MIME
 
 You can also create arbitrarily complex multiparts using the @acronym{MML}
 language (@pxref{Composing, , Composing, emacs-mime, The Emacs MIME