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 A281640BFAD for ; Tue, 24 Aug 2010 05:10:13 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham 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 LlZbKOTNpj5I for ; Tue, 24 Aug 2010 05:10:02 -0700 (PDT) Received: from trail.lhotka.cesnet.cz (trail.lhotka.cesnet.cz [195.113.161.162]) by olra.theworths.org (Postfix) with ESMTP id 76F5B40BFAB for ; Tue, 24 Aug 2010 05:10:02 -0700 (PDT) Received: from localhost (missotis.lhotkovi.cz [172.29.2.201]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by trail.lhotka.cesnet.cz (Postfix) with ESMTPSA id 127403E0656; Tue, 24 Aug 2010 14:10:00 +0200 (CEST) From: Ladislav Lhotka To: Michal Sojka , notmuch@notmuchmail.org Subject: Re: problem with I-D announcements In-Reply-To: <87iq3a3bak.fsf@steelpick.2x.cz> References: <87pqxisy8p.fsf@cesnet.cz> <87iq3a3bak.fsf@steelpick.2x.cz> User-Agent: Notmuch/0.3.1-59-g676d251 (http://notmuchmail.org) Emacs/23.1.1 (i486-pc-linux-gnu) Date: Tue, 24 Aug 2010 14:09:59 +0200 Message-ID: <87r5ho6wko.fsf@cesnet.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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, 24 Aug 2010 12:10:13 -0000 On Mon, 16 Aug 2010 16:02:59 +0200, Michal Sojka wrote: > On Mon, 16 Aug 2010, Ladislav Lhotka wrote: > > I am experiencing a problem with a specific type of messages, namely > > announcements of new Internet drafts. One such message is shown below > > with all headers. > > > > In a search buffer, if I press [RET], the message is shown but the echo > > line says "Couldn't find access type". The [SPC] key then doesn't work, > > only "Beginning of buffer" is displayed in the echo area. Other > > commands, such as adding tags, work as usual. > > Greetings to another czech notmuch user :-) > > I can confirm the behavior you describe. It seems the error message is > generated by mm-extern-cache-contents in gnus/mm-extern.el. According to > comments in that file, it works with something called > "message/external-body". Currently, I have no clue what external-body > means but your message contains such thing. > > My poor Elisp knowledge doesn't allow me to debug the problem, but you > may want to check whether the same problem appears in Gnus and if so, > consult it with Gnus developers. With my faint Elisp expertise, I tried to investigate the problem a bit and it seems it is in the notmuch elisp part. The 'mm-extern-cache-contents' function you mentioned initializes the 'access-type' variable like this: (let* ((access-type (cdr (assq 'access-type (cdr (mm-handle-type handle))))) The 'handle' argument for the problematic message looks like this: (# ("message/external-body") nil nil nil nil nil nil) Now, 'mm-handle-type' function extracts the second member from 'handle', which is ("message/external-body"). Applying 'cdr' to this list yields necessarily nil and so access-type is always initialized to nil and consequently the error "Couldn't find access type" is reported. The ("message/external-body") list is constructed originally in 'notmuch-show-insert-bodypart' function and passed - as 'content-type' argument - through several stack frames. The use of 'cdr' and 'assq' functions in the above initialization expression however indicates that 'mm-extern-cache-contents' expects something more complex than just a simple list. Perhaps someone with deeper knowledge of notmuch elisp internals could fix this bug? Cheers, Lada > > Cheers, > Michal -- Ladislav Lhotka, CESNET PGP Key ID: E74E8C0C