From bece463571a9b0924c5373fbce4c990e28536691 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Thu, 29 Jan 2015 22:25:15 +0200 Subject: [PATCH] Re: [PATCH] Add a defcustom for whether to block remote images by default. --- 6c/e245ec336dc2b9dbdfb22e09e4d6675acdb7ff | 128 ++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 6c/e245ec336dc2b9dbdfb22e09e4d6675acdb7ff diff --git a/6c/e245ec336dc2b9dbdfb22e09e4d6675acdb7ff b/6c/e245ec336dc2b9dbdfb22e09e4d6675acdb7ff new file mode 100644 index 000000000..d3a4f58f2 --- /dev/null +++ b/6c/e245ec336dc2b9dbdfb22e09e4d6675acdb7ff @@ -0,0 +1,128 @@ +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 36F7C431FC4 + for ; Thu, 29 Jan 2015 12:25:45 -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 TZSjMe2VnFir for ; + Thu, 29 Jan 2015 12:25:42 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id D15C0431FBC + for ; Thu, 29 Jan 2015 12:25:41 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 2A1B1100033; + Thu, 29 Jan 2015 22:25:16 +0200 (EET) +From: Tomi Ollila +To: Jinwoo Lee , 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.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 20:25:45 -0000 + +On Thu, Jan 29 2015, Jinwoo Lee wrote: + +> 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! + +Thanks for your contribution. You seem to have taken my suggestion +literally just that it IIRC now only sets those when using shr renderer -- +setting of gnus-blocked images should be in other code path... i am not +sure though i am sending this using mobile phi0one terminal and checking +for sure is just too PITA ;\ + +Tomi + +> +>> +>> +>> 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 +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2