[Emacs] Simplification and optimisation of org-msg-signature

It’s faster to modify text while it is still in a buffer. The code is
also much simpler and nicer to look at.
This commit is contained in:
Lucien Cartier-Tilet 2022-07-03 12:24:28 +02:00
parent fa2e092f89
commit 1703b07d91
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -2279,13 +2279,11 @@ the export part and write your emails directly in org-mode?
org-msg-convert-citation t
org-msg-greeting-name-limit 3
org-msg-signature (format "\n--\n#+begin_signature\n%s\n#+end_signature"
(string-trim
(replace-regexp-in-string
(regexp-quote "\n")
"\n\n"
(with-temp-buffer
(insert-file-contents mail-signature-file)
(buffer-string))))))
(while (re-search-forward "\n" nil t)
(replace-match "\n\n"))
(buffer-string))))
:general
(phundrak/major-leader-key
:keymaps 'org-msg-edit-mode-map