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