Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 39188431FC2 for ; Thu, 8 May 2014 17:20:24 -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 dA3yeha04dDM for ; Thu, 8 May 2014 17:20:20 -0700 (PDT) Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 90528431FAE for ; Thu, 8 May 2014 17:20:20 -0700 (PDT) Received: by mail-wg0-f43.google.com with SMTP id l18so3183666wgh.26 for ; Thu, 08 May 2014 17:20:19 -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=DBBaMR7oBGmLYh/OThuWyuwJzq4sSjKVD1Hiu7+32Ec=; b=Jp6eUbwsda5D47GdaS1iwSv+QuzgeniPHDwfzMbijwhd/PBFfrL0wezKSOCar5vajL INnqbMDuGTNHiwSMxuiAmpEXSCk+Vn8/06xD5WzbW6NntO4oIgSxglJIxZHyxAeyDHD+ 5zWTghEOQgDn+A+/VbCasljNtjFD11sYaJNuYp3LpYJRHwZvfsZ1C7UVh4jR9C6q3eVx Im1zslJdI2HSfMjRTKTp/EuNQyGH3rH7v7aO11hO9UaRt2RXlOifEui/6o/n+x/zEwTS U+sFJu6hqb1lhmmBkBKJyQ+B1l85i2zVUObLODQSE2J/3N2xFq+xZd6wM5yFPTWow9n2 to6Q== X-Received: by 10.180.228.42 with SMTP id sf10mr649073wic.48.1399594819388; Thu, 08 May 2014 17:20:19 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by mx.google.com with ESMTPSA id l4sm2055968wiy.0.2014.05.08.17.20.18 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 May 2014 17:20:18 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH v4 0/2] emacs: show: redesign unread/read logic Date: Fri, 9 May 2014 01:20:06 +0100 Message-Id: <1399594808-2815-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: Fri, 09 May 2014 00:20:24 -0000 This is v4 of this set. v3 is at id:1395777793-13297-1-git-send-email-markwalters1009@gmail.com David (dme) was not keen on the logic in the previous patch so I have tried to make it rather more customisable and made this version much closer to the existing logic. This version marks the current message read if it is open. It doesn't care how you get there: whether it is notmuch commands n/N/p/P next message etc, emacs commands like scroll up, mouse clicks etc. The only proviso is it will only mark a message read once (in a single buffer and between refreshes) as otherwise it is impossible for a user to choose to mark a message unread. I, personally, like my previous logic much more. But with this setup that can be customized easily in my .emacs (we may choose to add other options into mainline later). Also I think this series fixes all of the problems with the current read/unread logic mentioned in id:87a9atmpkf.fsf@qmul.ac.uk are fixed. The first patch is unchanged. Since the new mark-read function is small it folded neatly into the patch removing the old unread logic. Finally, as with previous versions, all tests pass. Best wishes Mark Mark Walters (2): test: make test_emacs call post-command-hook emacs: show: add an update seen function to post-command-hook emacs/notmuch-show.el | 43 ++++++++++++++++++++++++++++--------------- test/test-lib.el | 11 +++++++++++ test/test-lib.sh | 2 +- 3 files changed, 40 insertions(+), 16 deletions(-) -- 1.7.10.4