summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-08-19 19:13:01 +0100
committerjao <jao@gnu.org>2022-08-19 19:13:01 +0100
commit4178d58c6d06341a34ae199c61f66133e49adbe6 (patch)
treedc0f2bb0e77767b8afb1472914059372bf33dc02
parent978e055d5fdbca75cb0345be181e2b8d260c4b2d (diff)
downloadelibs-4178d58c6d06341a34ae199c61f66133e49adbe6.tar.gz
elibs-4178d58c6d06341a34ae199c61f66133e49adbe6.tar.bz2
nit
-rw-r--r--custom/jao-custom-exwm.el2
-rw-r--r--init.el32
-rw-r--r--lib/doc/jao-doc-view.el4
3 files changed, 19 insertions, 19 deletions
diff --git a/custom/jao-custom-exwm.el b/custom/jao-custom-exwm.el
index 44da990..635865e 100644
--- a/custom/jao-custom-exwm.el
+++ b/custom/jao-custom-exwm.el
@@ -359,6 +359,7 @@
(defun jao-exwm-pdf-enable-zathura ()
(interactive)
(add-hook 'kill-emacs-query-functions #'jao-exwm-pdf-zathura-close-all t)
+ (setq jao-browse-doc-use-emacs-p nil)
(setq jao-org-open-pdf-fun #'jao-zathura-open-doc)
(setq jao-org-links-pdf-store-fun #'jao-exwm-org-store-zathura-link)
(setq jao-open-doc-fun #'jao-zathura-open-doc))
@@ -367,6 +368,7 @@
(interactive)
(define-key org-mode-map (kbd "C-c o") #'jao-org-org-goto-pdf)
(remove-hook 'kill-emacs-query-functions #'jao-exwm-pdf-zathura-close-all)
+ (setq jao-browse-doc-use-emacs-p t)
(setq jao-org-open-pdf-fun #'jao-find-or-open)
(setq jao-org-links-pdf-store-fun nil)
(setq jao-open-doc-fun #'jao-find-or-open))
diff --git a/init.el b/init.el
index 2ea67e3..d335977 100644
--- a/init.el
+++ b/init.el
@@ -1518,8 +1518,8 @@
(and (boundp 'exwm-class-name)
(member exwm-class-name '("vlc" "mpv"))))))
-;; (require 'jao-custom-eww)
-(require 'jao-custom-w3m)
+(require 'jao-custom-eww)
+;; (require 'jao-custom-w3m)
;;;; browse-url
(require 'browse-url)
@@ -1653,22 +1653,20 @@
(interactive (list (or (jao-url-around-point)
(jao-rss--find-url)
(read-string "Feed URL: "))))
- (let* ((url+title (if (consp url) url (list url)))
+ (let* ((url+title (ensure-list url))
(url (car url+title))
- (title (cdr url+title))
- ;; (cats (cons "prog" (jao-notmuch--subtags "feeds")))
- (cats (jao-rss--feeds-dirs)))
- (if url
- (let ((url (if (string-match "^feed:" url) (substring url 5) url)))
- (when (y-or-n-p (format "Subscribe to <%s>? " url))
- (let* ((name (read-string "Feed name: " title))
- (cat (completing-read "Category: " cats nil t))
- (subs (format "r2e add %s '%s' feeds.%s@localhost"
- name url cat)))
- ;; (jao-rss2e-append name url cat)
- (shell-command-to-string subs)
- (shell-command (format "r2e run %s" name)))))
- (message "No feeds found"))))
+ (title (cdr url+title)))
+ (unless url (error "No feeds found"))
+ (let ((url (if (string-match "^feed:" url) (substring url 5) url)))
+ (when (y-or-n-p (format "Subscribe to <%s>? " url))
+ (let* ((name (read-string "Feed name: " title))
+ (cats (cons "prog" (jao-notmuch--subtags "feeds")))
+ (cat (completing-read "Category: " cats nil t))
+ (subs (format "r2e add %s '%s' feeds.%s@localhost"
+ name url cat)))
+ ;; (jao-rss2e-append name url cat)
+ (shell-command-to-string subs)
+ (shell-command (format "r2e run %s" name)))))))
;;; PDFs and other docs
;;;; doc-view
diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el
index 3973104..d68cae9 100644
--- a/lib/doc/jao-doc-view.el
+++ b/lib/doc/jao-doc-view.el
@@ -136,12 +136,12 @@
(advice-add 'doc-view-goto-page :before #'jao-doc-view--trail-push)
;;; Find URLs
-(defun jao-doc-view--page-urls (all)
+(defun jao-doc-view--page-urls (&optional all)
(if doc-view--current-converter-processes
(message "DocView: please wait till conversion finished.")
(let ((txt (expand-file-name "doc.txt" (doc-view--current-cache-dir)))
(page (doc-view-current-page))
- (pd-rx (rx (+ (literal page-delimiter))))
+ (pd-rx "^ ")
(urls))
(if (file-readable-p txt)
(with-current-buffer (find-file-noselect txt)