emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* HTML export is using the wrong browser
@ 2014-03-24  3:04 James Harkins
  2014-03-24  5:41 ` Bastien
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: James Harkins @ 2014-03-24  3:04 UTC (permalink / raw)
  To: orgmode

OK, org is awesome, but sometimes it drives you crazy.

I have just lost an hour this morning trying to figure out how to convince 
HTML export to open the exported file in Firefox, rather than Chrome.

I noticed that C-c C-e h o was running "sensible-browser," and after half 
an hour's completely wasted effort trying to understand the 
update-alternatives system, the only thing I know is that Chrome's priority 
in the system is 200 while Firefox is 40. That explains why 
sensible-browser is choosing Chrome. But I can't find any example of a 
command that will change the priority of an existing link.

So then I started poking around org options. I found that C-c C-o on an 
http hyperlink goes through browse-url, and I can configure 
browse-url-generic-program to Firefox, and C-c C-o does open such links in 
Firefox. Okay... but, C-c C-e h o *still* uses sensible-browser and opens 
it in the wrong program.

I opened the complete org manual (all on one page) and searched the page 
for "browser." There is NO help anywhere in this document about the browser 
to use for HTML export.

So then I found:

	(?o "As HTML file and open"
	    (lambda (a s v b)
	      (if a (org-html-export-to-html t s v b)
		(org-open-file (org-html-export-to-html nil s v b)))))))

And, looking over the definition of org-open-file, and realizing I've spent 
*a whole hour* on this problem that should be a simple matter of setting 
ONE option, I conclude... this is way too much of a puzzle. So I give up.

This should be a simple thing, so... can somebody please tell me a simple 
way to configure this?

(Yes, I am frustrated.)

hjh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HTML export is using the wrong browser
  2014-03-24  3:04 HTML export is using the wrong browser James Harkins
@ 2014-03-24  5:41 ` Bastien
  2014-03-24  5:55   ` Marcin Borkowski
  2014-03-24  8:37 ` Achim Gratz
  2014-03-24  8:40 ` Eric S Fraga
  2 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2014-03-24  5:41 UTC (permalink / raw)
  To: James Harkins; +Cc: orgmode

James Harkins <jamshark70@gmail.com> writes:

> This should be a simple thing, so... can somebody please tell me a
> simple way to configure this?

M-x customize-variable RET org-file-apps RET

(Btw, I don't know "sensible-browser", must come from a specific
Emacs install?)

-- 
 Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HTML export is using the wrong browser
  2014-03-24  5:41 ` Bastien
@ 2014-03-24  5:55   ` Marcin Borkowski
  0 siblings, 0 replies; 7+ messages in thread
From: Marcin Borkowski @ 2014-03-24  5:55 UTC (permalink / raw)
  To: emacs-orgmode

Dnia 2014-03-24, o godz. 06:41:12
Bastien <bzg@gnu.org> napisał(a):

> James Harkins <jamshark70@gmail.com> writes:
> 
> > This should be a simple thing, so... can somebody please tell me a
> > simple way to configure this?
> 
> M-x customize-variable RET org-file-apps RET
> 
> (Btw, I don't know "sensible-browser", must come from a specific
> Emacs install?)

Confirmed: my Emacs also uses this function.  (And I didn't mess with
*that* part of config;).)  Maybe it's Ubuntu's fault?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HTML export is using the wrong browser
  2014-03-24  3:04 HTML export is using the wrong browser James Harkins
  2014-03-24  5:41 ` Bastien
@ 2014-03-24  8:37 ` Achim Gratz
  2014-03-24  8:40 ` Eric S Fraga
  2 siblings, 0 replies; 7+ messages in thread
From: Achim Gratz @ 2014-03-24  8:37 UTC (permalink / raw)
  To: emacs-orgmode

James Harkins writes:
> I noticed that C-c C-e h o was running "sensible-browser," and after
> half an hour's completely wasted effort trying to understand the
> update-alternatives system, the only thing I know is that Chrome's
> priority in the system is 200 while Firefox is 40. That explains why
> sensible-browser is choosing Chrome. But I can't find any example of a
> command that will change the priority of an existing link.

If you want to change this system-wide, then:

/usr/sbin/update-alternatives --display sensible-browser
/usr/sbin/update-alternatives --config sensible-browser

will let you do this.  Changing the priorities is also possible, but
since the postinstall script will likely revert it to the packaged
default on any update this is probably less useful.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HTML export is using the wrong browser
  2014-03-24  3:04 HTML export is using the wrong browser James Harkins
  2014-03-24  5:41 ` Bastien
  2014-03-24  8:37 ` Achim Gratz
@ 2014-03-24  8:40 ` Eric S Fraga
  2014-03-24  9:44   ` James Harkins
  2 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2014-03-24  8:40 UTC (permalink / raw)
  To: James Harkins; +Cc: orgmode

James Harkins <jamshark70@gmail.com> writes:

[...]

> I noticed that C-c C-e h o was running "sensible-browser," and after
> half an hour's completely wasted effort trying to understand the
> update-alternatives system, the only thing I know is that Chrome's
> priority in the system is 200 while Firefox is 40. That explains why
> sensible-browser is choosing Chrome. But I can't find any example of a
> command that will change the priority of an existing link.

Off topic, sort of, but on Debian, as root:  

  update-alternatives --config sensible-browser

will allow you to change the default.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-831-gcb9172.dirty

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HTML export is using the wrong browser
  2014-03-24  8:40 ` Eric S Fraga
@ 2014-03-24  9:44   ` James Harkins
  2014-03-24 11:21     ` Achim Gratz
  0 siblings, 1 reply; 7+ messages in thread
From: James Harkins @ 2014-03-24  9:44 UTC (permalink / raw)
  To: orgmode

On Mon, Mar 24, 2014 at 4:40 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> Off topic, sort of, but on Debian, as root:
>
>   update-alternatives --config sensible-browser
>
> will allow you to change the default.

In my case, this was not successful.

http://ubuntuforums.org/showthread.php?t=2212948

As shown in this question, Firefox is already the default in
update-alternatives, but the alternative that it consistently chooses
is *not* the default. This makes me think that the alternatives system
is perhaps poorly designed.

Changing the default in org-file-apps to "firefox %s" for HTML -- that
definitely works, by bypassing sensible-browser altogether. Thanks,
Bastien, for the tip.

hjh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HTML export is using the wrong browser
  2014-03-24  9:44   ` James Harkins
@ 2014-03-24 11:21     ` Achim Gratz
  0 siblings, 0 replies; 7+ messages in thread
From: Achim Gratz @ 2014-03-24 11:21 UTC (permalink / raw)
  To: emacs-orgmode

James Harkins <jamshark70 <at> gmail.com> writes:
> In my case, this was not successful.
> 
> http://ubuntuforums.org/showthread.php?t=2212948

The reason is most likely that sensible-browswer doesn't use alternatives,
i.e. it doesn't end up calling x-www-browser.  You may have set BROWSER in
your environment or otherwise added a configuration file that overrides the
(system-wide) alternatives to your home directory.


Regards,
Achim.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-24 11:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-24  3:04 HTML export is using the wrong browser James Harkins
2014-03-24  5:41 ` Bastien
2014-03-24  5:55   ` Marcin Borkowski
2014-03-24  8:37 ` Achim Gratz
2014-03-24  8:40 ` Eric S Fraga
2014-03-24  9:44   ` James Harkins
2014-03-24 11:21     ` Achim Gratz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).