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 e95f9e072c0ebfcc6a79e0f8653ea95248c31b2f
parent 4760d40261ddd2496961d0443239b170c596d04f
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun,  8 Dec 2024 10:29:30 +0100

add infomigrants

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

diff --git a/email-eww.el b/email-eww.el @@ -323,6 +323,31 @@ (replace-match ""))) (message-goto-body)) +(defun clean-up-infomigrants () + (forward-line 1) + (let ((start (point))) + (search-forward "Published on : " nil t) + (beginning-of-line) + (backward-paragraph 2) + (delete-region (point) start) + ;; tail + (goto-char (point-max)) + (search-backward "More articles" nil t) + (beginning-of-line) + (forward-line -1) + (delete-region (point) (point-max)) + ;; other + (goto-char start) + (while (re-search-forward "^*\n" nil t) + (replace-match "")) + (goto-char start) + (while (re-search-forward "^Also read: " nil t) + (beginning-of-line) + (forward-line -1) + (kill-paragraph 1)) + ) + (message-goto-body)) + (defun email-eww () (interactive) (let ((content (buffer-string)) @@ -370,6 +395,8 @@ (clean-up-wsws)) ((string-match "euractiv.com" url) (clean-up-euractiv)) + ((string-match "infomigrants.net" url) + (clean-up-infomigrants)) ) (goto-char (point-max)) (delete-blank-lines)