From 400b336121df5c8f4349e9a66e1da69a45dd6bb9 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 14 Dec 2025 22:14:23 +0000 Subject: jao-r2e: configurable executable --- lib/eos/jao-r2e.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'lib/eos/jao-r2e.el') 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) -- cgit v1.2.3