Re: [O] HTML export is using the wrong browser

2014-03-24 Thread Achim Gratz
James Harkins  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.





Re: [O] HTML export is using the wrong browser

2014-03-24 Thread James Harkins
On Mon, Mar 24, 2014 at 4:40 PM, Eric S Fraga  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



Re: [O] HTML export is using the wrong browser

2014-03-24 Thread Eric S Fraga
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.

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



Re: [O] HTML export is using the wrong browser

2014-03-24 Thread Achim Gratz
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




Re: [O] HTML export is using the wrong browser

2014-03-23 Thread Marcin Borkowski
Dnia 2014-03-24, o godz. 06:41:12
Bastien  napisaƂ(a):

> James Harkins  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



Re: [O] HTML export is using the wrong browser

2014-03-23 Thread Bastien
James Harkins  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



[O] HTML export is using the wrong browser

2014-03-23 Thread James Harkins

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