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 0413E431FBC for ; Thu, 29 Jan 2015 00:58:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 2.438 X-Spam-Level: ** X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 wZaGAnwzHO-z for ; Thu, 29 Jan 2015 00:58:40 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id A9D04431FAF for ; Thu, 29 Jan 2015 00:58:40 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 17991100033; Thu, 29 Jan 2015 10:58:15 +0200 (EET) From: Tomi Ollila To: David Bremner , Jinwoo Lee , notmuch@notmuchmail.org Subject: Re: [PATCH] Add a defcustom for whether to block remote images by default. In-Reply-To: <87pp9yjbhw.fsf@maritornes.cs.unb.ca> References: <1422495572-40384-1-git-send-email-jinwoo68@gmail.com> <87pp9yjbhw.fsf@maritornes.cs.unb.ca> User-Agent: Notmuch/0.19+53~gb45d2f9 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ 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 08:58:44 -0000 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 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