Skip to content

Instantly share code, notes, and snippets.

@jonEbird
Created April 10, 2014 21:45
Show Gist options
  • Save jonEbird/10426365 to your computer and use it in GitHub Desktop.
Save jonEbird/10426365 to your computer and use it in GitHub Desktop.
;; Help for attaching buffers and files
; I find it annoying that I have to move to the end of the email to attach
; or suffer the recepients getting the 2nd part of my email in a
; mime-attached generic part
(defun attach-buffer ()
"Call mml-attach-buffer but only after moving to the end of the message"
(interactive)
(save-excursion
(goto-char (point-max))
(call-interactively 'mml-attach-buffer)))
(define-key message-mode-map (kbd "C-c <return> b") 'attach-buffer)
(defun attach-file ()
"Call mml-attach-file but only after moving to the end of the message"
(interactive)
(save-excursion
(goto-char (point-max))
(call-interactively 'mml-attach-file)))
(define-key message-mode-map (kbd "C-c <return> f") 'attach-file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment