I’m assuming you already know what mu4e is and how to edit your ~/.emacs
file, otherwise you wouldn’t be interested.
I put the following in my ~/.emacs
, and it works for me!
(setq mu4e-compose-signature-auto-include nil)
;; Signature above reply:
(defun message-insert-signature () nil)
(defun my-mu4e-insert-signature-above-reply ()
"Insert signature just above the quoted reply when composing"
(save-excursion
(goto-char (point-min))
(when (re-search-forward "^--text follows this line--" nil t)
(forward-line)
(insert (concat mu4e-compose-signature "\n\n")))))
(add-hook 'mu4e-compose-mode-hook #'my-mu4e-insert-signature-above-reply)
;; this is where I tell mu4e what signature to use
(setq message-signature "\n\n--\nbgc")
And now when I reply, I get my signature above, and I don’t have to copy it from below every time!
To use with contexts:
(defun my-mu4e-insert-signature-above-reply ()
“Insert signature just above the quoted reply when composing”
(save-excursion
(goto-char (point-min))
(when (re-search-forward “^–text follows this line–” nil t)
(forward-line)
(insert (concat “\n–\n”
(f-read-text (concat message-signature-directory message-signature-file)))) )))