Add new customization option notmuch-add-saved-search-appends to determine
whether new saved searches should be appended to or inserted in front of
saved searches. The default remains insert in front.
---
 emacs/notmuch-hello.el |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 65fde75..84bce3a 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -42,6 +42,11 @@
   :type 'boolean
   :group 'notmuch)
 
+(defcustom notmuch-add-saved-search-appends nil
+  "Should new saved searches be appended instead of inserted to saved 
searches?"
+  :type 'boolean
+  :group 'notmuch)
+
 (defvar notmuch-hello-indent 4
   "How much to indent non-headers.")
 
@@ -168,8 +173,9 @@ Typically \",\" in the US and UK and \".\" in Europe."
                collect elem))
     ;; Add the new one.
     (customize-save-variable 'notmuch-saved-searches
-                            (push (cons name search)
-                                  notmuch-saved-searches))
+                            (add-to-list 'notmuch-saved-searches
+                                         (cons name search)
+                                         notmuch-add-saved-search-appends))
     (message "Saved '%s' as '%s'." search name)
     (notmuch-hello-update)))
 
-- 
1.7.1

_______________________________________________
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to