From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1A2BE431FC3 for ; Tue, 25 Mar 2014 13:03:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 2.7 X-Spam-Level: ** X-Spam-Status: No, score=2.7 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JrcN2oNANxt7 for ; Tue, 25 Mar 2014 13:03:21 -0700 (PDT) Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 5EED7431FBD for ; Tue, 25 Mar 2014 13:03:21 -0700 (PDT) Received: by mail-we0-f180.google.com with SMTP id p61so662678wes.25 for ; Tue, 25 Mar 2014 13:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=qxHBDXXqb7o2/BHPLqGTOLQrmsQmJN9engFxjbpBaW8=; b=LS6M6DujuE2hNxuvPFyYxkhrcvIZM7CaxDwPdlg4uZlHg6evULD9g7z76Z5r3/fHx5 I0xxQNoiG6lSG4Mx7XsnJP9rOivGC22uyd3l+8E8D9iu8Vu36noBFPz7kftmvhfmBJLi +Vzuax8iQpdGcAOSN6j/XW89LYnJi3OyNr8xBoqoDqxu5Wfyp3fQhl0gG0EhOnbmFdp/ FvWmjdxJBYU9Rx4DHg+7J76NXaSX1TUNpwBeFKxGgmYgFkpYAz+HojpfBDZX1KwsuTh3 +Ecr0kXWGX8PZqt4erMJRK7mxBtDOnKr1P3kV8uzBo026BxP/rNW1hAKOGAqULqy3stx 5UhQ== X-Received: by 10.180.12.233 with SMTP id b9mr25795847wic.8.1395777797431; Tue, 25 Mar 2014 13:03:17 -0700 (PDT) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPSA id gz1sm11117824wib.14.2014.03.25.13.03.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Mar 2014 13:03:16 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [Patch v3 0/3] emacs: show: redesign unread/read logic Date: Tue, 25 Mar 2014 20:03:10 +0000 Message-Id: <1395777793-13297-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.10.4 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Tue, 25 Mar 2014 20:03:29 -0000 This is the latest version of the redesign of the unread/read logic. Now that the tag update code is in this is relatively simple. The previous version (which included an early version of the tag update code) is at id:1387065197-15776-1-git-send-email-markwalters1009@gmail.com The series consists of three patches. The first makes the test suite run the post-command-hooks. This is bremner's version from id:1390578744-30516-1-git-send-email-david@tethera.net (which is much nicer than my original version). This patch has been reviewed by Tomi in id:m21tzxns8p.fsf@guru.guru-group.fi and me in id:87d2jizjlu.fsf@qmul.ac.uk The second patch adds a stub function linked to the post-command-hook to mark messages read. This is a convenient place to test other possible logics. The third patch adds my attempt at a plausible logic. I find it works very well: it usually does both what I expect and what I want. Somewhat surprisingly for a moderately significant change all tests pass unchanged. Finally, the tests do not pass after Patch 2 but before Patch 3. I have left these two patches split to make it easy for other people to test other unread logic, but we might want to merge the two when commiting. Best wishes Mark Mark Walters (3): test: make test_emacs call post-command-hook emacs: show: add an update seen function to post-command-hook emacs: show: make `seen' mean user viewed whole message emacs/notmuch-show.el | 91 +++++++++++++++++++++++++++++++++++++++++-------- test/test-lib.el | 11 ++++++ test/test-lib.sh | 2 +- 3 files changed, 88 insertions(+), 16 deletions(-) -- 1.7.10.4