From: Felix Natter <fnatter@gmx.net>
To: "Adam Sjøgren" <asjo@koldfront.dk>
Cc: ding@gnus.org
Subject: Re: View HTML Mail in Browser
Date: Sat, 13 Feb 2021 12:34:05 +0100 [thread overview]
Message-ID: <871rdkp5g2.fsf@gmx.net> (raw)
In-Reply-To: <87zh0gyrcq.fsf@tullinup.koldfront.dk>
hello Adam,
Adam Sjøgren <asjo@koldfront.dk> writes:
> Felix writes:
>
>>> What is problem are you trying to solve?
>
>> I would like to open mails using w3m by default,
>> and if I hit K H I would like to open it in the browser:
>
> Ah, ok, I missed the w3m part (shr works better for me), and then got
> confused about what wasn't working for you, sorry!
no problem.
>> There must be some configuration that prevents this for me:
>
> Yes, that is very odd, it works "out of the box" for me.
>
> Oh, wait, how do you start Emacs? I have a vague memory that there might
> still be parts that check for X once, and then never rechecks, meaning
> that you get different behaviour if you start a Emacs as a daemon in the
> background without X, or from an Emacs that starts up with an X window.
>
> Could that be it?
No, I don't do this.
> I.e. to check, stop Emacs completely, start Emacs in X, read an HTML
> email, press K H?
This is what I'm doing.
> If not, my next step would be to M-x edebug-defun on
> gnus-article-browse-html-article and gnus-article-browse-html-parts and
> then step through them and see what happens.
>
> It looks like the latter ends up calling browse-url-of-file, so you
> might want to experiment with that one, to see if it opens Firefox when
> called on a file - if not, then that's a clue.
>
> E.g. if you in a *scratch* buffer evaluate:
>
> (browse-url-of-file "test.html")
That didn't open anything in the browser.
>
> do you then get a Firefox window trying to open test.html?
>
> If not, is your value of:
Jackpot! I had
(defun browse-url-firefox-new-tab (url &optional new-window)
"Open URL in a new tab in Firefox."
(interactive (browse-url-interactive-arg "URL: "))
(let ((cmd (shell-command-to-string
(concat "/usr/bin/firefox -remote -client -a any 'openURL("
url ",new-tab)'"))))
(unless (string= "" cmd)
(message "Starting Firefox...")
(start-process (concat "firefox " url) nil "/usr/bin/firefox" url)
(message "Starting Firefox...done"))))
(setq browse-url-browser-function (quote browse-url-firefox-new-tab))
in my ~/.emacs.el.
once I deactivated this:
(setq browse-url-browser-function (quote browse-url-firefox))
with this in my .gnus.el:
(setq mm-text-html-renderer 'shr)
it now renders using shr by default, and when I press K H it renders in
FF (in a new tab) :-)
Many Thanks! Best Regards,
--
Felix Natter
next prev parent reply other threads:[~2021-02-13 11:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 13:39 Felix Natter
2021-02-06 14:03 ` Andreas Schwab
2021-02-06 21:33 ` Felix Natter
2021-02-06 21:54 ` Adam Sjøgren
2021-02-07 9:36 ` Felix Natter
2021-02-07 12:50 ` Adam Sjøgren
2021-02-13 11:34 ` Felix Natter [this message]
2021-02-13 17:30 ` Adam Sjøgren
2021-02-08 11:05 ` Eric S Fraga
2021-02-08 11:44 ` Emanuel Berg
2021-02-08 11:58 ` Eric S Fraga
2021-02-08 12:12 ` Andreas Schwab
2021-02-08 15:06 ` Emanuel Berg
2021-02-06 23:19 ` Eric Abrahamsen
2021-05-26 14:08 ` Steinar Bang
2021-02-07 10:23 ` Valtteri Vuorikoski
2021-02-09 22:02 ` Adam Sjøgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rdkp5g2.fsf@gmx.net \
--to=fnatter@gmx.net \
--cc=asjo@koldfront.dk \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).