diff options
author | Yuchen Pei <id@ypei.org> | 2025-08-18 20:48:03 +1000 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2025-08-18 20:48:03 +1000 |
commit | 6c19fd1a4610ce52066ac83f1b185ce497ba2a95 (patch) | |
tree | 18dffb2cad7bd512ac8d4226c34b662de2855e1e /emacs/.emacs.d/lisp/my | |
parent | 57f5816ac1a8c99e30aa3b3a9a1736e5fc693f50 (diff) |
[emacs] fix my-browse-url-tor-browser
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-web.el | 11 |
1 files changed, 6 insertions, 5 deletions
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)))) |