diff options
| author | jao <jao@gnu.org> | 2025-12-14 22:14:23 +0000 |
|---|---|---|
| committer | jao <jao@gnu.org> | 2025-12-14 22:14:23 +0000 |
| commit | 400b336121df5c8f4349e9a66e1da69a45dd6bb9 (patch) | |
| tree | 63d72371c57b2a1917873ff93d6e66cabbd417fe /lib | |
| parent | b7fd980a7f4cddc8bf70c4491d1ce434cf7237bb (diff) | |
| download | elibs-400b336121df5c8f4349e9a66e1da69a45dd6bb9.tar.gz elibs-400b336121df5c8f4349e9a66e1da69a45dd6bb9.tar.bz2 | |
jao-r2e: configurable executable
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/eos/jao-r2e.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/eos/jao-r2e.el b/lib/eos/jao-r2e.el index 09b4504..568b8bc 100644 --- a/lib/eos/jao-r2e.el +++ b/lib/eos/jao-r2e.el @@ -24,6 +24,7 @@ (autoload 'eww-view-source "eww") (autoload 'jao-notmuch-subtags "jao-notmuch") +(defvar jao-r2e-command "r2e") (defvar jao-r2e-confirm-toggle nil) (defconst jao-r2e--buffer "*r2e*") @@ -68,7 +69,7 @@ "Execute a r2e command THINGS in the given BUFFER." (let ((b (or buffer (pop-to-buffer (jao-r2e--buffer))))) (let ((inhibit-read-only t) - (cmd (format "r2e %s" things))) + (cmd (format "%s %s" jao-r2e-command things))) (unless buffer (with-current-buffer b (delete-region (point-min) (point-max)))) (with-temp-message (format "Running: %s ...." cmd) @@ -216,12 +217,15 @@ (let* ((name (read-string "Feed name: " title)) (cats (cons "prog" (jao-notmuch-subtags "feeds"))) (cat (completing-read "Category: " cats nil t cat)) - (subs (format "r2e add %s '%s' feeds.%s@localhost" - name url cat))) + (sfmt (format "%%s add %s '%s' mail+feeds_%s@jao.io" name url cat)) + (subs )) (with-temp-message "Subscribing..." - (shell-command-to-string subs)) - (with-temp-message "Retrieving feed..." - (shell-command (format "r2e run %s" name))) + (shell-command-to-string (format sfmt "r2e")) + (when (not (string= jao-r2e-command "r2e")) + (shell-command-to-string (format sfmt jao-r2e-command)))) + (when (y-or-n-p "Retrieve feeds now? ") + (with-temp-message "Retrieving feed..." + (shell-command (format "%s run %s" jao-r2e-command name)))) (when relist (jao-r2e-list))))))) (provide 'jao-r2e) |
