RE: [PATCH] VIM v2: Add a 'tag all' folder option.
authorIan Main <imain@stemwinder.org>
Fri, 24 Oct 2014 07:14:48 +0000 (00:14 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:05:34 +0000 (10:05 -0800)
5d/1a69e2360113d2ade9e7f91cdaac87d54420db [new file with mode: 0644]

diff --git a/5d/1a69e2360113d2ade9e7f91cdaac87d54420db b/5d/1a69e2360113d2ade9e7f91cdaac87d54420db
new file mode 100644 (file)
index 0000000..27a3c43
--- /dev/null
@@ -0,0 +1,121 @@
+Return-Path: <imain@redhat.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 5565D429E25\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 00:14:59 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id TKUe92J9tYgD for <notmuch@notmuchmail.org>;\r
+       Fri, 24 Oct 2014 00:14:53 -0700 (PDT)\r
+Received: from cmta13.telus.net (cmta13.telus.net [209.171.16.86])\r
+       by olra.theworths.org (Postfix) with ESMTP id AFFC5431FBD\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 00:14:53 -0700 (PDT)\r
+Received: from ovo.mains.priv ([207.102.88.62]) by cmta13.telus.net with TELUS\r
+       id 6vEr1p00D1LiWEf01vErt2; Fri, 24 Oct 2014 01:14:52 -0600\r
+X-Authority-Analysis: v=2.0 cv=OrmRPVDt c=1 sm=2\r
+       a=EcQDfIwDZEqJA1f7rVUV8Q==:17 a=IkcTkHD0fZMA:10 a=tsa3CZZnAAAA:8\r
+       a=3PvxmG4qxLAccYsB3QYA:9 a=QEXdDO2ut3YA:10\r
+       a=EcQDfIwDZEqJA1f7rVUV8Q==:117\r
+X-Telus-Outbound-IP: 207.102.88.62\r
+Received: from ovo.mains.priv (localhost.localdomain [127.0.0.1])\r
+       by ovo.mains.priv (8.14.8/8.14.8) with ESMTP id s9O7Enk5011377\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 00:14:50 -0700\r
+Received: (from imain@localhost)\r
+       by ovo.mains.priv (8.14.8/8.14.8/Submit) id s9O7Em0j011376;\r
+       Fri, 24 Oct 2014 00:14:48 -0700\r
+X-Authentication-Warning: ovo.mains.priv: imain set sender to imain@redhat.com\r
+       using -f\r
+Date: Fri, 24 Oct 2014 00:14:48 -0700\r
+From: Ian Main <imain@stemwinder.org>\r
+To: notmuch@notmuchmail.org\r
+Message-ID: <5449fc68cbccc_2c4deefe94d@ovo.mains.priv.notmuch>\r
+In-Reply-To: <1412208162-30436-1-git-send-email-imain@stemwinder.org>\r
+References: <1412208162-30436-1-git-send-email-imain@stemwinder.org>\r
+Subject: RE: [PATCH] VIM v2: Add a 'tag all' folder option.\r
+Mime-Version: 1.0\r
+Content-Type: text/plain;\r
+ charset=utf-8\r
+Content-Transfer-Encoding: 7bit\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 24 Oct 2014 07:14:59 -0000\r
+\r
+This one is pretty straightforward and useful too.\r
+\r
+    Ian\r
+\r
+Ian Main wrote:\r
+> This adds the ability to mark an entire folder as read (or any other\r
+> tags you like once you map it).\r
+> \r
+> This update adds documentation for the command.\r
+> \r
+>     Ian\r
+> ---\r
+>  vim/notmuch.txt |  1 +\r
+>  vim/notmuch.vim | 11 +++++++++++\r
+>  2 files changed, 12 insertions(+)\r
+> \r
+> diff --git a/vim/notmuch.txt b/vim/notmuch.txt\r
+> index 4374102..33cbe6e 100644\r
+> --- a/vim/notmuch.txt\r
+> +++ b/vim/notmuch.txt\r
+> @@ -47,6 +47,7 @@ MAPPINGS                                   *notmuch-mappings*\r
+>  Folder view~\r
+>  \r
+>  <enter>     Show selected search\r
+> +A   Archive (-inbox -unread) an entire folder\r
+>  s   Enter a new search\r
+>  =   Refresh\r
+>  c   Compose a new mail\r
+> diff --git a/vim/notmuch.vim b/vim/notmuch.vim\r
+> index 331e930..3f2444b 100644\r
+> --- a/vim/notmuch.vim\r
+> +++ b/vim/notmuch.vim\r
+> @@ -11,6 +11,7 @@ let g:loaded_notmuch = "yep"\r
+>  let g:notmuch_folders_maps = {\r
+>      \ '<Enter>':    'folders_show_search()',\r
+>      \ 's':          'folders_search_prompt()',\r
+> +    \ 'A':          'folders_tag_all("-inbox -unread")',\r
+>      \ '=':          'folders_refresh()',\r
+>      \ 'c':          'compose()',\r
+>      \ }\r
+> @@ -378,6 +379,16 @@ ruby << EOF\r
+>  EOF\r
+>  endfunction\r
+>  \r
+> +function! s:folders_tag_all(tags)\r
+> +ruby << EOF\r
+> +    n = $curbuf.line_number\r
+> +    s = $searches[n - 1]\r
+> +    t = VIM::evaluate('a:tags')\r
+> +    do_tag(s, t)\r
+> +EOF\r
+> +    call s:folders_refresh()\r
+> +endfunction\r
+> +\r
+>  function! s:folders()\r
+>      call s:new_buffer('folders')\r
+>      ruby folders_render()\r
+> -- \r
+> 1.9.3\r
+> \r
+\r
+\r