summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/doc/jao-doc-view.el13
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)