unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Ian Main <imain@stemwinder.org>
To: notmuch@notmuchmail.org
Subject: RE: [PATCH] VIM v2: Add a 'tag all' folder option.
Date: Fri, 24 Oct 2014 00:14:48 -0700	[thread overview]
Message-ID: <5449fc68cbccc_2c4deefe94d@ovo.mains.priv.notmuch> (raw)
In-Reply-To: <1412208162-30436-1-git-send-email-imain@stemwinder.org>

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~
>  
>  <enter>	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 = {
>  	\ '<Enter>':	'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
> 

  reply	other threads:[~2014-10-24  7:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02  0:02 [PATCH] VIM v2: Add a 'tag all' folder option Ian Main
2014-10-24  7:14 ` Ian Main [this message]
2014-11-15  8:54 ` David Bremner
2014-11-15 13:35   ` Tomi Ollila

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=5449fc68cbccc_2c4deefe94d@ovo.mains.priv.notmuch \
    --to=imain@stemwinder.org \
    --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).