On Sat, Oct 15 2016, Mark Walters <markwalters1...@gmail.com> wrote:

> Version 5 of this set is at
> id:1476045223-5238-1-git-send-email-markwalters1...@gmail.com
>
> The changes from the previous version fix Tomi's comments (give an
> error if the refresh function is non-interactive rather than failing
> silently, and making the refresh-all-buffers function interactive).
>
> I also added a global keybinding of M-= for the refresh all buffers
> function. I can see this being useful if you are away from your
> computer for some time, you just press M-= and all your already open
> buffers are not up to date. 
>
> We could similarly add M-G for poll and refresh all buffers. Do people
> have any thoughts on that? It would be a trivial followup patch.
>
> The interdiff is below (except the added interactive in
> notmuch-refresh-all-buffers is missing in the interdiff)
>
> Best wishes

looks good to me and seems to work. +1

>
> Mark
>
>
>
> Ioan-Adrian Ratiu (4):
>   emacs: notmuch-search: add no-display functionality
>   emacs: notmuch-search-refresh-view: reuse buffer
>   emacs: notmuch-show: refresh all windows displaying buffer
>   emacs: notmuch-lib: add refresh all buffers function
>
> Mark Walters (4):
>   emacs: tree: make refresh use generic binding
>   emacs: make the refresh functions more consistent
>   emacs: hello: stop update from forcing the buffer to be displayed
>   emacs: add global keybinding M-= for refresh all buffers
>
>  emacs/notmuch-hello.el |  7 ++++---
>  emacs/notmuch-lib.el   | 22 ++++++++++++++++++----
>  emacs/notmuch-show.el  | 19 +++++++++++++------
>  emacs/notmuch-tree.el  |  1 -
>  emacs/notmuch.el       | 16 +++++++++++-----
>  5 files changed, 46 insertions(+), 19 deletions(-)
>
>
> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
> index 388abdb..1f0d167 100644
> --- a/emacs/notmuch-lib.el
> +++ b/emacs/notmuch-lib.el
> @@ -151,6 +151,7 @@ For example, if you wanted to remove an \"inbox\" tag and 
> add an
>      (define-key map "z" 'notmuch-tree)
>      (define-key map "m" 'notmuch-mua-new-mail)
>      (define-key map "=" 'notmuch-refresh-this-buffer)
> +    (define-key map (kbd "M-=") 'notmuch-refresh-all-buffers)
>      (define-key map "G" 'notmuch-poll-and-refresh-this-buffer)
>      (define-key map "j" 'notmuch-jump-search)
>      map)
> @@ -410,21 +411,15 @@ of its command symbol."
>        (pop-to-buffer (help-buffer)))))
>  
>  (defvar notmuch-buffer-refresh-function nil
> -  "Function to call to refresh the current buffer.
> -
> -The function should be interactive.")
> +  "Function to call to refresh the current buffer.")
>  (make-variable-buffer-local 'notmuch-buffer-refresh-function)
>  
>  (defun notmuch-refresh-this-buffer ()
>    "Refresh the current buffer."
>    (interactive)
>    (when notmuch-buffer-refresh-function
> -    (if (and (commandp notmuch-buffer-refresh-function)
> -          (functionp notmuch-buffer-refresh-function))
> -     ;; Pass prefix argument, etc.
> -     (call-interactively notmuch-buffer-refresh-function)
> -      (error "%s is not an interactive function"
> -          notmuch-buffer-refresh-function))))
> +    ;; Pass prefix argument, etc.
> +    (call-interactively notmuch-buffer-refresh-function)))
>  
>  (defun notmuch-poll-and-refresh-this-buffer ()
>    "Invoke `notmuch-poll' to import mail, then refresh the current buffer."
>
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to