email-eww

Emacs library to send region or eww buffer by email
git clone https://logand.com/git/email-eww.git/
Log | Files | Refs

commit 97f4789ace879e2d2b6d10d38014cfacd5899b59
parent 6b8fb31afd945b7dccf8f1db28bccbda5905f7f2
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun, 31 Dec 2023 21:16:21 +0100

add email-w3m

Diffstat:
Memail-eww.el | 24++++++++++++++++++++++++
1 file changed, 24 insertions(+), 0 deletions(-)

diff --git a/email-eww.el b/email-eww.el @@ -337,4 +337,28 @@ (delete-blank-lines) (message-goto-to))) +(defun email-w3m (url) + (when url + (let ((b (get-buffer-create url))) + (shell-command (concat "w3m -dump " (shell-quote-argument url)) b b) + (with-current-buffer b + (email-region (point-min) (point-max)) + (message-goto-body) + (insert url) + (insert "\n\n") + (cond + ((or + (string-match "serverfault.com" url) + (string-match "stackexchange.com" url) + (string-match "stackoverflow.com" url) + (string-match "superuser.com" url) + ) + (search-forward "Ask Question" nil t) + (beginning-of-line) + (backward-paragraph 1) + (beginning-of-line) + (forward-line 3) + (delete-region (point) start) + (clean-up-stackoverflow))) + (message-goto-to))))) (provide 'email-eww)