summaryrefslogtreecommitdiffhomepage
path: root/gnus.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-07-24 02:12:17 +0100
committerjao <jao@gnu.org>2021-07-24 02:12:17 +0100
commit9797060e0b1e57c619930082c112e1fec8243fcd (patch)
treea06225075e0994a8dacd9041792c76dc0ba3d593 /gnus.org
parent9e089dab9af327d4a6b392475f54871291bc0bc3 (diff)
downloadelibs-9797060e0b1e57c619930082c112e1fec8243fcd.tar.gz
elibs-9797060e0b1e57c619930082c112e1fec8243fcd.tar.bz2
gnus: clean-ups
Diffstat (limited to 'gnus.org')
-rw-r--r--gnus.org37
1 files changed, 9 insertions, 28 deletions
diff --git a/gnus.org b/gnus.org
index d5349b4..1d3d796 100644
--- a/gnus.org
+++ b/gnus.org
@@ -647,7 +647,7 @@
gnus-visible-headers
"\\|^List-[iI][Dd]:\\|^X-Newsreader:\\|^X-Mailer:\\|User-Agent:\\|X-User-Agent:")))
#+end_src
-*** HTML email
+*** HTML email (washing, images)
#+begin_src emacs-lisp
(setq gnus-button-url 'browse-url-generic
gnus-inhibit-images t
@@ -669,19 +669,8 @@
(add-hook 'gnus-part-display-hook 'jao-gnus-remove-anchors)
- ;; show images
- (defun jao-gnus-show-image (&optional external)
- (interactive "P")
- (when (eq major-mode 'gnus-summary-mode)
- (gnus-summary-select-article-buffer))
- (let ((pos (next-single-property-change (point) 'w3m-image)))
- (if (not pos)
- (gnus-article-show-images)
- (goto-char pos)
- (if external (w3m-view-image) (w3m-toggle-inline-image)))))
-
- (defun jao-gnus-show-images (&optional external)
- (interactive "P")
+ (defun jao-gnus-show-images ()
+ (interactive)
(save-window-excursion
(gnus-summary-select-article-buffer)
(save-excursion
@@ -730,6 +719,7 @@
(define-key gnus-summary-mode-map "v" 'scroll-other-window)
(define-key gnus-summary-mode-map "V" 'scroll-other-window-down)
(define-key gnus-summary-mode-map "X" 'jao-gnus-arXiv-capture)
+ (define-key gnus-summary-mode-map "e" 'jao-gnus-open-enclosure)
(with-eval-after-load "w3m"
(define-key gnus-article-mode-map "\C-ci" 'w3m-view-image)
@@ -738,23 +728,17 @@
(major-mode-hydra-define gnus-summary-mode nil
("Browse"
(("g" jao-gnus-follow-link "Follow link in emacs")
- ("G" (lambda () (interactive) (jao-gnus-follow-link t))
- "Follow link in external browser"))
+ ("G" (jao-gnus-follow-link t) "Follow link in external browser")
+ ("i" jao-gnus-show-images "Show images"))
"Capture"
(("x" jao-gnus-arXiv-capture "Capture arXiv entry")
("e" jao-gnus-open-enclosure "Add enclosure to playlist")
- ("E" (jao-gnus-open-enclosure t) "Play enclosure"))
- "Images"
- (("i" jao-gnus-show-images "Show images"))
- "Toot"
- (("t" jao-gnus-tweet-link "Tweet article")
- ("T" jao-gnus-toot-link "Toot article"))))
+ ("E" (jao-gnus-open-enclosure t) "Play enclosure"))))
(major-mode-hydra-define gnus-article-mode nil
("Browse"
(("g" jao-gnus-follow-link "Follow link in emacs")
- ("G" (lambda () (interactive) (jao-gnus-follow-link t))
- "Follow link in external browser"))
+ ("G" (jao-gnus-follow-link t) "Follow link in external browser"))
"Capture"
(("x" jao-gnus-arXiv-capture "Capture arXiv entry")
("e" jao-gnus-open-enclosure "Add enclosure to playlist")
@@ -763,8 +747,5 @@
(("z" w3m-lnum-zoom-in-image "Zoom image at point")
("I" (if (fboundp 'w3m-view-image) (w3m-view-image) (eww-display-image))
"View image at point")
- ("i" jao-gnus-show-images "Show images"))
- "Toot"
- (("t" jao-gnus-tweet-link "Tweet article")
- ("T" jao-gnus-toot-link "Toot article"))))
+ ("i" jao-gnus-show-images "Show images"))))
#+end_src