]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: `notmuch' should display the `notmuch-hello' interface
authorDavid Edmondson <dme@dme.org>
Mon, 26 Apr 2010 15:07:04 +0000 (16:07 +0100)
committerCarl Worth <cworth@cworth.org>
Mon, 26 Apr 2010 17:37:35 +0000 (10:37 -0700)
Reviewed-by: Carl Worth <cworth@cworth.org>
The notmuch-hello functionality is now sufficiently useful that we
want to make it the default view of notmuch for new users. This also
effectively hides the "hello" name from the user, so we'll be free to
change that in the implementation if necessary.

This change also shuffles the requires between notmuch.el and
notmuch-hello.el. This fixes things so that our documented (require
'notmuch) is sufficient for getting the notmuch-hello functionality.

Finally, the shuffling caused the notmuch-search-oldest-first variable
from one file to the other. While doing that, give this variable the
defcustom treatment for easier customization.

emacs/notmuch-hello.el
emacs/notmuch-lib.el
emacs/notmuch.el

index 30b3a5e0ffdf50f5baeceba7f43d3645b945634b..bd882b830fd6ae7a320a0295e52bd15c9f92b9ea 100644 (file)
@@ -24,7 +24,6 @@
 (require 'cl)
 
 (require 'notmuch-lib)
-(require 'notmuch)
 (require 'notmuch-mua)
 
 (declare-function notmuch-search "notmuch" (query &optional oldest-first target-thread target-line continuation))
index 47c74b9ef0a4323677000ec2591a85703120bf0f..b64aeab94a4997053d09e5dc41969344af123d24 100644 (file)
   :type '(alist :key-type (string) :value-type (string))
   :group 'notmuch)
 
+(defcustom notmuch-search-oldest-first t
+  "Show the oldest mail first when searching."
+  :type 'boolean
+  :group 'notmuch)
+
 ;;
 
 (defun notmuch-version ()
index eecff23ebbe036b43a9b519f840314c395147bf6..428ae6c4742158800d8693eb4d81a12dcd09c71c 100644 (file)
@@ -54,6 +54,7 @@
 (require 'notmuch-lib)
 (require 'notmuch-show)
 (require 'notmuch-mua)
+(require 'notmuch-hello)
 
 (defcustom notmuch-search-result-format
   `(("date" . "%s ")
@@ -221,8 +222,6 @@ For a mouse binding, return nil."
 (defvar notmuch-search-query-string)
 (defvar notmuch-search-target-thread)
 (defvar notmuch-search-target-line)
-(defvar notmuch-search-oldest-first t
-  "Show the oldest mail first in the search-mode")
 (defvar notmuch-search-continuation)
 
 (defvar notmuch-search-disjunctive-regexp      "\\<[oO][rR]\\>")
@@ -811,9 +810,9 @@ current search results AND that are tagged with the given tag."
 
 ;;;###autoload
 (defun notmuch ()
-  "Run notmuch to display all mail with tag of 'inbox'"
+  "Run notmuch and display saved searches, known tags, etc."
   (interactive)
-  (notmuch-search "tag:inbox" notmuch-search-oldest-first))
+  (notmuch-hello))
 
 (setq mail-user-agent 'notmuch-user-agent)