From 717d2a67c455237252852c88b31dd6c445e79b8e Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 6 Apr 2021 03:52:08 +0100 Subject: w3m.org --- gnus.org | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index bf5c30b..c622946 100644 --- a/gnus.org +++ b/gnus.org @@ -503,16 +503,8 @@ #+END_SRC *** HTML email #+BEGIN_SRC emacs-lisp - ;; use w3m for html mail - (defun jao-gnus-html-renderer (handle) - (let ((shr-use-colors nil) - (shr-use-fonts nil) - (fill-column (min (window-width) 110))) - (mm-shr handle))) - (setq gnus-button-url 'browse-url-generic gnus-inhibit-images t - mm-text-html-renderer 'jao-gnus-html-renderer ;; 'w3m ;; 'shr mm-discouraged-alternatives nil ;; '("text/html" "text/richtext") mm-inline-large-images 'resize) @@ -584,50 +576,10 @@ (sit-for 1) (jao-emms-echo)))))) #+end_src -*** Tweets and toots - #+BEGIN_SRC emacs-lisp - (defun jao-gnus--find-link () - (when (eq major-mode 'gnus-summary-mode) - (gnus-summary-select-article-buffer)) - (goto-char (point-max)) - (or (search-backward-regexp "^Link\\b" nil t) - (search-backward-regexp "^URL: h" nil t) - (search-backward-regexp "^Via: h")) - (goto-char (match-end 0)) - (jao-w3m--toot-text nil nil "")) - - (defun jao-gnus-tweet-link (&optional toot) - (interactive "P") - (save-excursion - (jao-gnus--find-link) - (if toot - (jao-w3m-toot nil nil (elt gnus-current-headers 1)) - (jao-w3m-tweet nil nil (elt gnus-current-headers 1))))) - - (defun jao-gnus-toot-link () - (interactive) - (jao-gnus-tweet-link t)) - - (defun jao-gnus-mail-link () - (interactive) - (let ((txt (jao-gnus--find-link))) - (when txt - (message-mail-other-window) - (message-goto-body) - (insert "\n\n" txt) - (message-goto-to)))) - #+END_SRC * Keyboard shortcuts #+BEGIN_SRC emacs-lisp - (define-key gnus-article-mode-map "\C-ci" 'w3m-view-image) - (define-key gnus-article-mode-map "\C-cb" 'jao-w3m-do-browse) (define-key gnus-article-mode-map "i" 'jao-gnus-show-images) (define-key gnus-summary-mode-map "i" 'jao-gnus-show-images) - (define-key gnus-article-mode-map "z" 'w3m-lnum-zoom-in-image) - (define-key gnus-article-mode-map "\C-ct" 'jao-gnus-tweet-link) - (define-key gnus-summary-mode-map "\C-ct" 'jao-gnus-tweet-link) - (define-key gnus-article-mode-map "\C-cT" 'jao-gnus-toot-link) - (define-key gnus-summary-mode-map "\C-cT" 'jao-gnus-toot-link) (define-key gnus-article-mode-map "\M-g" 'jao-gnus-follow-link) (define-key gnus-summary-mode-map "\M-g" 'jao-gnus-follow-link) (define-key gnus-summary-mode-map "v" 'scroll-other-window) -- cgit v1.2.3