From 880e4b30aba54deb405d1d5e7601fae8773e8c21 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 6 Sep 2014 17:22:09 +0100 Subject: [PATCH] [Patch v2 0/2] emacs: show: mark messages read if seen in buffer --- 03/51ab59e5122ab4f0488e5895a401dddbfd4685 | 100 ++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 03/51ab59e5122ab4f0488e5895a401dddbfd4685 diff --git a/03/51ab59e5122ab4f0488e5895a401dddbfd4685 b/03/51ab59e5122ab4f0488e5895a401dddbfd4685 new file mode 100644 index 000000000..cfafb5327 --- /dev/null +++ b/03/51ab59e5122ab4f0488e5895a401dddbfd4685 @@ -0,0 +1,100 @@ +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 161FE431FBF + for ; Sat, 6 Sep 2014 09:22:22 -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 BHcd5Jq7qgPo for ; + Sat, 6 Sep 2014 09:22:16 -0700 (PDT) +Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com + [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 59267431FB6 for ; Sat, 6 Sep 2014 09:22:16 -0700 + (PDT) +Received: by mail-wg0-f41.google.com with SMTP id l18so13012471wgh.12 + for ; Sat, 06 Sep 2014 09:22:15 -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=IJHJGm5niuuhrybROmq3x4oe7EMVPf1Br/EgZQtbZng=; + b=VuaF8uiGaUI53hqjJWIH+qenlnP0C2E21z+Cm6m7poAlaw+RtDypKMP5gWVn1tF8qv + +HlgqXUcocnWiY1dx+7VZOANcYXDsWkQ/TNhHfO/Le/s/XjdiEUiRhFkwhOi07QEgB6L + hwL1aK4TMxpIbfmdVjnD0rzZMLnqH1550dIO2hRgUs/5ZTqw0o/tmHtLLeWL7nXoZJU1 + j06QPRPV16LFocGBl3gyHJNnXvIGmGK7gQzFiAWscMATxHEd/fN8SK0BMUpEzhzqTZHS + Olhsr8GdHXWlnh9At/bKtIMCgA/zC2CrMbnU3HjvBpuiUJYakn6buDU+z44a5eX0Xt+j + /LQw== +X-Received: by 10.180.98.131 with SMTP id ei3mr10915345wib.56.1410020534945; + Sat, 06 Sep 2014 09:22:14 -0700 (PDT) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by mx.google.com with ESMTPSA id hm5sm5002129wjb.2.2014.09.06.09.22.13 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 06 Sep 2014 09:22:14 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [Patch v2 0/2] emacs: show: mark messages read if seen in buffer +Date: Sat, 6 Sep 2014 17:22:09 +0100 +Message-Id: <1410020531-24419-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: Sat, 06 Sep 2014 16:22:22 -0000 + +This is v2 of this patch: v1 is at id:1405533339-7666-1-git-send-email-markwalters1009@gmail.com + +The first patch just documents what is required for a mark-read +function. The second patch adds my preferred logic of marking a +message seen if `enough' of it has been visible in the buffer. + +There are two changes from v1. First patch 1 is new. Secondly I have +modified the defcustom for the second patch. It is slightly fiddly as +my function has a parameter the default function does not. The +defcustom in the previous patch worked but it was unable to parse +itself so when you revisited the defcustom it looked like you had +specified the lisp manually rather than having selected one of the two +options. + +The new version fixes this so the defcustom behaves exactly as you would expect. + +I like this version of the mark read function; but it is quite a lot +of code (all unused unless the user selects this option so it is low +risk). If people would prefer not to include it then I can just post +the relevant code to the wiki and people can add it to their .emacs +file if they want this function. + +Best wishes + +Mark + + + + +Mark Walters (2): + emacs: show: document the mark unread defcustom function + emacs: show: mark messages unread if seen in buffer + + emacs/notmuch-show.el | 82 +++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 80 insertions(+), 2 deletions(-) + +-- +1.7.10.4 + -- 2.26.2