mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
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.
This commit is contained in:
parent
654260420d
commit
8a111b58d8
1 changed files with 12 additions and 2 deletions
|
@ -906,8 +906,18 @@ Other optional parameters are used as follows:
|
||||||
target-thread: A thread ID (without the thread: prefix) that will be made
|
target-thread: A thread ID (without the thread: prefix) that will be made
|
||||||
current if it appears in the search results.
|
current if it appears in the search results.
|
||||||
target-line: The line number to move to if the target thread does not
|
target-line: The line number to move to if the target thread does not
|
||||||
appear in the search results."
|
appear in the search results.
|
||||||
(interactive)
|
|
||||||
|
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: ")))
|
(let* ((query (or query (notmuch-read-query "Notmuch search: ")))
|
||||||
(buffer (get-buffer-create (notmuch-search-buffer-title query))))
|
(buffer (get-buffer-create (notmuch-search-buffer-title query))))
|
||||||
(switch-to-buffer buffer)
|
(switch-to-buffer buffer)
|
||||||
|
|
Loading…
Reference in a new issue