From 442b1cac985fc0789275d3e4cd8d4ea24a1fe1a5 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 9 Dec 2022 22:40:47 +0000 Subject: doc-view fix --- lib/doc/jao-doc-view.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el index f4c7c8b..fe26c1d 100644 --- a/lib/doc/jao-doc-view.el +++ b/lib/doc/jao-doc-view.el @@ -100,12 +100,13 @@ urls))) (defun jao-doc-view--page-urls (&optional all) - (cond ((and all (not (file-exists-p (jao-doc-view--full-txt)))) - (message "Full text not extracted yet: doing so!") - (doc-view-doc->txt txt (lambda () (message "Text extracted"))) - 'wait) - (all (jao-doc-view--collect-urls (jao-doc-view--full-txt))) - (t (jao-doc-view--collect-urls (jao-doc-view-page-text nil t))))) + (let ((txt (jao-doc-view--full-txt))) + (cond ((and all (not (file-exists-p txt))) + (message "Full text not extracted yet: doing so!") + (doc-view-doc->txt txt (lambda () (message "Text extracted"))) + 'wait) + (all (jao-doc-view--collect-urls txt)) + (t (jao-doc-view--collect-urls (jao-doc-view-page-text nil t)))))) (defun jao-doc-view-visit-url (all) "Visit URL displayed in this page." -- cgit v1.2.3