summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-06-06 22:12:44 +0100
committerjao <jao@gnu.org>2021-06-06 22:12:44 +0100
commita571e4ce77c441eeb1ee095f70e680d35301003c (patch)
treef67903bcb054661c4807a19f18005b68c93ad1b6
parent516d92f456ba4d4831fbcac38aa0fc8cb6926fb7 (diff)
downloadelibs-a571e4ce77c441eeb1ee095f70e680d35301003c.tar.gz
elibs-a571e4ce77c441eeb1ee095f70e680d35301003c.tar.bz2
jao-rss-subscribe inserting a maildir mailbox
-rw-r--r--init.org21
1 files changed, 13 insertions, 8 deletions
diff --git a/init.org b/init.org
index 52f9401..ad732e3 100644
--- a/init.org
+++ b/init.org
@@ -408,7 +408,7 @@
(setq custom-theme-directory
(expand-file-name "lib/themes" jao-emacs-dir))
- (setq jao-frames-default-font "Hack-9")
+ (defvar jao-default-font "Fira Code-9") ;; "Hack-9"
(require 'jao-themes)
@@ -1175,7 +1175,6 @@
* Frames
*** Frame geometry
#+begin_src emacs-lisp
- (defvar jao-frames-default-font "Hack-9")
(setq frame-resize-pixelwise nil)
;;; modeline, toolbars and co.
@@ -1185,7 +1184,7 @@
(scroll-bar-width . 11)
(menu-bar . nil)
(alpha . (,jao-frames-default-alpha ,jao-frames-default-alpha))
- (font . ,jao-frames-default-font)))
+ (font . ,jao-default-font)))
#+end_src
*** Frame layout, title, etc.
#+BEGIN_SRC emacs-lisp
@@ -1574,6 +1573,14 @@
(if (fboundp 'w3m-view-mode) (w3m-view-source) (View-quit))
(when url (cons url (or title ""))))))))
+ (defun jao-rss2e-append (name url mbox)
+ (with-current-buffer (find-file-noselect "~/.config/rss2email.cfg")
+ (goto-char (point-max))
+ (insert "[feed." name "]\nurl = " url)
+ (insert "\nto = jao+feeds_" mbox "@localhost")
+ (insert "\nmaildir-mailbox = " mbox "\n\n")
+ (save-buffer)))
+
(defun jao-rss-subscribe ()
(interactive)
(let* ((url (or (jao-url-around-point)
@@ -1583,16 +1590,14 @@
(url (car url+title))
(title (cdr url+title)))
(if url
- (let ((url (if (string-match "^feed:" url)
- (substring url 5) 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 "Name: " title))
(cat (completing-read "Category: "
(jao-list-mailboxes "feeds")
nil t)))
- (shell-command
- (format "r2e add %s %s jao+feeds_%s@localhost && r2e run %s"
- name url cat name)))))
+ (jao-rss2e-append name url cat)
+ (shell-command (format "r2e run %s" name)))))
(message "No feeds found"))))
#+end_src
* Email