@table @kbd
@item C-c C-m C-a
@findex gnus-dired-attach
+@vindex gnus-dired-attach-at-end
@cindex attachments, selection via dired
Send dired's marked files as an attachment (@code{gnus-dired-attach}).
-You will be prompted for a message buffer.
+You will be prompted for a message buffer. By default it will attach
+files to the end of the message buffer, but you can modify that
+behaviour by customising @code{gnus-dired-attach-at-end}.
@item C-c C-m C-l
@findex gnus-dired-find-file-mailcap
(autoload 'gnus-completing-read "gnus-util")
+(defcustom gnus-dired-attach-at-end t
+ "Non-nil means that files should be attached at the end of a buffer."
+ :group 'mail ;; dired?
+ :version "30.1"
+ :type 'boolean)
+
;; Method to attach files to a mail composition.
(defun gnus-dired-attach (files-to-attach)
"Attach dired's marked files to a gnus message composition.
;; set buffer to destination buffer, and attach files
(set-buffer destination)
- (goto-char (point-max)) ;attach at end of buffer
+ (when gnus-dired-attach-at-end
+ (goto-char (point-max))) ;attach at end of buffer
(while files-to-attach
(mml-attach-file (car files-to-attach)
(or (mm-default-file-type (car files-to-attach))