From: Nicolas Lesser <blitzrakete@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] Add an option to hide the saved search query, disabled by default.
Date: Fri, 22 Mar 2019 17:20:12 +0100 [thread overview]
Message-ID: <20190322162012.12986-1-blitzrakete@gmail.com> (raw)
---
vim/notmuch.vim | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index ad8b7c80..2c6b471f 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -60,6 +60,7 @@ let s:notmuch_reader_default = 'mutt -f %s'
let s:notmuch_sendmail_default = 'sendmail'
let s:notmuch_folders_count_threads_default = 0
let s:notmuch_compose_start_insert_default = 1
+let s:notmuch_hide_saved_search_query = 0
function! s:new_file_buffer(type, fname)
exec printf('edit %s', a:fname)
@@ -437,6 +438,10 @@ function! s:set_defaults()
let g:notmuch_compose_start_insert = s:notmuch_compose_start_insert_default
endif
+ if !exists('g:notmuch_hide_saved_search_query')
+ let g:notmuch_hide_saved_search_query = s:notmuch_hide_saved_search_query
+ endif
+
if !exists('g:notmuch_custom_search_maps') && exists('g:notmuch_rb_custom_search_maps')
let g:notmuch_custom_search_maps = g:notmuch_rb_custom_search_maps
endif
@@ -645,7 +650,11 @@ ruby << EOF
}
$searches << search
count = count_threads ? q.count_threads : q.count_messages
- b << "%9d %-20s (%s)" % [count, name, search]
+ if VIM::evaluate('g:notmuch_hide_saved_search_query') == 1
+ b << "%9d %-20s" % [count, name]
+ else
+ b << "%9d %-20s (%s)" % [count, name, search]
+ end
end
end
end
--
2.21.0
reply other threads:[~2019-03-22 16:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190322162012.12986-1-blitzrakete@gmail.com \
--to=blitzrakete@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).