unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] notmuch.vim can now archive threads using a from the show screen
@ 2011-04-04  1:46 Jeff Richards
  2011-04-04 15:58 ` Felipe Contreras
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Richards @ 2011-04-04  1:46 UTC (permalink / raw)
  To: notmuch

Implements the already shelled out function for archiving messages while looking at a message.

---
 vim/plugin/notmuch.vim |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index 67501d8..eae5297 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -507,7 +507,7 @@ function! s:NM_show_next_thread()
 endfunction
 
 function! s:NM_show_archive_thread()
-        echo 'not implemented'
+        call <SID>NM_add_remove_tags(b:nm_search_words, '-', ['unread','inbox'])
 endfunction
 
 function! s:NM_show_mark_read_then_archive_thread()
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] notmuch.vim can now archive threads using a from the show screen
  2011-04-04  1:46 [PATCH] notmuch.vim can now archive threads using a from the show screen Jeff Richards
@ 2011-04-04 15:58 ` Felipe Contreras
  2011-04-05  5:31   ` [PATCH v2] " Jeff Richards
  0 siblings, 1 reply; 4+ messages in thread
From: Felipe Contreras @ 2011-04-04 15:58 UTC (permalink / raw)
  To: Jeff Richards; +Cc: notmuch

On Mon, Apr 4, 2011 at 4:46 AM, Jeff Richards <jeff@jrichards.ca> wrote:
> Implements the already shelled out function for archiving messages while looking at a message.

I'm not sure if this should also remove from 'unread', or we should
have two actions, one that removes from both unread and 'inbox', and
another one only for 'inbox'.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] notmuch.vim can now archive threads using a from the show screen
  2011-04-04 15:58 ` Felipe Contreras
@ 2011-04-05  5:31   ` Jeff Richards
  2011-05-04 20:11     ` Felipe Contreras
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Richards @ 2011-04-05  5:31 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: notmuch

On Mon, 4 Apr 2011 18:58:48 +0300, Felipe Contreras <felipe.contreras@gmail.com> wrote:
> On Mon, Apr 4, 2011 at 4:46 AM, Jeff Richards <jeff@jrichards.ca> wrote:
> > Implements the already shelled out function for archiving messages while looking at a message.
> 
> I'm not sure if this should also remove from 'unread', or we should
> have two actions, one that removes from both unread and 'inbox', and
> another one only for 'inbox'.
> 

Yep, that's a good point.  Following the functionality for the search screen, the show screen should just remove the inbox tag and that's it.  

---
 vim/plugin/notmuch.vim |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index 67501d8..eae5297 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -507,7 +507,7 @@ function! s:NM_show_next_thread()
 endfunction
 
 function! s:NM_show_archive_thread()
-        echo 'not implemented'
+        call <SID>NM_add_remove_tags(b:nm_search_words, '-', ['inbox'])
 endfunction
 
 function! s:NM_show_mark_read_then_archive_thread()
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] notmuch.vim can now archive threads using a from the show screen
  2011-04-05  5:31   ` [PATCH v2] " Jeff Richards
@ 2011-05-04 20:11     ` Felipe Contreras
  0 siblings, 0 replies; 4+ messages in thread
From: Felipe Contreras @ 2011-05-04 20:11 UTC (permalink / raw)
  To: Jeff Richards; +Cc: notmuch

On Tue, Apr 5, 2011 at 8:31 AM, Jeff Richards <jeff@jrichards.ca> wrote:
> On Mon, 4 Apr 2011 18:58:48 +0300, Felipe Contreras <felipe.contreras@gmail.com> wrote:
>> On Mon, Apr 4, 2011 at 4:46 AM, Jeff Richards <jeff@jrichards.ca> wrote:
>> > Implements the already shelled out function for archiving messages while looking at a message.
>>
>> I'm not sure if this should also remove from 'unread', or we should
>> have two actions, one that removes from both unread and 'inbox', and
>> another one only for 'inbox'.
>>
>
> Yep, that's a good point.  Following the functionality for the search screen, the show screen should just remove the inbox tag and that's it.
>
> ---
>  vim/plugin/notmuch.vim |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
> index 67501d8..eae5297 100644
> --- a/vim/plugin/notmuch.vim
> +++ b/vim/plugin/notmuch.vim
> @@ -507,7 +507,7 @@ function! s:NM_show_next_thread()
>  endfunction
>
>  function! s:NM_show_archive_thread()
> -        echo 'not implemented'
> +        call <SID>NM_add_remove_tags(b:nm_search_words, '-', ['inbox'])
>  endfunction
>
>  function! s:NM_show_mark_read_then_archive_thread()
> --
> 1.7.2.3

Actually I had sent a patch for this long time ago:
http://mid.gmane.org/1291933240-5328-1-git-send-email-felipe.contreras@gmail.com

I have pushed that one.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-04 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04  1:46 [PATCH] notmuch.vim can now archive threads using a from the show screen Jeff Richards
2011-04-04 15:58 ` Felipe Contreras
2011-04-05  5:31   ` [PATCH v2] " Jeff Richards
2011-05-04 20:11     ` Felipe Contreras

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).