diff options
Diffstat (limited to '.emacs.d/notmuch-config.el')
-rw-r--r-- | .emacs.d/notmuch-config.el | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/.emacs.d/notmuch-config.el b/.emacs.d/notmuch-config.el index 579b314b..8a61a35c 100644 --- a/.emacs.d/notmuch-config.el +++ b/.emacs.d/notmuch-config.el @@ -219,14 +219,23 @@ Two ways to read: (interactive) (with-current-buffer (or notmuch-tree-message-buffer (current-buffer)) (save-excursion - (re-search-forward "^URL:\\( \\|\n\\)") - (let ((url (buffer-substring-no-properties (point) (line-end-position)))) - ;; alternative to eww readable view: - ;; (start-process "firefox" nil "firefox" - ;; "-new-window" - ;; (concat "about:reader?url=" url)) - (spw/next-eww-readable) - (eww url))))) + (cond + ((re-search-forward + "https://www.wsj.com/.*-WSJNewsPaper-[0-9-]+\\.pdf" nil t) + (call-process-shell-command + (format "evince %s" + (shell-quote-argument + (buffer-substring-no-properties (match-beginning 0) (point)))) + nil 0)) + (t + (re-search-forward "^URL:\\( \\|\n\\)") + (let ((url (buffer-substring-no-properties (point) (line-end-position)))) + ;; alternative to eww readable view: + ;; (start-process "firefox" nil "firefox" + ;; "-new-window" + ;; (concat "about:reader?url=" url)) + (spw/next-eww-readable) + (eww url))))))) (defvar spw/lists-browse-searches nil "Internal cache variable.") |