diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 32 |
1 files changed, 15 insertions, 17 deletions
@@ -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 |