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

Changes since v1 (thank you Mark for your feedback):
    * Major rewrite/simplification of the notmuch-show refresh patch to
    support simultaneous refreshing multiple windows displaying a buffer
    * Removed the notmuch-show-message-adjust () patch because it's not
    needed after the above rewrite
    * Rewrote notmuch-refresh-all-buffers () to use dolist instead of
    while loop
    * Minor commit message/metadata improvements

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: notmuch-show: refresh all windows showing a buffer
  emacs: add refresh buffer optional no-display arg
  emacs: notmuch-lib: add refresh all buffers function

 emacs/notmuch-lib.el  | 22 +++++++++++++++++++---
 emacs/notmuch-show.el | 19 +++++++++++++------
 emacs/notmuch.el      | 24 ++++++++++++++++--------
 3 files changed, 48 insertions(+), 17 deletions(-)

-- 
2.10.0

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

end of thread, other threads:[~2016-10-06 15:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24 20:07 [PATCH v2 0/4] Add refresh all buffers functionality Ioan-Adrian Ratiu
2016-09-24 20:07 ` [PATCH v2 1/4] emacs: reuse buffer when refreshing searches Ioan-Adrian Ratiu
2016-09-25 10:17   ` Mark Walters
2016-09-24 20:07 ` [PATCH v2 2/4] emacs: notmuch-show: refresh all windows showing a buffer Ioan-Adrian Ratiu
2016-09-25 10:14   ` Mark Walters
2016-09-25 12:28     ` Ioan-Adrian Ratiu
2016-09-24 20:07 ` [PATCH v2 3/4] emacs: add refresh buffer optional no-display arg Ioan-Adrian Ratiu
2016-09-25 11:07   ` Mark Walters
2016-10-06 12:25     ` Ioan-Adrian Ratiu
2016-09-24 20:07 ` [PATCH v2 4/4] emacs: notmuch-lib: add refresh all buffers function Ioan-Adrian Ratiu
2016-09-25 11:11   ` Mark Walters
2016-09-24 20:23 ` [PATCH v2 0/4] Add refresh all buffers functionality Ioan-Adrian Ratiu
2016-09-24 21:02   ` Ioan-Adrian Ratiu
2016-09-25  0:09     ` David Bremner
2016-09-25  0:20       ` Ioan-Adrian Ratiu
2016-09-25  6:20         ` Mark Walters
2016-09-25  7:32           ` Tomi Ollila
2016-10-06 13:59             ` Daniel Kahn Gillmor
2016-10-06 14:32               ` Tomi Ollila
2016-10-06 15:00               ` 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).