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 DD671429E5F for ; Wed, 18 Jan 2012 00:12:32 -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 doDVaUDRJ3Uo for ; Wed, 18 Jan 2012 00:12:32 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 39D32429E27 for ; Wed, 18 Jan 2012 00:12:32 -0800 (PST) Received: by werp13 with SMTP id p13so1173305wer.26 for ; Wed, 18 Jan 2012 00:12:31 -0800 (PST) Received: by 10.216.131.102 with SMTP id l80mr6471140wei.59.1326874351006; Wed, 18 Jan 2012 00:12:31 -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 hv1sm21105077wib.1.2012.01.18.00.12.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jan 2012 00:12:30 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id D8F43A0397; Wed, 18 Jan 2012 08:12:27 +0000 (GMT) To: Jameson Graef Rollins , 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: <1326823531-14549-4-git-send-email-jrollins@finestructure.net> 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+64~g42e8f66 (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Wed, 18 Jan 2012 08:12:27 +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: Wed, 18 Jan 2012 08:12:33 -0000 --=-=-= Content-Type: text/plain On Tue, 17 Jan 2012 10:05:29 -0800, Jameson Graef Rollins wrote: > -(defun notmuch-show-next-open-message () > +(defun notmuch-show-next-open-message (&optional pop-at-end) > "Show the next message." > (interactive) > - (let (r) > + (let ((r) > + (parent-buffer notmuch-show-parent-buffer)) No need for brackets around `r'. Please put initialised local variables before uninitialised. > (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)))))) Can you explain in words how this is expected to behave please? --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8WfusACgkQaezQq/BJZRYUqgCeMPMtMIHu0wVqtVzQaSwJ23Oa bBMAn3xxVcIg38a5dDfVYvnE2z52QDJV =HIsh -----END PGP SIGNATURE----- --=-=-=--