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 A1F26429E5F for ; Wed, 18 Jan 2012 00:47:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.29 X-Spam-Level: X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 ld48wdOaInhS for ; Wed, 18 Jan 2012 00:47:23 -0800 (PST) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id 15ECD429E27 for ; Wed, 18 Jan 2012 00:47:23 -0800 (PST) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id 6BC2E2E50D11; Wed, 18 Jan 2012 00:47:20 -0800 (PST) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from finestructure.net (cpe-76-174-137-84.socal.res.rr.com [76.174.137.84]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id A50372E506BF; Wed, 18 Jan 2012 00:47:14 -0800 (PST) Received: by finestructure.net (Postfix, from userid 1000) id 334FB262; Wed, 18 Jan 2012 00:47:14 -0800 (PST) From: Jameson Graef Rollins To: David Edmondson , Notmuch Mail Subject: Re: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to pop out to parent buffer if at end In-Reply-To: References: <871uqy19yo.fsf@servo.finestructure.net> <1326823531-14549-1-git-send-email-jrollins@finestructure.net> <1326823531-14549-2-git-send-email-jrollins@finestructure.net> <1326823531-14549-3-git-send-email-jrollins@finestructure.net> <1326823531-14549-4-git-send-email-jrollins@finestructure.net> User-Agent: Notmuch/0.11+63~g6965a07 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Wed, 18 Jan 2012 00:47:11 -0800 Message-ID: <87aa5lqtww.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; 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: Wed, 18 Jan 2012 08:47:23 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 18 Jan 2012 08:12:27 +0000, David Edmondson wrote: > No need for brackets around `r'. Please put initialised local variables > before uninitialised. Yeah, that's another comment of Aron's that I forgot to fix this time around. Sorry about that. > > (while (and (setq r (notmuch-show-goto-message-next)) > > (not (notmuch-show-message-visible-p)))) > > (if r > > (progn > > (notmuch-show-mark-read) > > (notmuch-show-message-adjust)) > > - (goto-char (point-max))))) > > + (if (and parent-buffer pop-at-end) > > + (progn > > + (kill-this-buffer) > > + (switch-to-buffer parent-buffer) > > + (forward-line 1)) > > + (goto-char (point-max)))))) >=20 > Can you explain in words how this is expected to behave please? If there is not another message, but there is a parent buffer and the pop-at-end variable is set, kill this buffer, go the parent, and move to the next thread. Otherwise, go to the max point in the buffer. Do you see a problem? The one thing I do realize now is that the behavior might be slightly strange if the parent buffer is itself a show buffer. In that case, the forward-line part doesn't make any sense. It should check that the parent is a search buffer first. It should also use the notmuch-search function to jump to the next thread (notmuch-search-next-thread). The notmuch-show-next-thread function could use the same improvements. jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJPFocPAAoJEO00zqvie6q8lrsP/2UO2z+RclxA/p8ZB0N8ZOh4 B7Suov6NAtTyDiIGSGxROhtZn97hpXMAW3rdFMnIIYLrvMH5vMbjDbLxJm1iozTq 2rzE9izFi9TxdHEB7wrxd7Yd3dX/WNSy6IJIAvx2mYrYsC9ONBFXRLDS18AqZwCz 8kq/EkxREMrvZkLvC+eLQ8yTkSJf8NEgwQlxdOwx78lOD0w7p0zntd8/EzOU9Df7 jA6Sjb/GQELqm4x7+MVxorrXTFbqv2SMS1wZitaVSNA1ewXTLP9FxwnHowi/4KW3 L0Xci315+DqI4VzkIdaIE+LdlUevWxMxU3wmkNZTlNwO596QU4KeFUQ11/R55UAd T3bcvfqTDbFZ/U3Opbr46F6LztNzn3+y7rjzE1tIg14KArNcU7I6WffXPKXpBAh8 UoLYOkJmhJlx7AAdo5z69vdgv7LFzGFkoEgTylhoz+mRLPVPwD5taZuvCYPbbuHd kyJW6nN+j4nMZOExDBrjdO7xMWsPXREbk6bHzEaGrxbDAJOJQ27Eoa4g9OWM/ZAp VMdHZVoePh8iVWhlfHwImsjMprCNralGaVIlaA2JhhWqq4upts73Nj0PCG9oCzBf 95I5MlcyjTUtH7vebEuw83OyK0jP7VRBfgBBMUcKIpsa7E4u50Z9u0XQdUBiaqAG btqehWD7nvP+AXSUJW1q =q4eB -----END PGP SIGNATURE----- --=-=-=--