--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 39188431FC2\r
+ for <notmuch@notmuchmail.org>; Thu, 8 May 2014 17:20:24 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.7\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.7 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id dA3yeha04dDM for <notmuch@notmuchmail.org>;\r
+ Thu, 8 May 2014 17:20:20 -0700 (PDT)\r
+Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com\r
+ [74.125.82.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 90528431FAE for <notmuch@notmuchmail.org>; Thu, 8 May 2014 17:20:20 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f43.google.com with SMTP id l18so3183666wgh.26\r
+ for <notmuch@notmuchmail.org>; Thu, 08 May 2014 17:20:19 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id;\r
+ bh=DBBaMR7oBGmLYh/OThuWyuwJzq4sSjKVD1Hiu7+32Ec=;\r
+ b=Jp6eUbwsda5D47GdaS1iwSv+QuzgeniPHDwfzMbijwhd/PBFfrL0wezKSOCar5vajL\r
+ INnqbMDuGTNHiwSMxuiAmpEXSCk+Vn8/06xD5WzbW6NntO4oIgSxglJIxZHyxAeyDHD+\r
+ 5zWTghEOQgDn+A+/VbCasljNtjFD11sYaJNuYp3LpYJRHwZvfsZ1C7UVh4jR9C6q3eVx\r
+ Im1zslJdI2HSfMjRTKTp/EuNQyGH3rH7v7aO11hO9UaRt2RXlOifEui/6o/n+x/zEwTS\r
+ U+sFJu6hqb1lhmmBkBKJyQ+B1l85i2zVUObLODQSE2J/3N2xFq+xZd6wM5yFPTWow9n2\r
+ to6Q==\r
+X-Received: by 10.180.228.42 with SMTP id sf10mr649073wic.48.1399594819388;\r
+ Thu, 08 May 2014 17:20:19 -0700 (PDT)\r
+Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
+ by mx.google.com with ESMTPSA id l4sm2055968wiy.0.2014.05.08.17.20.18\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Thu, 08 May 2014 17:20:18 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 0/2] emacs: show: redesign unread/read logic \r
+Date: Fri, 9 May 2014 01:20:06 +0100\r
+Message-Id: <1399594808-2815-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.10.4\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 09 May 2014 00:20:24 -0000\r
+\r
+This is v4 of this set. v3 is at id:1395777793-13297-1-git-send-email-markwalters1009@gmail.com\r
+\r
+David (dme) was not keen on the logic in the previous patch so I have\r
+tried to make it rather more customisable and made this version much\r
+closer to the existing logic.\r
+\r
+This version marks the current message read if it is open. It doesn't\r
+care how you get there: whether it is notmuch commands n/N/p/P next\r
+message etc, emacs commands like scroll up, mouse clicks etc.\r
+\r
+The only proviso is it will only mark a message read once (in a single\r
+buffer and between refreshes) as otherwise it is impossible for a user\r
+to choose to mark a message unread.\r
+\r
+I, personally, like my previous logic much more. But with this setup\r
+that can be customized easily in my .emacs (we may choose to add other\r
+options into mainline later). Also I think this series fixes all of\r
+the problems with the current read/unread logic mentioned in\r
+id:87a9atmpkf.fsf@qmul.ac.uk are fixed.\r
+\r
+The first patch is unchanged. Since the new mark-read function is\r
+small it folded neatly into the patch removing the old unread logic.\r
+\r
+Finally, as with previous versions, all tests pass.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+\r
+\r
+Mark Walters (2):\r
+ test: make test_emacs call post-command-hook\r
+ emacs: show: add an update seen function to post-command-hook\r
+\r
+ emacs/notmuch-show.el | 43 ++++++++++++++++++++++++++++---------------\r
+ test/test-lib.el | 11 +++++++++++\r
+ test/test-lib.sh | 2 +-\r
+ 3 files changed, 40 insertions(+), 16 deletions(-)\r
+\r
+-- \r
+1.7.10.4\r
+\r