From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id D66806DE0B64 for ; Sat, 10 Sep 2016 07:28:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.721 X-Spam-Level: X-Spam-Status: No, score=-0.721 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ADI-XNzxsSl7 for ; Sat, 10 Sep 2016 07:28:23 -0700 (PDT) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by arlo.cworth.org (Postfix) with ESMTPS id 989286DE0B14 for ; Sat, 10 Sep 2016 07:28:22 -0700 (PDT) Received: by mail-wm0-f53.google.com with SMTP id 1so76970197wmz.1 for ; Sat, 10 Sep 2016 07:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adirat-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=/iNlD5quVcQKgjNWHc7KH5qG+HSiKkx89EShjEsKSec=; b=qGuVH0Gor5TxIbwC8XgiNh7uN05nMDZKHmlOci6Er9HuJhKEPwSfViSK48Mo2C2nWi KwfRybNNpejZJ7IC4O581uXQ392dxwc4aMF6PmW9kNRXAZpa84e3lZXD30eF3oz/yxsv S2nzKz7XbRKMdI8E73u7j2MzKtCqmD8kB2mXZZaKF2AkOkEgFldjElqydH+GmK9LC0LQ NPi8uGyB2Y+rayp6p1LXb2SAHPq6TGSpZCN32FzJgRkAB9ObXvFaM0PXR8FDTaEuaadH bDgYXP0I6OKD00fpmfVUX0+YuIm9JVUQagY+tFzmgoyFTgBL+9q8oOTdxlhTRjubfqDG dv7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=/iNlD5quVcQKgjNWHc7KH5qG+HSiKkx89EShjEsKSec=; b=dBVfJlwwy+HShtH12ggamhuQO0SEsCtoAXzac1gYtZM+nSDlkTF+tPQM0cfBPnwtYH lUsMUB8ziH4LEIQa0ceJ3TpA2MlSJiRQ2OydYsW0/Uglq0aFp5lDprniqV4/pgWZW08e QaC9YZxbggEpZGs093DuTogFQwHuyUTyEv5L8cM7RzO9ZWAZ+ZuQtb+37KykxFnGdwZN C80e+lQ3+ISkDHdlt8hBmBaD930pTrtjiOF8rTn8OkB0jFB2zFQO+WH+eC3Vc9U32yAE PtJSrUaM8dhXDu9O95T2Bj87nW7lvUndZ2TKnXtrjNX9e6yFcLen62spgli3KFgwmyIK aPzw== X-Gm-Message-State: AE9vXwOKyUAMMDMc30S7+//P96Mrn+iBugx6Svww7HCxKVXKLl9gDm5yPA9iaV+WtSNecA== X-Received: by 10.194.20.65 with SMTP id l1mr8796991wje.71.1473517700326; Sat, 10 Sep 2016 07:28:20 -0700 (PDT) Received: from adiPC.lan ([188.24.78.211]) by smtp.gmail.com with ESMTPSA id s6sm8555457wjm.25.2016.09.10.07.28.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Sep 2016 07:28:19 -0700 (PDT) From: Ioan-Adrian Ratiu To: notmuch@notmuchmail.org Subject: [PATCH 0/4] Add refresh all buffers functionality Date: Sat, 10 Sep 2016 17:28:15 +0300 Message-Id: <20160910142819.19349-1-adi@adirat.com> X-Mailer: git-send-email 2.9.3 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Sep 2016 14:28:25 -0000 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