aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/init/ycp-web.el1
-rw-r--r--emacs/.emacs.d/lisp/my/my-web.el11
2 files changed, 7 insertions, 5 deletions
diff --git a/emacs/.emacs.d/init/ycp-web.el b/emacs/.emacs.d/init/ycp-web.el
index d309686..090c8da 100644
--- a/emacs/.emacs.d/init/ycp-web.el
+++ b/emacs/.emacs.d/init/ycp-web.el
@@ -261,6 +261,7 @@
"b" #'my-eww-switch-by-title)
(my-keybind global-map "\C-c\C-o" #'my-browse-url-at-point)
(my-setq-from-local my-newscorp-au-amp-nk)
+ (my-setq-from-local my-tor-browser-bin)
(add-to-list 'browse-url-handlers
`(my-newscorp-au-url-p
. ,(lambda (url &rest _) (my-open-newscorp-au url))))
diff --git a/emacs/.emacs.d/lisp/my/my-web.el b/emacs/.emacs.d/lisp/my/my-web.el
index 7c9c567..92ef599 100644
--- a/emacs/.emacs.d/lisp/my/my-web.el
+++ b/emacs/.emacs.d/lisp/my/my-web.el
@@ -59,14 +59,15 @@
(interactive)
(let ((url (plist-get eww-data :url)))
(when (and (string-match "^\\(.*//.*?/\\).*$" url)
- (match-string 1 url))
+ (match-string 1 url))
(eww (match-string 1 url)))))
+(defvar my-tor-browser-bin "tor-browser")
+
(defun my-browse-url-tor-browser (url)
"Browse URL with tor-browser."
(setq url (browse-url-encode-url url))
- (start-process (concat "tor-browser " url) nil "tor-browser"
- "--allow-remote" url))
+ (start-process "tor-browser" nil my-tor-browser-bin "--allow-remote" url))
(defun my-browse-url-firefox-private (url)
"Browse URL in a private firefox window."
@@ -146,10 +147,10 @@ Useful for bypassing \"Enable JavaScript and cookies to continue\"."
(if no-overwrite
(my-make-unique-file-name
(my-make-file-name-from-url url)
- my-webpage-download-dir)
+ my-webpage-incoming-dir)
(expand-file-name
(my-make-file-name-from-url url "html")
- my-webpage-download-dir))))
+ my-webpage-incoming-dir))))
(url-copy-file url file-name (not no-overwrite))
(browse-url-firefox (format "file://%s" file-name))))