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 1D063431FDC for ; Sun, 1 Dec 2013 02:10:26 -0800 (PST) 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 Zd-SzbGcn+2D for ; Sun, 1 Dec 2013 02:10:19 -0800 (PST) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 668E4431FD0 for ; Sun, 1 Dec 2013 02:10:19 -0800 (PST) Received: by mail-wg0-f54.google.com with SMTP id n12so9875502wgh.9 for ; Sun, 01 Dec 2013 02:10:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=9ogf33Vu3qwdlzllUlBhZOSLK/4pgLZMSZ2cfm00IO4=; b=VVRlXVm1qqnGwnIqfa9ImWU2AJGgXEkbMqXDbbv1jcFMB2xFC5XgWsCkhovy5S084r HS2Rr8JnPWlxA7tMmZt6vYZyvmOgTC/38UqIHK7n0setX5Jw05BXc4u4svZBkP82Jms8 UxdUHoTUB+6oCxlU6IQ9kS04EA9CHib71ormFpmzTMqMkYd4DxQRg7bqVT78z3p/9jFv PGF4Q0YVHqJ7Nwc82QPbApS7vB0zYBKTUvebh1WZLAElCb+HktaITZBQuIla3XM15v+e Qwz0U0B/Mf5xP9WYJYwUyN67MDYB9O7QrTouZ5531xqNqwE+F/fGoRXHcODAwwtRCDnn eBHg== X-Received: by 10.180.206.41 with SMTP id ll9mr13388609wic.7.1385892150353; Sun, 01 Dec 2013 02:02:30 -0800 (PST) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPSA id qc10sm111039177wic.9.2013.12.01.02.02.29 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 01 Dec 2013 02:02:29 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH WIP v2 0/5] emacs: show: redesign unread/read logic Date: Sun, 1 Dec 2013 10:02:21 +0000 Message-Id: <1385892147-16994-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.9.1 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: Sun, 01 Dec 2013 10:10:26 -0000 This is further wip of the message at id:1385285551-5158-1-git-send-email-markwalters1009@gmail.com see there for some discussion of the design. This series is still definitely wip: one reason for posting is so people can play with different strategies for marking read easily. (As WIP tree's unread handling is broken and the tests need updating.) The series consists of three parts: the first 4 patches add the notion of seen: this means the user has seen the message but the message has typically not been marked read yet. The seen messages are marked read when the user quits the show buffer unless the user quits with prefix-arg quit. In all cases an informative message is shown. The fifth patch adds a psot-command-hook stub for updating the seen status. This seems a natural place to do the update as it means however the user navugates around the buffer (eg next-message or page-down etc) the update gets done. This is intended to be an easy place for other people to try out their own mark read strategies. The final patch implements something pretty close to what I would like for marking seen/read. A message is deemed seen provided the user has seen the top of the message, and has seen either the bottom of the message or a point at least some customisable number of lines into the message. The customisable number of lines can either be a fixed number e.g. 20, or a number depending on the height of the current window e.g. the default is 3/4 of the window height. The idea is a message seen if the user has seen the entire message, or enough of it they have to have noticed it. The figure of 3/4 also means that the notmuch commands like next-message which place the top of the message at the top of the window automatically mark the message seen as either the whole message or at least one window full must be visible. I would be very grateful for any comments on whether this behaves as people would expect, what they would want instead etc Best wishes Mark Mark Walters (6): emacs: show: add a function to test for unread emacs: show: add some seen helpers emacs: show: sync seen to read on quit and refresh emacs: show: use the `seen' interface emacs: show: add an update seen function to post-command-hook emacs: show: make `seen' mean user viewed whole message emacs/notmuch-show.el | 163 ++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 148 insertions(+), 15 deletions(-) -- 1.7.9.1