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 5C57F431FB6 for ; Mon, 19 Dec 2011 09:50:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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 B7uia98vuBS7 for ; Mon, 19 Dec 2011 09:50:28 -0800 (PST) Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com [209.85.216.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 504C2429E26 for ; Mon, 19 Dec 2011 09:50:27 -0800 (PST) Received: by qadc12 with SMTP id c12so3018832qad.5 for ; Mon, 19 Dec 2011 09:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type:content-transfer-encoding; bh=aPvPN2AJXLX+tXJemNRplu/ulx+65NHx2ySUBFXYF3I=; b=YpePIfASHgJUVJL1q4Kqm8XqSteBcvx4UO8QmVGgtC7EizoIwqWAvErhR6skI2i6k/ ZC/lMKIhbPnJS9JtvGomWpDGjSB7fFqAfReMyd2KIFrYBaafzJ/zEeEv5QxN0+FcgU6i h28Vo+IcivJFJwIypAbYgBEOVUy3yBqZUBIYk= Received: by 10.224.105.193 with SMTP id u1mr26562764qao.3.1324317025496; Mon, 19 Dec 2011 09:50:25 -0800 (PST) Received: from localhost (c-68-80-94-73.hsd1.pa.comcast.net. [68.80.94.73]) by mx.google.com with ESMTPS id dj9sm41426676qab.18.2011.12.19.09.50.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Dec 2011 09:50:23 -0800 (PST) From: Aaron Ecay To: David Edmondson , notmuch@notmuchmail.org Subject: Re: [RFC][PATCH] emacs: Provide scaffolding so that the new `shr' HTML renderer can run. In-Reply-To: <1324309559-7993-1-git-send-email-dme@dme.org> References: <1324309559-7993-1-git-send-email-dme@dme.org> User-Agent: Notmuch/0.10.1+56~gd709fd6 (http://notmuchmail.org) Emacs/24.0.92.3 (i386-apple-darwin10.8.0) Date: Mon, 19 Dec 2011 12:50:17 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, 19 Dec 2011 17:50:28 -0000 David, This patch doesn=E2=80=99t allow users to have their own settings for shr-{inhibit,block}-images, since it forces these values to nil (via the corresponding gnus variables). (For those looking to follow the code, here=E2=80=99s the call path: notmuch-show-mm-display-part-inline -> mm-display-part -> mm-display-inline -> (via lookup table) mm-inline-text-html -> (via LUT) mm-shr The last function is where this objectionable rebinding happens) Would a better approach be: - clone the mm-shr function, replacing the vile gnus-specific code with something functionally similar that takes the values from notmuch-foo variables instead - add '(notmuch-shr . notmuch-mm-shr) to the mm-text-html-renderer-alist variable - tell notmuch users to customize mm-text-html-renderer to 'notmuch-shr if they want to use this renderer The default values of the notmuch-{inhibit,block}-images variables should prevent network requests for images being made by default* =E2=80=93= your proposed nil/nil values don=E2=80=99t do this, AFAICT. Not doing network requests for HTML email has been Spam Mitigation/Identity Protection 101 for a long time;** notmuch=E2=80=99s default behavior in this area has alwa= ys bothered me. (Also, while we are on the subject of wonky defaults, why is notmuch-show-all-multipart/alternative-parts set to t by default? This is certainly not the best setting.) FWIW, the patch does seem to allow using shr as the HTML renderer, but for the reasons expressed I don=E2=80=99t think it solves the broader probl= em. Aaron * I think that inhibit -> nil, block -> ".*" should achieve this, but I=E2= =80=99m not sure/haven=E2=80=99t tested ** For example, Gmail makes you click a link at the top of an email before it will load any network images contained therein. --=20 Aaron Ecay