diff options
author | Austin Clements <amdragon@MIT.EDU> | 2013-09-03 17:45:17 -0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2013-09-10 08:05:50 -0300 |
commit | 8a111b58d8fac3d126fd194fcdad6635cbd54e4e (patch) | |
tree | fde723e9d942afcfb2c4f7bbe528e51f00d75d12 /emacs | |
parent | 654260420d3be14a4218c327a571fe56873f9abb (diff) |
emacs: Consistently use configured sort order
Previously, if `notmuch-search' was called interactively (bound to "s"
in search and show, but not hello), it would always use newest-first.
However, `notmuch-hello-search' (bound to "s" in hello) and
`notmuch-hello-widget-search` would call it with the user-configured
sort order. This inconsistency seems unintentional, so change
`notmuch-search' to use the user-configured sort order when called
interactively.
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/notmuch.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el index f3ce8400..c9641865 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -906,8 +906,18 @@ Other optional parameters are used as follows: target-thread: A thread ID (without the thread: prefix) that will be made current if it appears in the search results. target-line: The line number to move to if the target thread does not - appear in the search results." - (interactive) + appear in the search results. + +When called interactively, this will prompt for a query and use +the configured default sort order." + (interactive + (list + ;; Prompt for a query + nil + ;; Use the default search order (if we're doing a search from a + ;; search buffer, ignore any buffer-local overrides) + (default-value notmuch-search-oldest-first))) + (let* ((query (or query (notmuch-read-query "Notmuch search: "))) (buffer (get-buffer-create (notmuch-search-buffer-title query)))) (switch-to-buffer buffer) |