From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 7349F6DE0F4C for ; Fri, 22 Mar 2019 09:20:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.395 X-Spam-Level: X-Spam-Status: No, score=-0.395 tagged_above=-999 required=5 tests=[AWL=-0.195, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8viaEWN6wax4 for ; Fri, 22 Mar 2019 09:20:18 -0700 (PDT) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by arlo.cworth.org (Postfix) with ESMTPS id 6F35A6DE0F07 for ; Fri, 22 Mar 2019 09:20:18 -0700 (PDT) Received: by mail-wr1-f50.google.com with SMTP id p10so3028140wrq.1 for ; Fri, 22 Mar 2019 09:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7+HNgMdPA/HaDNj/5WhQ4NuLK/1sdRAdwlARIvXx0mw=; b=J6EnloYXMi2rtBlq2KXOiGxiYyDIrA0/woGS65IS4OSA+1SM+tEwYH4KhjbibsTeDR Da57UhA0O15tf3o5tU3fW9VIq54qpcfA6ft1mEcA2GHu9aWdMC6d/CGEHxbLb2b3lAJ9 NsvUJ3mtFpOYkxNf91E4v2AFnirMhJ4zBzS7s+pgxierTBcQjl7jT+c5h9f6wLnsCYYc eoRUAML3xVdLJ0m4SccmVA5ZCy5zIlaUGxqA7577MHPN+F3hXCgamRoP8AgpSrA8SglC bsHQEccQbMuagk/i+itvFEZNRiFbqOVex3jzfSgTh9sWCgK/eaBcCVwF2qZwLswKD7Wb zZDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7+HNgMdPA/HaDNj/5WhQ4NuLK/1sdRAdwlARIvXx0mw=; b=LaHSNT2X04trUmBHi5yi0Bvxo1shay0WpzWkJOFHUxws9Ee/xEo2t1VLqi5fy+BlwN u7BL5TXr/cmXJHlRXcNrLGvpEDSZQCOBEbc8BMSfxGyJNRWSXBHP5l+HxonzGsE3u5x+ 5pUE/QeSOCrOql4I4bIcPE7vvG+htGhr9iH52UngOTgcPpWTgu2/6keoklwkYTiQf9SZ z2EraJlJ8w8UV5WPL+5VmIpAh1H37OkYE2ghawCW5hj5u27SfvO958V4JfjKS62pRakw 7+n1Q8e2RpgesnT99hIOKWZtAIsLdZocChuWH/Uhq8KnMDCgCyQhdw3jZR6y+3U9/zQD 8tIw== X-Gm-Message-State: APjAAAXoAbUAcx6ap1ZoQ37sKUaGnUt8bX4lguD2svzNTZLDtkPI3Ay/ aubLYTAcaTK4qmq1RX7X7L8zkkOB X-Google-Smtp-Source: APXvYqyXof53iO+0SYjcbkeJb/ZGiUX4JZ7Rl3wTw6cv7TlC931v+J17YnUhdR3/soaMn16auN5tTA== X-Received: by 2002:a5d:40c7:: with SMTP id b7mr6986440wrq.311.1553271616644; Fri, 22 Mar 2019 09:20:16 -0700 (PDT) Received: from localhost ([141.70.26.85]) by smtp.gmail.com with ESMTPSA id y3sm8902941wrh.18.2019.03.22.09.20.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Mar 2019 09:20:15 -0700 (PDT) From: Nicolas Lesser 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 Message-Id: <20190322162012.12986-1-blitzrakete@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Mar 2019 16:20:21 -0000 --- 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