unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/4] Add refresh all buffers functionality
@ 2016-09-10 14:28 Ioan-Adrian Ratiu
  2016-09-10 14:28 ` [PATCH 1/4] emacs: reuse buffer when refreshing searches Ioan-Adrian Ratiu
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-09-10 14:28 UTC (permalink / raw)
  To: notmuch

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

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

end of thread, other threads:[~2016-09-17  8:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-10 14:28 [PATCH 0/4] Add refresh all buffers functionality Ioan-Adrian Ratiu
2016-09-10 14:28 ` [PATCH 1/4] emacs: reuse buffer when refreshing searches Ioan-Adrian Ratiu
2016-09-16 19:59   ` Mark Walters
2016-09-10 14:28 ` [PATCH 2/4] emacs: adjust all types of notmuch show buffers Ioan-Adrian Ratiu
2016-09-16 20:34   ` Mark Walters
2016-09-17  8:21     ` Ioan-Adrian Ratiu
2016-09-10 14:28 ` [PATCH 3/4] emacs: add refresh buffer optional no-display arg Ioan-Adrian Ratiu
2016-09-10 14:28 ` [PATCH 4/4] emacs: add refresh all buffers function Ioan-Adrian Ratiu
2016-09-16 20:40   ` Mark Walters
2016-09-17  8:58     ` Ioan-Adrian Ratiu

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