unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Ioan-Adrian Ratiu <adi@adirat.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 0/4] Add refresh all buffers functionality
Date: Sat, 10 Sep 2016 17:28:15 +0300	[thread overview]
Message-ID: <20160910142819.19349-1-adi@adirat.com> (raw)

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

             reply	other threads:[~2016-09-10 14:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-10 14:28 Ioan-Adrian Ratiu [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160910142819.19349-1-adi@adirat.com \
    --to=adi@adirat.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).