[Mail] Move fix to attach files to the end of a message to db-mail
This commit is contained in:
parent
363c5f8108
commit
b1c485e079
36
gnus.el
36
gnus.el
|
@ -1,36 +0,0 @@
|
|||
;;; gnus --- Daniel's Gnus Configuration -*- lexical-binding: t -*-
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Sources:
|
||||
;; - http://page.math.tu-berlin.de/~freundt/.gnus
|
||||
;; - Formatting from http://www.emacswiki.org/emacs/GnusFormatting, Version 3
|
||||
;; - http://www.emacswiki.org/emacs/GnusDemon
|
||||
;; - http://people.irisa.fr/Nicolas.Berthier/file:.gnus.el
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
;;; General
|
||||
|
||||
;; Requires
|
||||
|
||||
(require 'db-mail)
|
||||
|
||||
|
||||
;;; Mail Formatting
|
||||
|
||||
;; http://mbork.pl/2015-11-28_Fixing_mml-attach-file_using_advice
|
||||
(defun db/mml-attach-file--go-to-eob (orig-fun &rest args)
|
||||
"Go to the end of buffer before attaching files."
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (point-max))
|
||||
(apply orig-fun args))))
|
||||
|
||||
(advice-add 'mml-attach-file :around #'db/mml-attach-file--go-to-eob)
|
||||
|
||||
;;;
|
||||
|
||||
t
|
8
init.el
8
init.el
|
@ -1208,7 +1208,8 @@
|
|||
db/gnus-summary-open-Link
|
||||
db/gnus-html-mime-part-to-org
|
||||
db/set-smtp-server-from-header
|
||||
db/gnus-demon-scan-news-on-level-2))
|
||||
db/gnus-demon-scan-news-on-level-2
|
||||
db/mml-attach-file--go-to-eob))
|
||||
|
||||
(use-package bbdb
|
||||
:commands (bbdb-search-name bbab-initialize bbdb-mua-auto-update-init bbdb-save)
|
||||
|
@ -1565,6 +1566,11 @@
|
|||
(replace-match "\n"))
|
||||
t)))
|
||||
|
||||
(use-package mml
|
||||
:defer t
|
||||
:config (advice-add 'mml-attach-file
|
||||
:around #'db/mml-attach-file--go-to-eob))
|
||||
|
||||
(use-package notmuch
|
||||
:defer t
|
||||
:init (setq notmuch-fcc-dirs nil))
|
||||
|
|
|
@ -250,5 +250,17 @@ entry of the current mail."
|
|||
(gnus-group-get-new-news level))))
|
||||
(set-window-configuration win)))))
|
||||
|
||||
|
||||
;; Fixes
|
||||
|
||||
;; http://mbork.pl/2015-11-28_Fixing_mml-attach-file_using_advice
|
||||
(defun db/mml-attach-file--go-to-eob (orig-fun &rest args)
|
||||
"Go to the end of buffer before attaching files."
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (point-max))
|
||||
(apply orig-fun args))))
|
||||
|
||||
(provide 'db-mail)
|
||||
;;; db-mail ends here
|
||||
|
|
Loading…
Reference in New Issue