From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 635A0429E5B for ; Mon, 30 Jan 2012 22:18:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 sx1vmGhtKRDq for ; Mon, 30 Jan 2012 22:18:03 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C757F429E34 for ; Mon, 30 Jan 2012 22:18:02 -0800 (PST) Received: by wgbdt12 with SMTP id dt12so4817652wgb.2 for ; Mon, 30 Jan 2012 22:18:01 -0800 (PST) Received: by 10.180.84.105 with SMTP id x9mr1445693wiy.19.1327990681616; Mon, 30 Jan 2012 22:18:01 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id fr8sm59678987wib.10.2012.01.30.22.17.59 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jan 2012 22:18:00 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id 71D6F9FDD7; Tue, 31 Jan 2012 06:17:58 +0000 (GMT) To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH 5/5] emacs: Retain the state of the buffer during `notmuch-show-refresh-view'. In-Reply-To: <87k449vt84.fsf@qmul.ac.uk> 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> <87k449vt84.fsf@qmul.ac.uk> User-Agent: Notmuch/0.11+133~gdd93bad (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Tue, 31 Jan 2012 06:17:58 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: Tue, 31 Jan 2012 06:18:03 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 30 Jan 2012 20:19:23 +0000, Mark Walters wrote: > The first is that I currently sometimes use =3D (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!) Thinking about it afterwards, I agree. That is: - '=3D' should behave as though the buffer was remade anew, - the toggle commands should retain the state. > Secondly in >=20 > > (defun notmuch-show-refresh-view () > > "Refresh the current view. > >=20=20 > > Refreshes the current view, observing changes in cryptographic prefere= nces." > > (interactive) > > - (let ((inhibit-read-only t)) > > - (erase-buffer)) > > - (notmuch-show-worker notmuch-show-thread-id notmuch-show-parent-buff= er > > - 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-bu= ffer > > + notmuch-show-query-context) > > + (notmuch-show-apply-state state))) >=20 > how would you feel about a (notmuch-show-message-adjust) at the end? Agreed. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8nh5YACgkQaezQq/BJZRbqYQCeK1+8GwopR8+aueOjazMnlS0R RrAAnRRrD4GGZXJyyYW4ZVDOsvkztTsU =uhk7 -----END PGP SIGNATURE----- --=-=-=--