diff options
| -rw-r--r-- | init.org | 21 | 
1 files changed, 12 insertions, 9 deletions
@@ -1498,10 +1498,18 @@        (defvar jao-browse-url-wget-exts          '("ps" "pdf" "dvi" "djvu" "zip" "gz" "tgz" "mp4" "mp3" "flv")) +      (defvar jao-browse-external-domains +        '("github.com" "gitlab.com" "slack.com" "meet.google.com" +          "twitter.com" "t.com" "bigml.com")) + +      (defvar jao-browse--external-regexp +        (format "https?://.*%s\\(/.*\\)?" +                (regexp-opt jao-browse-external-domains))) +        (defun jao-wget--regexp ()          (concat "^http[s]?://.+\\(\\." -                (mapconcat 'identity jao-browse-url-wget-exts "\\|\\.") -                "\\)\\'")) +          (mapconcat 'identity jao-browse-url-wget-exts "\\|\\.") +          "\\)\\'"))        (defun jao--see (url &rest _r)          (start-process-shell-command "see" nil (format "see %s" (jao--fln url)))) @@ -1519,12 +1527,8 @@                (,jao--see-exts . jao--see)                ("^file://?.+\\.html?$" . ,jao-browse-url-function)                ("^file://?" . jao--find-file-other-window) -              ("^https?://git\\(hub\\|lab\\)\\.com/.*" . -               ,jao-browse-url-external-function) -              ("^https?://.*\\.slack\\..*" . ,jao-browse-url-external-function) +              (,jao-browse--external-regexp . ,jao-browse-url-external-function)                ("^https?://.*\\.gotomeeting\\.com\\.*" . browse-url-chrome) -              ("^https?://meet\\.google\\.com\\.*" . ,jao-browse-url-external-function) -              ("^https?://t\\(witter\\)?\\.com?/.*" . ,jao-browse-url-external-function)                (,(jao-wget--regexp) . jao-download)                (jao-video--url-p . jao-maybe-view-video)                ("." . ,jao-browse-url-function))) @@ -2007,8 +2011,7 @@        (defun jao-shell-here-toggle ()          (interactive) -        (if (or (eq (current-buffer) (jao-shell-frame-buffer)) -                (eq (current-buffer) (jao-shell-frame-buffer nil t))) +        (if (eq (current-buffer) (jao-shell-frame-buffer))              (eshell/x)            (jao-shell-here t)))  | 
