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 C87AA431FC9 for ; Thu, 29 Jan 2015 09:31:15 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 2.639 X-Spam-Level: ** X-Spam-Status: No, score=2.639 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DNS_FROM_AHBL_RHSBL=2.438, FREEMAIL_ENVFROM_END_DIGIT=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 AjrF4HlOC0Pj for ; Thu, 29 Jan 2015 09:31:12 -0800 (PST) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 36C27431FC4 for ; Thu, 29 Jan 2015 09:31:12 -0800 (PST) Received: by mail-pa0-f51.google.com with SMTP id fb1so41640446pad.10 for ; Thu, 29 Jan 2015 09:31:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=SQCWQA4M1BjlxIXjaa5k7cIySCYn/eKhXs+JWs5N6TY=; b=VBaMZTruIc29S4baYDMsIQH+zuDlVQxZPlDKXATYSmZYVG1YLnPwpJ//NSy0m2PbYy 90ZBwzXHQBfiwtRwXiSQgQXZ4M7lrF77MsSls8IZPc5NBJz2nNmQo+KmMyug/KcpwdZh RCyjJleHZKR9MQOycabyUb9cTcnAcNTOf7S/k/vhmV2HTFPoHujVxMxkMhOem7O8KfmX GZJKxrrMKIzgW1Jt7RZhOz37pxlHx8VcKyhAShxXGo+FQva33YcRyox+SM65ITOz0obP K4dqE9NOXKjsxzcBz5CMEgkt7jccJSdEN0hOoLu9SVuVN3ig/+iu1gQkcNaW3Tb4f0V8 wPDw== X-Received: by 10.70.37.104 with SMTP id x8mr2142891pdj.119.1422552670434; Thu, 29 Jan 2015 09:31:10 -0800 (PST) Received: from localhost ([2601:9:5d00:15b9:9997:a9cd:4a6a:40f0]) by mx.google.com with ESMTPSA id bq7sm8354992pdb.50.2015.01.29.09.31.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jan 2015 09:31:09 -0800 (PST) From: Jinwoo Lee To: Tomi Ollila , David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] Add a defcustom for whether to block remote images by default. In-Reply-To: References: <1422495572-40384-1-git-send-email-jinwoo68@gmail.com> <87pp9yjbhw.fsf@maritornes.cs.unb.ca> User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-apple-darwin13.2.0) Date: Thu, 29 Jan 2015 09:31:10 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: Thu, 29 Jan 2015 17:31:15 -0000 On Thu, Jan 29, 2015 at 12:58 AM, Tomi Ollila wrote: > On Thu, Jan 29 2015, David Bremner wrote: > >> Jinwoo Lee writes: >> >>> + (shr-blocked-images (if notmuch-show-block-remote-images >>> + "." >>> + shr-blocked-images))) >>> (shr-insert-document dom) >>> t)) >> >> Ideally such a customization would apply to all html renders. I think >> Tomi did some experiments with w3m and friends, I _think_ they respect >> gnus-blocked-images, but maybe Tomi can comment. > > I did M-x debug-on-entry RET open-network-stream RET (or an equivalent of > t that in elisp, but the code I did is now lost & forgotten ;/ > > The docstring relevant to the renderers below it at the end of this email. > > 'gnus-w3m respect gnus-blocked-images > > I could not run 'w3m on that system... nor 'w3 > > There was no effect with 'w3m-standalone -- in this case I'd think it is up > to w3m binary to load external stuff or not. I presume the same is the > case with 'links, 'lynx, 'html2text and nil > > So, to add to David's suggestion maybe just set both gnus-blocked-images > and shr-blocked-images to the value of > notmuch-show-text/html-blocked-images All right. I sent another patch that does this. Thanks, guys! > > > Tomi > > > mm-text-html-renderer is a variable defined in `mm-decode.el'. > Its value is shr > > Documentation: > Render of HTML contents. > It is one of defined renderer types, or a rendering function. > The defined renderer types are: > `shr': use the built-in Gnus HTML renderer; > `gnus-w3m': use Gnus renderer based on w3m; > `w3m': use emacs-w3m; > `w3m-standalone': use plain w3m; > `links': use links; > `lynx': use lynx; > `w3': use Emacs/W3; > `html2text': use html2text; > nil : use external viewer (default web browser). > > >> d