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 38796431E64 for ; Mon, 30 Jan 2012 12:18:22 -0800 (PST) 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 1HV8e93A8y0r for ; Mon, 30 Jan 2012 12:18:21 -0800 (PST) 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 70A2E431FBC for ; Mon, 30 Jan 2012 12:18:21 -0800 (PST) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1Rrxg9-0000fG-C7; Mon, 30 Jan 2012 20:18:17 +0000 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1Rrxg9-0005ZF-4x; Mon, 30 Jan 2012 20:18:17 +0000 From: Mark Walters To: David Edmondson , notmuch@notmuchmail.org Subject: Re: [PATCH 5/5] emacs: Retain the state of the buffer during `notmuch-show-refresh-view'. In-Reply-To: <1327941064-20027-6-git-send-email-dme@dme.org> References: <1327486729-18052-1-git-send-email-dme@dme.org> <1327941064-20027-1-git-send-email-dme@dme.org> <1327941064-20027-6-git-send-email-dme@dme.org> User-Agent: Notmuch/0.11+137~g98adc3d (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Mon, 30 Jan 2012 20:19:23 +0000 Message-ID: <87k449vt84.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 94.192.233.223 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 0fcd79af7769ebfd293b4acca4c4f2c0 (of first 20000 bytes) X-SpamAssassin-Score: -1.8 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 -1.8 points. Summary of the scoring: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [138.37.6.40 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 0.5 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean 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: Mon, 30 Jan 2012 20:18:22 -0000 On Mon, 30 Jan 2012 16:31:04 +0000, David Edmondson wrote: > Record the state of the buffer during `notmuch-show-refresh-view'. > > In this context, "state" is defined as: > - the open/closed state of each message, > - the current message. This looks great! I have two very minor queries one of which may class as bikeshedding. The first is that I currently sometimes use = (that is notmuch-show-refresh-view) as a way to go back to the original state (ie which messages are open and back to the first message) so I am not sure the keep state version should completely replace the old one. (Maybe there is an alternative way to achieve the same effect that I don't know!) Secondly in > (defun notmuch-show-refresh-view () > "Refresh the current view. > > Refreshes the current view, observing changes in cryptographic preferences." > (interactive) > - (let ((inhibit-read-only t)) > - (erase-buffer)) > - (notmuch-show-worker notmuch-show-thread-id notmuch-show-parent-buffer > - notmuch-show-query-context)) > + (let ((inhibit-read-only t) > + (state (notmuch-show-capture-state))) > + (erase-buffer) > + (notmuch-show-worker notmuch-show-thread-id notmuch-show-parent-buffer > + notmuch-show-query-context) > + (notmuch-show-apply-state state))) how would you feel about a (notmuch-show-message-adjust) at the end? Other than that this is excellent. Best wishes Mark