aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2024-12-25 18:44:55 +1100
committerYuchen Pei <id@ypei.org>2024-12-25 18:44:55 +1100
commite79129bb75b2a63f82a99678d777872f124156df (patch)
tree3ce1650a83902d749bf41a5c6a2d856d91338942 /emacs/.emacs.d/init
parent72a1687ff5ccf32c62dc765d8ba0f872acc61027 (diff)
[emacs][bashrc] Various web changes
- emacs as web browser - libfic download - fix pdf-merge
Diffstat (limited to 'emacs/.emacs.d/init')
-rw-r--r--emacs/.emacs.d/init/ycp-gnus.el4
-rw-r--r--emacs/.emacs.d/init/ycp-web.el19
2 files changed, 21 insertions, 2 deletions
diff --git a/emacs/.emacs.d/init/ycp-gnus.el b/emacs/.emacs.d/init/ycp-gnus.el
index f4886fd..9e89ee9 100644
--- a/emacs/.emacs.d/init/ycp-gnus.el
+++ b/emacs/.emacs.d/init/ycp-gnus.el
@@ -186,6 +186,10 @@
(setq gnus-summary-next-group-on-exit nil)
)
+(my-package gnus-art
+ (my-keybind gnus-article-mode-map
+ "w" #'my-copy-url-at-point))
+
(my-package nnrss
(:delay 60)
(setq nnrss-use-local t))
diff --git a/emacs/.emacs.d/init/ycp-web.el b/emacs/.emacs.d/init/ycp-web.el
index b1e546c..b156e9a 100644
--- a/emacs/.emacs.d/init/ycp-web.el
+++ b/emacs/.emacs.d/init/ycp-web.el
@@ -217,6 +217,9 @@
'turn-off-flyspell)
)
+(my-package dnd
+ (setq dnd-open-remote-file-function 'browse-url))
+
(my-package eww
(:delay 60)
(advice-add 'eww-browse-url :filter-args #'my-rewrite-url-advice)
@@ -245,7 +248,18 @@
"T" #'my-eww-top-path
"b" #'my-eww-switch-by-title)
(my-keybind global-map "\C-c\C-o" #'my-browse-url-at-point)
- (my-override browse-url)
+ (setq browse-url-handlers
+ `(("^https?://www.spectator.com.au\\>" .
+ ,(lambda (url &rest args) (my-open-spectator-au url)))
+ (my-mastodon-url-p
+ . ,(lambda (url &rest args) (mastorg-open url)))
+ (my-hacker-news-url-p
+ . ,(lambda (url &rest args) (hnreader-comment url)))
+ (reddio-reddit-url-p
+ . ,(lambda (url &rest args) (reddio-open-url url)))
+ (my-stack-overflow-url-p
+ . ,(lambda (url &rest args) (sx-open-link url)))
+ (stringp . browse-url-firefox)))
)
(my-package my-semantic-scholar
@@ -308,7 +322,8 @@
(my-setq-from-local my-libgen-hosts my-libgen-alt-hosts
my-libgen-library-hosts my-libgen-onion-host
)
- (setq my-libgen-download-dir my-document-incoming-dir)
+ (setq my-libgen-download-dir my-document-incoming-dir
+ my-libfic-download-dir my-document-incoming-dir)
(my-libgen-set-random-hosts))
(my-package my-scihub