summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2022-03-12 11:23:38 -0600
committerCase Duckworth2022-03-12 11:23:38 -0600
commitb462cc87855ce69b50aab7f0e68a63b79284da4a (patch)
tree742571e58552f4d0e7d687ddb1db6f76c3a8b1cd /init.el
parentFix affe-regexp-compiler arguments (diff)
downloademacs-b462cc87855ce69b50aab7f0e68a63b79284da4a.tar.gz
emacs-b462cc87855ce69b50aab7f0e68a63b79284da4a.zip
Purge org-contacts
... sort of
Diffstat (limited to 'init.el')
-rw-r--r--init.el73
1 files changed, 36 insertions, 37 deletions
diff --git a/init.el b/init.el index 9f6cb41..63214a6 100644 --- a/init.el +++ b/init.el
@@ -177,42 +177,41 @@
177 (add-to-list '+browse-url-secondary-browser-regexps 177 (add-to-list '+browse-url-secondary-browser-regexps
178 (replace-regexp-in-string "\\." "\\\\." domain))) 178 (replace-regexp-in-string "\\." "\\\\." domain)))
179 ;; Set up URL handlers. 179 ;; Set up URL handlers.
180 (with-eval-after-load 'org-contacts 180 (require 'chd)
181 (require 'chd) 181 (+browse-url-set-handlers
182 (+browse-url-set-handlers 182 (list
183 (list 183 (cons (rx ; images
184 (cons (rx ; images 184 "." (or "jpeg" "jpg" "png" "bmp") eos)
185 "." (or "jpeg" "jpg" "png" "bmp") eos) 185 (lambda (&rest args)
186 (lambda (&rest args) 186 (apply
187 (apply 187 (cond ((executable-find "mpv") #'+browse-image-with-mpv)
188 (cond ((executable-find "mpv") #'+browse-image-with-mpv) 188 (t #'eww-browse-url))
189 (t #'eww-browse-url)) 189 args)))
190 args))) 190 (cons (rx (or ;; videos
191 (cons (rx (or ;; videos 191 "youtube.com" "youtu.be" "invidious" "yewtu.be"
192 "youtube.com" "youtu.be" "invidious" "yewtu.be" 192 (seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos)
193 (seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos) 193 ;; music
194 ;; music 194 "soundcloud.com" "bandcamp.com"
195 "soundcloud.com" "bandcamp.com" 195 (seq "." (or "ogg" "mp3" "opus" "m4a") eos)))
196 (seq "." (or "ogg" "mp3" "opus" "m4a") eos))) 196 (lambda (&rest args)
197 (lambda (&rest args) 197 (apply (if (executable-find "mpv")
198 (apply (if (executable-find "mpv") 198 #'+browse-url-with-mpv
199 #'+browse-url-with-mpv 199 browse-url-secondary-browser-function)
200 browse-url-secondary-browser-function) 200 args)))
201 args))) 201 (cons chd/url-regexps #'browse-url-chrome)
202 (cons chd/url-regexps #'browse-url-chrome) 202 (cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites
203 (cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites 203 (lambda (&rest args)
204 (lambda (&rest args) 204 (apply browse-url-secondary-browser-function args)))
205 (apply browse-url-secondary-browser-function args))) 205 (cons "xkcd\\.com"
206 (cons "xkcd\\.com" 206 (lambda (&rest args)
207 (lambda (&rest args) 207 (apply (if (fboundp #'xkcd-get)
208 (apply (if (fboundp #'xkcd-get) 208 (progn (require '+xkcd)
209 (progn (require '+xkcd) 209 #'+xkcd-get-from-url)
210 #'+xkcd-get-from-url) 210 +browse-url-browser-function)
211 +browse-url-browser-function) 211 args)))
212 args))) 212 (cons "." ; everything else
213 (cons "." ; everything else 213 (lambda (&rest args)
214 (lambda (&rest args) 214 (apply +browse-url-browser-function args)))))
215 (apply +browse-url-browser-function args))))))
216 ;; Transform URLs before passing to `browse-url' 215 ;; Transform URLs before passing to `browse-url'
217 (:option +browse-url-transformations `((,(rx (or "youtube.com" 216 (:option +browse-url-transformations `((,(rx (or "youtube.com"
218 "youtu.be")) 217 "youtu.be"))
@@ -698,7 +697,7 @@
698 :unnarrowed t)) 697 :unnarrowed t))
699 (+org-capture-sort)) 698 (+org-capture-sort))
700 699
701(setup org-contacts 700(setup org-contacts (:quit)
702 (:load-after org) 701 (:load-after org)
703 (:also-straight org-vcard) ; for importing Vcard files 702 (:also-straight org-vcard) ; for importing Vcard files
704 (:option org-contacts-matcher "contact") ; Contacts are tagged "contact" 703 (:option org-contacts-matcher "contact") ; Contacts are tagged "contact"