diff options
Diffstat (limited to 'init.org')
-rw-r--r-- | init.org | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1601,15 +1601,18 @@ (read-string "Feed URL: ")))) (let* ((url+title (if (consp url) url (list url))) (url (car url+title)) - (title (cdr url+title))) + (title (cdr url+title)) + (cats (mapcar (lambda (f) (car (last (split-string f "\\.")))) + (directory-files nnml-directory nil "feeds")))) (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: " - (jao-list-mailboxes "feeds") - nil t))) - (jao-rss2e-append name url cat) + (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")))) #+end_src |