* [PATCH] VIM: Automatically refresh folder screen
@ 2014-10-01 16:36 Ian Main
2015-01-19 22:49 ` Bartosz Telenczuk
0 siblings, 1 reply; 8+ messages in thread
From: Ian Main @ 2014-10-01 16:36 UTC (permalink / raw)
To: notmuch
This patch makes the folder screen refresh each time you 'enter' it.
This way when you read a folder and mark items as read the changes are
reflected immediately when you return to the folder view.
Ian
---
vim/notmuch.vim | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 331e930..eb17d57 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -383,6 +383,9 @@ function! s:folders()
ruby folders_render()
call s:set_menu_buffer()
call s:set_map(g:notmuch_folders_maps)
+ autocmd BufEnter,WinEnter,BufWinEnter <buffer>
+ \ call s:folders_refresh()
+ augroup END
endfunction
"" root
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH] VIM: Automatically refresh folder screen
2014-10-01 16:36 [PATCH] VIM: Automatically refresh folder screen Ian Main
@ 2015-01-19 22:49 ` Bartosz Telenczuk
2015-01-21 18:38 ` Franz Fellner
0 siblings, 1 reply; 8+ messages in thread
From: Bartosz Telenczuk @ 2015-01-19 22:49 UTC (permalink / raw)
To: Ian Main, notmuch
Ian Main wrote:
> This patch makes the folder screen refresh each time you 'enter' it.
> This way when you read a folder and mark items as read the changes are
> reflected immediately when you return to the folder view.
That is a good starting point, but why don't we refresh every time we mark an item in the folder screen?
Bartosz
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] VIM: Automatically refresh folder screen
2015-01-19 22:49 ` Bartosz Telenczuk
@ 2015-01-21 18:38 ` Franz Fellner
2015-02-02 23:52 ` Bartosz Telenczuk
0 siblings, 1 reply; 8+ messages in thread
From: Franz Fellner @ 2015-01-21 18:38 UTC (permalink / raw)
To: Bartosz Telenczuk; +Cc: notmuch
Hi Bartosz,
Great to see one more person interested in notmuch-vim! Hopefully this will make review a little bit easier.
Bartosz Telenczuk wrote:
> Ian Main wrote:
> > This patch makes the folder screen refresh each time you 'enter' it.
> > This way when you read a folder and mark items as read the changes are
> > reflected immediately when you return to the folder view.
>
> That is a good starting point, but why don't we refresh every time we mark an item in the folder screen?
Personally I don't see the benefit. It's a useless call to notmuch for every cursor-move. Especially with the current inefficient implementation.
Pressing '=' will refresh the folder view manually. If you want to get notified about new mail it's better to call e.g. notify-send after notmuch new.
Automatic refresh after you finished reading your new mails and come back to folders IMHO makes sense.
But probably Ian has a different oppinion.
Franz
>
> Bartosz
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] VIM: Automatically refresh folder screen
2015-01-21 18:38 ` Franz Fellner
@ 2015-02-02 23:52 ` Bartosz Telenczuk
0 siblings, 0 replies; 8+ messages in thread
From: Bartosz Telenczuk @ 2015-02-02 23:52 UTC (permalink / raw)
To: Franz Fellner, Bartosz Telenczuk; +Cc: notmuch
Franz Fellner wrote:
> Hi Bartosz,
>
> Great to see one more person interested in notmuch-vim! Hopefully this will make review a little bit easier.
>
> Bartosz Telenczuk wrote:
> > Ian Main wrote:
> > > This patch makes the folder screen refresh each time you 'enter' it.
> > > This way when you read a folder and mark items as read the changes are
> > > reflected immediately when you return to the folder view.
> >
> > That is a good starting point, but why don't we refresh every time we mark an item in the folder screen?
>
> Personally I don't see the benefit. It's a useless call to notmuch for every cursor-move. Especially with the current inefficient implementation.
I meant that we should refresh after one tags a thread (for example archive it with "A" key). It is slightly annoying that the messages do not disappear after being archived. In my version of the plugin it also causes a wrong thread to be opened when I enter it.
Anyway, this is a small incremental change that can be implemented later.. It should not hold back the patch. These patches are already great and should accepted as soon as possible, so we can move forward and synchronize notmuch-repo with Ian's repo and possibly catch up with emacs (sic!) client.
Cheers,
Bartosz
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] VIM: Automatically refresh folder screen
@ 2014-10-01 16:41 Ian Main
2014-10-24 7:13 ` Ian Main
2014-11-15 8:08 ` David Bremner
0 siblings, 2 replies; 8+ messages in thread
From: Ian Main @ 2014-10-01 16:41 UTC (permalink / raw)
To: notmuch
This patch makes the folder screen refresh each time you 'enter' it.
This way when you read a folder and mark items as read the changes are
reflected immediately when you return to the folder view.
Ian
---
vim/notmuch.vim | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 331e930..eb17d57 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -383,6 +383,9 @@ function! s:folders()
ruby folders_render()
call s:set_menu_buffer()
call s:set_map(g:notmuch_folders_maps)
+ autocmd BufEnter,WinEnter,BufWinEnter <buffer>
+ \ call s:folders_refresh()
+ augroup END
endfunction
"" root
--
1.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH] VIM: Automatically refresh folder screen
2014-10-01 16:41 Ian Main
@ 2014-10-24 7:13 ` Ian Main
2014-11-15 8:08 ` David Bremner
1 sibling, 0 replies; 8+ messages in thread
From: Ian Main @ 2014-10-24 7:13 UTC (permalink / raw)
To: notmuch
Can I get someone to test this one? It's pretty simple and useful.
Ian
Ian Main wrote:
> This patch makes the folder screen refresh each time you 'enter' it.
> This way when you read a folder and mark items as read the changes are
> reflected immediately when you return to the folder view.
>
> Ian
> ---
> vim/notmuch.vim | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/vim/notmuch.vim b/vim/notmuch.vim
> index 331e930..eb17d57 100644
> --- a/vim/notmuch.vim
> +++ b/vim/notmuch.vim
> @@ -383,6 +383,9 @@ function! s:folders()
> ruby folders_render()
> call s:set_menu_buffer()
> call s:set_map(g:notmuch_folders_maps)
> + autocmd BufEnter,WinEnter,BufWinEnter <buffer>
> + \ call s:folders_refresh()
> + augroup END
> endfunction
>
> "" root
> --
> 1.9.3
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] VIM: Automatically refresh folder screen
2014-10-01 16:41 Ian Main
2014-10-24 7:13 ` Ian Main
@ 2014-11-15 8:08 ` David Bremner
2014-12-16 11:57 ` Franz Fellner
1 sibling, 1 reply; 8+ messages in thread
From: David Bremner @ 2014-11-15 8:08 UTC (permalink / raw)
To: Ian Main, notmuch
Ian Main <imain@stemwinder.org> writes:
> This patch makes the folder screen refresh each time you 'enter' it.
> This way when you read a folder and mark items as read the changes are
> reflected immediately when you return to the folder view.
It seems to work, but it is pretty slow for large mailboxes. I have
270000 unread messages and there is a pause of about 1 second when
returning to the "folder screen". I'm not sure, maybe the vim interface
is just overall not usable with such large search results?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] VIM: Automatically refresh folder screen
2014-11-15 8:08 ` David Bremner
@ 2014-12-16 11:57 ` Franz Fellner
0 siblings, 0 replies; 8+ messages in thread
From: Franz Fellner @ 2014-12-16 11:57 UTC (permalink / raw)
To: David Bremner; +Cc: notmuch
David Bremner wrote:
> Ian Main <imain@stemwinder.org> writes:
>
> > This patch makes the folder screen refresh each time you 'enter' it.
> > This way when you read a folder and mark items as read the changes are
> > reflected immediately when you return to the folder view.
>
> It seems to work, but it is pretty slow for large mailboxes. I have
> 270000 unread messages and there is a pause of about 1 second when
> returning to the "folder screen". I'm not sure, maybe the vim interface
> is just overall not usable with such large search results?
I remember the times (not that far away) when paging through the result of a query
in the emacs interface resulted in a lock of several seconds after each <PGDOWN> or
<DOWN> keypress, even in medium sized queries of 1000 queries. This went away in the
meantime.
I just found the issue that caused the lag in the vim interface:
https://github.com/imain/notmuch-vim/commit/649c18122befbabb52082b7d7f77abf863efc62b
Using query.count_messages instead of query.search_messages.count did the trick.
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-02-02 23:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-01 16:36 [PATCH] VIM: Automatically refresh folder screen Ian Main
2015-01-19 22:49 ` Bartosz Telenczuk
2015-01-21 18:38 ` Franz Fellner
2015-02-02 23:52 ` Bartosz Telenczuk
-- strict thread matches above, loose matches on Subject: below --
2014-10-01 16:41 Ian Main
2014-10-24 7:13 ` Ian Main
2014-11-15 8:08 ` David Bremner
2014-12-16 11:57 ` Franz Fellner
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).