From d762c018380107dbdd2045fe7c9bba756753bcc3 Mon Sep 17 00:00:00 2001
From: Sergey Matveev <stargrave@stargrave.org>
Date: Mon, 21 Feb 2022 11:12:45 +0300
Subject: [PATCH] Native Q search query

---
 cmd/muttrc-gen.sh     | 4 ++--
 doc/usage/search.texi | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmd/muttrc-gen.sh b/cmd/muttrc-gen.sh
index c22cff1..95fb914 100755
--- a/cmd/muttrc-gen.sh
+++ b/cmd/muttrc-gen.sh
@@ -20,8 +20,8 @@ bind pager o noop
 macro pager o "|$cmds/x-urlview.sh\n"
 set pager_index_lines = 6
 
-macro index <F8> "<shell-escape>mu find --muhome mu --clearlinks --format=links --linksdir=search " "mu find"
-macro index <F9> "<change-folder-readonly>search<enter>" "mu find results"
+set query_command = "mu find --muhome mu --clearlinks --format=links --linksdir=search %s"
+macro index <F2> "<change-folder-readonly>search<enter>" "search results"
 folder-hook search "set index_format = \"%4C [%D] %s (%F)\""
 
 macro index,pager,browser <F1> "<next-unread-mailbox><enter>"
diff --git a/doc/usage/search.texi b/doc/usage/search.texi
index 7468bd1..ee974c7 100644
--- a/doc/usage/search.texi
+++ b/doc/usage/search.texi
@@ -1,12 +1,12 @@
 @node Search
 @section Search
 
-Press @code{<F8>} in Mutt's index and enter your mu/Xapian search query.
+Press @code{Q} in Mutt's index and enter your mu/Xapian search query.
 Let's search for articles mentioning
 @url{https://en.wikipedia.org/wiki/Planetfall, Planetfall} during
 2019-2021 period: @code{Planetfall date:2019..2021}. @command{mu} will
 create symbolic links in @file{search/} subdirectory to the message.
-Press @code{<F9>} to switch that mailbox:
+Press @code{<F2>} to switch that mailbox:
 
 @verbatim
    1 [2021-12-20 07:08] Missed Classic: Stationfall - When Food Dispensers Attack (The Adventurers Guild)
-- 
2.51.0