From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 942B46DE1117 for ; Fri, 11 Aug 2017 16:36:49 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -1.491 X-Spam-Level: X-Spam-Status: No, score=-1.491 tagged_above=-999 required=5 tests=[AWL=-0.690, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q07JU43p_JQn for ; Fri, 11 Aug 2017 16:36:48 -0700 (PDT) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by arlo.cworth.org (Postfix) with ESMTPS id 079856DE110A for ; Fri, 11 Aug 2017 16:36:47 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3F43220ED0; Fri, 11 Aug 2017 19:36:47 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Fri, 11 Aug 2017 19:36:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pnwbakers.com; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=JRIX9juM3ISk+WnMtV61+i61oqO43p0O1wCsTp HiyR0=; b=s5YNQcD6RgwduEAbI7n31QOFrl0ZHwbJO3/9EiD6WrYkdt7yrN9W+n KQmZouGeefDucDrqw/Jy6UKWt2Qd2LV+sK8E8IC3MeiMJHLtRBLs9zk8TeWU8qs4 eLJEhgnqc4BXBkOYLzu+cTb8ZMRJlRD/i+JxmF07XrXHTl4iiCcLo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=JRIX9juM3ISk+WnMtV 61+i61oqO43p0O1wCsTpHiyR0=; b=DblPNkhVGhMGOedSpSMUDARAfRU/5EZAEz AAvz3oEEHZrbBTjrKp+3v9l61X48OvVzS+MQmCCm56q8eZqAvd4LmA7PKKhrdgT5 4V6uldLdYyOFthJg1zGZj8/cwOuS9DKDu8oc8NzbBfHsUDnUcQKQJ2c9NTb5Yb6S xpTGt94UffHQFZxYVzhZFdywhWE6z+xw/9m9VlP5QsS8/fwsr46maXzPrSobu3XY l3t0dULdQq5Xc6g92ZVZ42H2ZO6mnGtpGZxUwGu9Iq+BoRhIw5c2Um0Ys8otsV4U rEG2vxXbs0BsS8g/9YSQNjlGBjLTLahub13o1NCUv3BobNPryalw== X-ME-Sender: X-Sasl-enc: u9fwS8q6D01OiV6q06akCiR+UcTQoTVNCTM8mxUrzq72 1502494606 Received: from localhost (unknown [134.134.139.78]) by mail.messagingengine.com (Postfix) with ESMTPA id 9173E240A4; Fri, 11 Aug 2017 19:36:46 -0400 (EDT) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha256"; boundary="===============8539609795710209257==" MIME-Version: 1.0 Content-Disposition: inline To: Daniel Kahn Gillmor , Notmuch Mail From: Dylan Baker In-Reply-To: <87y3qpn1rf.fsf@fifthhorseman.net> Cc: Steve Kemp References: <87y3qqpvfz.fsf@fifthhorseman.net> <150248896497.16839.12866596405332768085@localhost.localdomain> <87y3qpn1rf.fsf@fifthhorseman.net> Message-ID: <150249460568.25605.17793099017028506412@localhost.localdomain> User-Agent: alot/0.6.0dev Subject: Re: rendering and generating text/markdown parts Date: Fri, 11 Aug 2017 16:36:45 -0700 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Fri, 11 Aug 2017 23:36:49 -0000 --===============8539609795710209257== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Quoting Daniel Kahn Gillmor (2017-08-11 16:05:56) > On Fri 2017-08-11 15:02:44 -0700, Dylan Baker wrote: > = > > Natively no. I have a fairly minor patch to alot that would make it wor= k if the > > type was text/markdown instead of text/plain. > = > huh, i tried to set Content-Type: text/markdown in emacs mml-mode by > just fiddling with the header but mml apparently believed that it knew > better than i did what Content-Type header to send and sent out > text/plain anyway :/ > = > > I have another patch that makes this render correctly as markdown, but = it breaks > > lots of other text/plain emails that use characters in a way that they = look like > > markdown to cmark, but aren't actually markdown. > = > yeah, i agree we should *not* try to apply these filters to anything not > marked explicitly as text/markdown. > = > > I think if we're going to have a message format we should use text/mark= down or > > text/commonmark, or text/x-(markdown|commonmark) rather than text/plain= as the > > format. While it's safe to read markdown as plain text (it was original= ly used > > that way anyway), it's not safe to assume that all text is valid markdo= wn. Someone on LWN noted that "x-" has gone out of style (officially with an RF= C and everything), so I think "text/commonmark", to distinguish it from other fla= vors of markdown. > = > Absolutely agreed. > = > > elinks with "-dump-color-mode 1" did a pretty good job of formatting th= e html that > > came out of cmark. I've attached that if anyone wants to see it. > = > Interesting, it does look plausible, though i confess i don't like the > idea of needing a two-stage pipeline. seems like a lot of attack surface > and moving parts :/ > = > --dkg cmark does have a mode to disable a bunch of "dangerous" stuff, like javasc= ript and css, and some other things. I think it would be better if there was nat= ive support to avoid the multipart pipeline. For alot, there is a python library for common mark I haven't looked at too closely, but it's ported from JavaScript, and libraries that are ports from other languages usually feel clunky. I'm hoping to be pleasantly surprised, otherwise I may look into writing python bindings for the C library. For emacs, it would probably mean writing a parser in elisp. Dylan --===============8539609795710209257== MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Description: signature Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEUwPMqo/+5aFHLzU4CJ4WlhQGiO8FAlmOP4sACgkQCJ4WlhQG iO8irQgAgRxsygL6v7cE7/Lb82GoQRcgGypmV7hm/Z7ZxLgwE0L4pdamELSuLfYk yX1HHh4QxvOlS/gpD6D6C8G2fjDsu/pKhyOxhGTqjBm9AgLpysQltHba4Ee41DKt 9yTihCQV7ESFR9rgP+LCtCdWs6wr0DETB6DCaQtJo2vthfWGbo9IKpltdRB/1BBT NSn509jQ5+p76/jtmhCGm+AsHrRls7z4Fxc1/z/fYRE/7WvhWiwM827C/I+5EXOR m6EUi0wRlDJM57ZndRdYYZ9TUPAeDbXOjhUpe3/UyPsMQykwepKItvIlg5Kmzr/k CuAdeEw8SAVNRriWE7IRdgR86SAP/g== =MfB9 -----END PGP SIGNATURE----- --===============8539609795710209257==--