From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27098 invoked from network); 6 Feb 2021 23:20:01 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 6 Feb 2021 23:20:01 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l8Wrv-00BpLT-AU for ml@inbox.vuxu.org; Sat, 06 Feb 2021 17:19:59 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1l8Wru-00B2Ch-Pr for ml@inbox.vuxu.org; Sat, 06 Feb 2021 17:19:58 -0600 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l8Wrs-00B2CZ-GW for ding@lists.math.uh.edu; Sat, 06 Feb 2021 17:19:56 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l8Wrq-00BpLC-QN for ding@lists.math.uh.edu; Sat, 06 Feb 2021 17:19:56 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2u9xqHPydtP7b2d4y1PMLuNYZRtxnUY7EngbIEagxmQ=; b=qlGL1UGmiKUP3Eu9/rXAhw5nli 0DcKeP0pfwvzNLWyiNeMw2igEu1Xmnq7Ixusg7lo8gWeJpj/7A4jb+3F4vMtSOZeEmdzR6yjRYti7 ODMRYWviJU4A3BANZsIzcIvpYfZhTFfrAcuyzMCEVbhSiINhkwhyHdT5S0LTAuMvGa0s=; Received: from ericabrahamsen.net ([52.70.2.18] helo=mail.ericabrahamsen.net) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l8Wrc-0002fI-2D for ding@gnus.org; Sun, 07 Feb 2021 00:19:50 +0100 Received: from localhost (97-113-53-191.tukw.qwest.net [97.113.53.191]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 24BF2FA214; Sat, 6 Feb 2021 23:19:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1612653576; bh=2u9xqHPydtP7b2d4y1PMLuNYZRtxnUY7EngbIEagxmQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=w9VMedr/t4qik6hXygCkx9w2Mkvx3tv02VAgGR11QQYCjOpH85QobMbUrhQRY6cWm C3Ou7/knfKxBTV5w8mZySN/ABmuhlIHYP5N6hrmtGCS+YRFaMoPYlSJ7DSgRmsU/1B tsvnWGTJJntSql2gwPPsix7RPwoT59jcSa9Fbmd4= From: Eric Abrahamsen To: Felix Natter Cc: Andreas Schwab , ding@gnus.org Subject: Re: View HTML Mail in Browser References: <87wnvlz56f.fsf@gmx.net> <874kipqomu.fsf@igel.home> <87r1lsq3tt.fsf@gmx.net> Date: Sat, 06 Feb 2021 15:19:34 -0800 In-Reply-To: <87r1lsq3tt.fsf@gmx.net> (Felix Natter's message of "Sat, 06 Feb 2021 22:33:18 +0100") Message-ID: <87sg68lr7d.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Felix Natter writes: > hi Andreas, > > thanks for the reply. > > Andreas Schwab writes: >> On Feb 06 2021, Felix Natter wrote: >> >>> Is there a modern best practice for reading non-trivial HTML mails? I >>> know about shr, but it often fails. >> >> How about K H (gnus-article-browse-html-article)? > > -------- > View "text/html" parts of the current article with a WWW browser. > Inline images embedded in a message using the cid scheme, as they are > generally considered to be safe, will be processed properly. > The message header is added to the beginning of every html part unless > the prefix argument ARG is given. > > If you always want to display HTML parts in the browser, set > =E2=80=98mm-text-html-renderer=E2=80=99 to nil. > -------- > > Setting (setq mm-text-html-renderer nil) works, but it will open *all* > mails in the browser. > > So I tried with a local variable: > > -------- > (defun my-gnus-article-browse-html-article () > "" > (interactive) > (let ((mm-text-html-renderer nil)) > (gnus-article-browse-html-article))) > -------- > > -> this blocks ("waiting for external displayer to die...") > > Next I tried: > > -------- > (add-to-list 'mm-text-html-renderer-alist > '(ff . browse-url-firefox-new-tab)) > (defun my-gnus-article-browse-html-article () > "" > (interactive) > (let ((mm-text-html-renderer 'ff)) > (gnus-article-browse-html-article))) > -------- > > -> this gives an error like > shell-command-to-string: Wrong type argument: characterp, # *mm*-455001> > > Finally I tried to create a new thread to get around the blocking > problem: > > -------- > (defun my-gnus-article-browse-html-article () > "" > (interactive) > (make-thread > (lambda () > (let ((mm-text-html-renderer nil)) > (gnus-article-browse-html-article))))) > -------- > > This works better than the first solution, but it doesn't work perfectly > (blocks for some seconds, saves the mail multiple times and opens it > multiple times in the browser). > > Any idea? I've never had to do anything but: (setq browse-url-browser-function #'browse-url-firefox) And even there I probably could have left it at its default value of `browse-url-default-browser', which looks like it would have found firefox anyway. You can look at the values of `browse-url-(default-)handlers', there might be something funny happening there. Eric