summaryrefslogtreecommitdiffhomepage
path: root/gnus.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-07-23 23:00:49 +0100
committerjao <jao@gnu.org>2021-07-23 23:02:05 +0100
commit6e37fbd370988f0ed076a2395fa187e86df6beb7 (patch)
tree7ac683ca151345ea7ab74a79667021f747d10a67 /gnus.org
parent32165482c63f3a772e843366154bc2461e21ad97 (diff)
downloadelibs-6e37fbd370988f0ed076a2395fa187e86df6beb7.tar.gz
elibs-6e37fbd370988f0ed076a2395fa187e86df6beb7.tar.bz2
gnus: cleaner arxiv From: washing
Diffstat (limited to 'gnus.org')
-rw-r--r--gnus.org28
1 files changed, 11 insertions, 17 deletions
diff --git a/gnus.org b/gnus.org
index d4ccd43..d5349b4 100644
--- a/gnus.org
+++ b/gnus.org
@@ -512,18 +512,14 @@
" "))))
(defconst jao-gnus--news-rx
- (regexp-opt '("ElDiaro.es " "The Guardian: ")))
+ (regexp-opt '("ElDiaro.es "
+ "ElDiario.es - ElDiario.es: "
+ "The Guardian: ")))
(defun gnus-user-format-function-f (headers)
(let* ((from (gnus-header-from headers))
- (from (gnus-summary-extract-address-component from))
- (shr-width 1000))
- (if nil ;; (string-match-p ".* .+updates on arXiv.org: +\\(.+\\)" from)
- (with-temp-buffer
- (insert (match-string 1 from))
- (shr-render-buffer (current-buffer))
- (buffer-string))
- (replace-regexp-in-string jao-gnus--news-rx "" from))))
+ (from (gnus-summary-extract-address-component from)))
+ (replace-regexp-in-string jao-gnus--news-rx "" from)))
(setq gnus-user-date-format-alist
'(((gnus-seconds-today) . "%H:%M")
@@ -652,7 +648,7 @@
"\\|^List-[iI][Dd]:\\|^X-Newsreader:\\|^X-Mailer:\\|User-Agent:\\|X-User-Agent:")))
#+end_src
*** HTML email
- #+BEGIN_SRC emacs-lisp
+ #+begin_src emacs-lisp
(setq gnus-button-url 'browse-url-generic
gnus-inhibit-images t
mm-discouraged-alternatives nil ;; '("text/html" "text/richtext")
@@ -663,15 +659,13 @@
(defun jao-gnus-remove-anchors ()
(save-excursion
(goto-char (point-min))
- (when (re-search-forward " .+updates on arXiv.org: +" nil t)
- (replace-match " ")
+ (when (re-search-forward "[gq].+ updates on arXiv.org: " nil t)
+ (replace-match "")
(let ((begin (point)))
(when (re-search-forward "^\\(To\\|Subject\\):" nil t)
(beginning-of-line)
- (let ((shr-width 1000))
- ;; (shr-render-region begin (1- (point)))
- (w3m-region begin (point))
- ))))))
+ (let ((shr-width 10000))
+ (shr-render-region begin (1- (point)))))))))
(add-hook 'gnus-part-display-hook 'jao-gnus-remove-anchors)
@@ -696,7 +690,7 @@
(gnus-article-show-images)
(goto-char pos)
(w3m-toggle-inline-images))))))
- #+END_SRC
+ #+end_src
*** Follow links and enclosures
#+begin_src emacs-lisp
(defun jao-gnus-follow-link (&optional external)