From: Mark Walters Date: Sat, 5 Oct 2013 16:56:30 +0000 (+0100) Subject: Re: Emacs: how to remove "unread" tag while reading emails X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b28411be88b04a8436835b72d9662e395d2a9903;p=notmuch-archives.git Re: Emacs: how to remove "unread" tag while reading emails --- diff --git a/f2/6122750cb0e9ebb4db631adf0185418f6577e9 b/f2/6122750cb0e9ebb4db631adf0185418f6577e9 new file mode 100644 index 000000000..59ec6e685 --- /dev/null +++ b/f2/6122750cb0e9ebb4db631adf0185418f6577e9 @@ -0,0 +1,210 @@ +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 976AC431FBC + for ; Sat, 5 Oct 2013 09:56:44 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 nZfJuDap6fzP for ; + Sat, 5 Oct 2013 09:56:38 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 7D1AD431FAF + for ; Sat, 5 Oct 2013 09:56:38 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1VSV9c-000637-1L; Sat, 05 Oct 2013 17:56:32 +0100 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1VSV9b-0003R0-LP; Sat, 05 Oct 2013 17:56:31 +0100 +From: Mark Walters +To: Austin Clements +Subject: Re: Emacs: how to remove "unread" tag while reading emails +In-Reply-To: <20131005162202.GJ21611@mit.edu> +References: <87hadi0xse.fsf@boo.workgroup> <87pprk3whs.fsf@qmul.ac.uk> + <20131005162202.GJ21611@mit.edu> +User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Sat, 05 Oct 2013 17:56:30 +0100 +Message-ID: <87li274pxd.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +X-Sender-Host-Address: 93.97.24.31 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 0e5ca494ea25bf283177f089d80daee1 (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 0.0 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +Cc: notmuch@notmuchmail.org +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, 05 Oct 2013 16:56:44 -0000 + + +On Sat, 05 Oct 2013, Austin Clements wrote: +> Great list. +> +> One of the problems with the current approach, which most of these +> options share, is that there's no feedback. For example, when I enter +> a thread, I have no idea if the first message was unread or not. I'd +> like a solution that either naturally doesn't have this problem, that +> visually indicates that a message *was* unread, or that delays all +> unread marking until you leave the thread (possibly combined with a +> visual indication of what will be marked unread). Bonus points if +> it's easy to adjust what happens, such as saying "keep everything +> unread" or "keep everything unread except this one". + +I like the idea of not doing the update until you actually leave the +buffer. + +> To this end, here are my two proposals: +> +> A1) Mark whole thread read when you leave it (via q, X, A or friends) +> and provide a binding to leave a thread without marking it read (C-x k +> would do, but we should provide an explicit one; perhaps C-u prefixing +> other "leave" bindings? For once, C-u is easy to remember because u +> is the first letter of unread). +> +> A2) Like A1, but mark only messages up to and containing point when +> you leave a thread. + +I like A2 but would like to check exactly what you meant: would this +only mark open messages (ie not collapsed messages) up to point? + +I also like the prefix argument for q etc idea but I have a plausible +variation: ctrl-u q (etc) could say "mark 4 messages unread y/N?" so you +could easily see what it would do (but default to not doing it). I am +imagining not updating read/unread as the less common case. I guess if +we provide functions for each case it is easy for a user to configure. + +(Actually is it easy for a user to configure how prefix arguments work?) + +The only time in my use this would do the wrong thing is if I open all +messages with M-Ret + +I think this also simplifies the mark-read code quite substantially +which is nice. + +Best wishes + +Mark + + + + + +> In either case, I'd like an echo message when I leave the thread +> telling me what happened ("Thread marked as read", "First 3 messages +> marked as read; thread archived", etc.). These would blend especially +> well with undo, because they would bundle together all read marking +> into a single action that would make sense to undo ("Thread marked as +> read [C-/ to undo]"). + +> +> Both options are highly predictable and easy to understand. They +> don't lose information about which messages were unread when you +> entered a thread. And they're easy to adjust (you can always -unread +> a message manually and then C-u q or whatever to leave without +> touching anything else). +> +> Quoth Mark Walters on Oct 05 at 10:19 am: +>>=20 +>> Hello +>>=20 +>> I agree that the unread tag does not work well. There are some instances +>> which I would class as plain bugs (notmuch-show-next-message which is +>> bound to N marks the new message read even if it is collapsed) and +>> other instances where it is not clear what the correct behaviour should +>> be. +>>=20 +>> I have messed around a bit and there seem to be a lot of possible +>> variants and I don't know whether any would have any consensus. +>>=20 +>> One clear divide is whether we should only mark "visited messages" (ie +>> ones reached using space, n,N,p,P etc in the current bindings) or we +>> should also make messages seen by scrolling past (eg with page down). +>>=20 +>> Anyway here is a list of some possibilities. In all cases I assume we do +>> not mark any collapsed message read. +>>=20 +>> 1) Mark a message read when we visit it. +>> 2) Mark a message read when we visit it and the leave it with a "visit +>> move" (eg n for next message) +>>=20 +>> 3) Mark a message read if we see the start of the message in the buffer.= +=20 +>> 4) Mark a message read if we have seen the start and end of the message +>> in the buffer. +>> 5) Mark a message read if we see the end of the message after seeing the +>> start (rationale moving to the top of the buffer is likely "movement" +>> rather than "reading") +>>=20 +>> 6) Something based on how we leave the message: eg page down could mark +>> all messages which were fully visible read, n (next-open message) could +>> mark the message being left read.=20 +>> 7) Similar to 6) but something where read necessarily includes have seen +>> the start of the message. +>>=20 +>> I think all of these are reasonably easy to implement, and I think I +>> know which I would like (something like 5 or 7) but it would be +>> interesting to know if there is any general view or any view on how +>> customisable this should be. +>>=20 +>> Does anyone have any thoughts? +>>=20 +>> Best wishes +>>=20 +>> Mark +>>=20 +>>=20 +>>=20 +>> On Wed, 18 Sep 2013, Gregor Zattler wrote: +>> > Dear notmuchers, +>> > +>> > I had difficulties to reliably remove the "unread" tag from +>> > messages. Mostly I page through threads with the space bar and +>> > all is well. But when the beginning of the thread is already +>> > collapsed and I "jump" in the middle of a message pressing space +>> > bar does not remove the unread tag. It's only removed when +>> > *entering* the message via space bar from the previous message. +>> > So the last press on space bar in the previous message jumps to +>> > the next message and at the same time removes its unread tag. +>> > +>> > This seems strange to me. I would say the unread tag should be +>> > removed when leaving the message with the last press on space +>> > bar, indicating that one really paged trough the whole message +>> > instead of only seeing the very beginning of it. +>> > +>> > What=E2=80=99s the rationale to this behaviour? Am I missing somethin= +g?=20=20 +>> > +>> > Thanks for your attention, gregor