summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-06-18 18:09:04 +0100
committerjao <jao@gnu.org>2022-06-18 18:09:04 +0100
commitb7c0513998ca991c9216f0c56c5c0b31efc40400 (patch)
treed97f0f6a443c1770d0b3e49f4272ccf754d4b13d
parent36de8f6269798e12fc68ec1b139332dc55365f31 (diff)
downloadelibs-b7c0513998ca991c9216f0c56c5c0b31efc40400.tar.gz
elibs-b7c0513998ca991c9216f0c56c5c0b31efc40400.tar.bz2
mailcap tweaks
-rw-r--r--custom/jao-custom-email.el17
-rw-r--r--init.el19
2 files changed, 19 insertions, 17 deletions
diff --git a/custom/jao-custom-email.el b/custom/jao-custom-email.el
index 37c8acb..45fda21 100644
--- a/custom/jao-custom-email.el
+++ b/custom/jao-custom-email.el
@@ -215,23 +215,6 @@
(jao-sendmail-local)
-;;; mailcap
-(use-package mailcap
- :config
- (add-to-list 'mailcap-mime-extensions '(".JPEG" . "image/jpeg"))
- (add-to-list 'mailcap-mime-extensions '(".JPG" . "image/jpeg"))
-
- (defun jao-icalendar-import-buffer ()
- (let ((icalendar-import-format "%s%u%l%d"))
- (icalendar-import-buffer diary-file t nil))
- (kill-buffer)
- (message "Event imported into diary"))
-
- :custom
- ((mailcap-user-mime-data
- '((jao-icalendar-import-buffer "application/ics")
- ("viewpdf.sh %s" "application/pdf")))))
-
;;; multipart html renderer
(defun jao-w3m-html-renderer (handle)
(let ((w3m-message-silent t)
diff --git a/init.el b/init.el
index 86ab5fb..312424c 100644
--- a/init.el
+++ b/init.el
@@ -236,6 +236,25 @@
;;;; disk monitoring
(use-package jao-dirmon
:commands jao-dirmon-report)
+;;;; mailcap
+(use-package mailcap
+ :config
+ (add-to-list 'mailcap-mime-extensions '(".JPEG" . "image/jpeg"))
+ (add-to-list 'mailcap-mime-extensions '(".JPG" . "image/jpeg"))
+
+ (defun jao-icalendar-import-buffer ()
+ (let ((icalendar-import-format "%s%u%l%d"))
+ (icalendar-import-buffer diary-file t nil))
+ (kill-buffer)
+ (message "Event imported into diary"))
+
+ :custom
+ ((mailcap-user-mime-data
+ '((jao-icalendar-import-buffer "application/ics")
+ (pdf-view-mode "application/pdf" (display-graphic-p))
+ ("zathura \"%s\"" "application/pdf")
+ (image-mode "image/*" (display-graphic-p))
+ ("feh \"%s\"" "image/*")))))
;;; Crypto
;;;; PGP, EPG, passwords
(setq epg-pinentry-mode 'loopback)