+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>
+ * 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.
(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)
(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))
(> (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)))
;;;
'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."
+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
@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
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
@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