diff --git a/gnus.el b/gnus.el deleted file mode 100644 index 4c2318c..0000000 --- a/gnus.el +++ /dev/null @@ -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 diff --git a/init.el b/init.el index 46f38ef..f979e87 100644 --- a/init.el +++ b/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)) diff --git a/site-lisp/db-mail.el b/site-lisp/db-mail.el index dadd79f..af80c21 100644 --- a/site-lisp/db-mail.el +++ b/site-lisp/db-mail.el @@ -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