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 CA6EA429E21 for ; Mon, 28 Nov 2011 10:26:56 -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 cVgMJMmfOmB7 for ; Mon, 28 Nov 2011 10:26:56 -0800 (PST) Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU [18.7.68.34]) by olra.theworths.org (Postfix) with ESMTP id 51BB8431FB6 for ; Mon, 28 Nov 2011 10:26:56 -0800 (PST) X-AuditID: 12074422-b7ff56d00000092f-08-4ed3d26e439e Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP id B7.02.02351.E62D3DE4; Mon, 28 Nov 2011 13:26:54 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id pASIQsWc026499; Mon, 28 Nov 2011 13:26:54 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pASIQptH006361 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Mon, 28 Nov 2011 13:26:53 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RV5wl-0002IS-Ps; Mon, 28 Nov 2011 13:28:55 -0500 Date: Mon, 28 Nov 2011 13:28:55 -0500 From: Austin Clements To: Jameson Graef Rollins Subject: Re: [PATCH 1/2] emacs: remove some code duplication in notmuch-show Message-ID: <20111128182855.GB2050@mit.edu> References: <1322259811-10834-1-git-send-email-dmitry.kurochkin@gmail.com> <87lir0xr3g.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lir0xr3g.fsf@servo.finestructure.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupileLIzCtJLcpLzFFi42IR4hRV1s27dNnPYO4Na4urW/vZLfbs87K4 fnMmswOzx93TXB47Z91l93i26hZzAHMUl01Kak5mWWqRvl0CV8bRZ39ZCpawVRw4cYa5gXEK axcjJ4eEgInElKYvLBC2mMSFe+vZuhi5OIQE9jFKHG6eyAiSEBLYwCjx7oITROIkk8T7Mx/Z IZwljBKd33vZQapYBFQlXn3YA2azCWhIbNu/HKxbRMBMoufLHzCbWcBLYsKnU0wgtrCAj8Tk BfeZuxg5OHgFtCXWTw6CWFYqMXHLMTYQm1dAUOLkzCcsEK1aEjf+vWQCKWcWkJZY/o8DJMwp YCrxcfl6ZhBbVEBFYsrJbWwTGIVmIemehaR7FkL3AkbmVYyyKblVurmJmTnFqcm6xcmJeXmp RbqmermZJXqpKaWbGEFBzu6itIPx50GlQ4wCHIxKPLyc2y/7CbEmlhVX5h5ilORgUhLllb8A FOJLyk+pzEgszogvKs1JLT7EKMHBrCTCyxQAlONNSaysSi3Kh0lJc7AoifNy7XTwExJITyxJ zU5NLUgtgsnKcHAoSfAeugjUKFiUmp5akZaZU4KQZuLgBBnOAzS8G6SGt7ggMbc4Mx0if4pR UUqc9zRIQgAkkVGaB9cLS0KvGMWBXhHmPQhSxQNMYHDdr4AGMwEN5ph5AWRwSSJCSqqBUaWf X7LPMN0p/8j++rI1k8sfPCkT6Xhfdf+Gtni000qbLJ91/tf8G+6y+1bJ+uZ1+P1aEXx0z+1F fd91Ns16+/44b8V1l6ofs2+YSy52S36WyRO0MfnXdd095fLdMxx4puz/n8Hzqii0QewDu2Ot +moJ7g9XN7LbhO79eEPl/BXOFSdZ/7doK7EUZyQaajEXFScCAG75+bkdAwAA 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: Mon, 28 Nov 2011 18:26:56 -0000 Quoth Jameson Graef Rollins on Nov 28 at 6:24 am: > On Sat, 26 Nov 2011 02:23:30 +0400, Dmitry Kurochkin wrote: > > -(defun notmuch-show-get-header (header) > > +(defun notmuch-show-get-header (header &optional props) > > "Return the named header of the current message, if any." > > - (plist-get (notmuch-show-get-prop :headers) header)) > > + (plist-get (notmuch-show-get-prop :headers props) header)) > > Hey, Dmitry. It looks like the new plist-get call is assuming props is > defined, but it looks like it's only optional in the argument list. > Wouldn't the function fail if the props argument is not supplied? If props isn't provided, it'll be nil, so notmuch-show-get-prop will also interpret its optional props argument as not being provided.