diff options
author | jao <jao@gnu.org> | 2021-04-13 03:47:06 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-04-13 03:47:06 +0100 |
commit | 71633830f1797c17a3f395bece11c56141b33c68 (patch) | |
tree | 6326f65fb533ead58447bc710e9a0bcb6b5a3db1 | |
parent | 8edd13404c863cf9092894b8cf473fa021b9fb21 (diff) | |
download | elibs-71633830f1797c17a3f395bece11c56141b33c68.tar.gz elibs-71633830f1797c17a3f395bece11c56141b33c68.tar.bz2 |
doc-view tweak
-rw-r--r-- | lib/doc/jao-doc-view.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el index e19839a..cdc4502 100644 --- a/lib/doc/jao-doc-view.el +++ b/lib/doc/jao-doc-view.el @@ -210,17 +210,18 @@ (while (re-search-forward "https?://" end t) (push (thing-at-point-url-at-point) urls)) urls)) - (doc-view-doc->txt txt (lambda () (jao-doc-view--page-urls all))))))) + (doc-view-doc->txt txt (lambda () (jao-doc-view--page-urls all))) + 'wait)))) (defun jao-doc-view-visit-url (all) "Visit URL displayed in this page." (interactive "P" doc-view-mode) (let ((urls (jao-doc-view--page-urls all))) - (if (zerop (length urls)) - (message "No URLs in this page") - (when-let (url (completing-read "URL: " urls nil nil - (when (null (cdr urls)) (car urls)))) - (browse-url url))))) + (cond ((eq 'wait urls) (message "Extracting text, please wait and retry.")) + ((zerop (length urls)) (message "No URLs in this page")) + (t (when-let (url (completing-read "URL: " urls nil nil + (when (null (cdr urls)) (car urls)))) + (browse-url url)))))) (provide 'jao-doc-view) |