[PATCH 0/4] Add refresh all buffers functionality

Subject: [PATCH 0/4] Add refresh all buffers functionality

Date: Sat, 10 Sep 2016 17:28:15 +0300

To: notmuch@notmuchmail.org

Cc:

From: Ioan-Adrian Ratiu


This patch series adds a function to refresh all buffers, including an
option to silently refresh them in the background i.e. to not show the
newly refreshed buffer in any window.

This is very useful for asynchronously updating all buffers when new
mail arrives, using logic similar to the following (it's what I use):

(setq process-connection-type nil)

(defun done-index-sentinel (process event)
  (notmuch-refresh-all-buffers t)
  (message "Mail sync complete"))

(defun done-sync-sentinel (process event)
  (message "Indexing mail using notmuch")
  (set-process-sentinel (start-process "notmuch" nil "notmuch" "new")
			'done-index-sentinel))

(defun run-mail-sync ()
  (message "Syncing mail in background")
  (set-process-sentinel (start-process "mbsync" nil "mbsync" "gmail")
			  'done-sync-sentinel))

(run-with-idle-timer 600 nil 'run-mail-sync)

Ioan-Adrian Ratiu (4):
  emacs: reuse buffer when refreshing searches
  emacs: adjust all types of notmuch show buffers
  emacs: add refresh buffer optional no-display arg
  emacs: add refresh all buffers function

 emacs/notmuch-lib.el  | 25 ++++++++++++++++++++++---
 emacs/notmuch-show.el | 11 ++++++++++-
 emacs/notmuch.el      | 24 ++++++++++++++++--------
 3 files changed, 48 insertions(+), 12 deletions(-)

-- 
2.9.3


Thread: