From e60ec9225970419d9de7cfee6e180f7e742b7e49 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 18 Jun 2021 20:18:03 +0100 Subject: nits --- email.org | 1 + init.org | 10 ++++++---- lib/net/jao-notmuch.el | 5 +++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/email.org b/email.org index 4aea877..dacbedf 100644 --- a/email.org +++ b/email.org @@ -538,6 +538,7 @@ ("M" . jao-notmuch-move-message) ("n" . jao-notmuch-tree-next) ("s" . jao-notmuch-tree-spam) + ("u" . jao-notmuch-tree-flag) ("RET" . jao-notmuch-tree-show-or-scroll) ("SPC" . jao-notmuch-tree-scroll-or-next)) :map notmuch-show-mode-map diff --git a/init.org b/init.org index e590bba..dc9553f 100644 --- a/init.org +++ b/init.org @@ -1484,18 +1484,20 @@ (insert "\nmaildir-mailbox = " mbox "\n\n") (save-buffer))) - (defun jao-rss-subscribe () + (defun jao-rss-subscribe (&optional url) + "Subscribe to a given RSS URL. If URL not given, look for it." (interactive) - (let* ((url (or (jao-url-around-point) + (let* ((url (or url + (jao-url-around-point) (jao-rss--find-url) (read-string "Feed URL: "))) - (url+title (if (consp url) url (cons url (read-string "Feed name: ")))) + (url+title (if (consp url) url (list url))) (url (car url+title)) (title (cdr url+title))) (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 "Name: " title)) + (let* ((name (read-string "Feed name: " title)) (cat (completing-read "Category: " (jao-list-mailboxes "feeds") nil t))) diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index 4ca8573..f0659f6 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -211,6 +211,11 @@ (interactive) (jao-notmuch-tree--tag-and-next '("-unread" "-new") nil t)) +(defun jao-notmuch-tree-flag (unmark) + (interactive "P") + (let ((tags (if unmark '("-flagged") '("-unread" "-new" "-deleted" "+flagged")))) + (jao-notmuch-tree--tag-and-next tags nil nil))) + (defun jao-notmuch-tree-spam (unmark) (interactive "P") (let ((tags (if unmark '("-spam") '("-unread" "-new" "+spam")))) -- cgit v1.2.3