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 9219E429E2A for ; Mon, 27 Jun 2011 13:43:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, 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 6Ci6j-Ga6fAV for ; Mon, 27 Jun 2011 13:43:37 -0700 (PDT) Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.216.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 17D23431FD0 for ; Mon, 27 Jun 2011 13:43:37 -0700 (PDT) Received: by qyk29 with SMTP id 29so1801288qyk.5 for ; Mon, 27 Jun 2011 13:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+OxYrq7szWM7d4/DjmmD8km3fu08VlBqJg65vUw+5TQ=; b=A3fzITVPNPBcdc28XjvtvptAXDH/b7rdXOUsi/j+g15Ah+0Nriem0Sss/WsXDeTPOZ QZDhn+ffVZake1EZYkmYubu+SLFcn4fZu4Mj1xC/0IM6r/ysrZ/JgnG3uh7glLMc6OaW umna4x0TogqQox+Vo1UsQ6p/lVMzAg+eT/qB8= MIME-Version: 1.0 Received: by 10.229.126.229 with SMTP id d37mr3021868qcs.24.1309207416186; Mon, 27 Jun 2011 13:43:36 -0700 (PDT) Sender: amdragon@gmail.com Received: by 10.229.32.197 with HTTP; Mon, 27 Jun 2011 13:43:36 -0700 (PDT) In-Reply-To: <87mxh319un.fsf@servo.factory.finestructure.net> References: <1307032735-27427-1-git-send-email-jrollins@finestructure.net> <1307120466-4980-1-git-send-email-jrollins@finestructure.net> <87wrgccedd.fsf@yoom.home.cworth.org> <87mxh319un.fsf@servo.factory.finestructure.net> Date: Mon, 27 Jun 2011 16:43:36 -0400 X-Google-Sender-Auth: MTVgaHzDWG94p1XM12d9DzM1PR0 Message-ID: Subject: Re: [PATCH] Do not attept to output part raw if part is not GMimePart. From: Austin Clements To: Jameson Graef Rollins Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Notmuch Mail 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, 27 Jun 2011 20:43:37 -0000 On Mon, Jun 27, 2011 at 1:07 PM, Jameson Graef Rollins wrote: > On Thu, 23 Jun 2011 16:33:18 -0700, Carl Worth wrote: >> I'd like to investigate this case a little bit to help answer the >> question of whether "notmuch should have done anything in this case". > > Hi, Carl. =A0You can see this error if you try to output raw a multipart/= * > or message/rfc822 part, ie: > > servo:~ 0$ notmuch show --part=3D1 --format=3Draw id:"87wrgccedd.fsf@yoom= .home.cworth.org" >/dev/null > > (process:29838): GLib-GObject-WARNING **: invalid cast from `GMimeMultipa= rtSigned' to `GMimePart' > > (process:29838): gmime-CRITICAL **: g_mime_part_get_content_object: asser= tion `GMIME_IS_PART (mime_part)' failed > servo:~ 0$ > > Gmime seems to be successfully casting the part into GMimePart and then > outputting the content, but it does produce the warning on stderr. Just to clarify my understanding, --format=3Draw is only intended to work on either the whole message (special-cased in do_show_single) or a leaf MIME part, and in any other case, it will output nothing? The raw output test cases seem pretty thin. (BTW, I believe the show restructuring I have under way should both lift this restriction and eliminate the special case.)