Org-mode can export as HTML and open on a browser with C-c C-e h o (org-export-dispatch), but the problem is that the generated html file opens in a buffer inside emacs. There is no error in the message buffer, either. How can I make it work?

When I click a link inside org-mode, the browser opens correctly.

I'm running org-mode 8.2.10, emacs 24.3.1 on manjaro linux 0.8.10. I checked preferred applications in KDE and it points web browsing to firefox.

  • Have you tried C-c C-e b? – Luke Shimkus Oct 20 '14 at 20:57
  • There is no option b after C-c C-e. It gives Invalid key – El Diego Efe Oct 20 '14 at 21:05
  • I apologize. How aboutM-x org-export-as-html-and-open? – Luke Shimkus Oct 20 '14 at 21:15
  • The message after that command is: org-html-do-expand: Symbol's value as variable is void: org-export-html-special-string-regexps – El Diego Efe Oct 20 '14 at 21:20
  • Okay, that is really weird. The last thing I can tell you to try is: C-c C-e h h But, I am not 100% sure that will work. – Luke Shimkus Oct 20 '14 at 21:25

I experienced the same problem after a new installation of ArchLinux with XFCE.

Although I didn't manage to understand the problem, a workaround was to configure 'org-file-apps' as described in the FAQ :


in my .emacs.d/init.el, I have now :

      ((auto-mode . emacs)
      ("\\.mm\\'" . default)
      ("\\.x?html?\\'" . "/usr/bin/firefox %s")
      ("\\.pdf\\'" . default))))
| improve this answer | |
(setq browse-url-generic-program
       ((eq window-system 'mac) "open") ; mac
       ((or (eq system-type 'gnu/linux) (eq system-type 'linux)) ; linux
        (executable-find "firefox"))
| improve this answer | |

I suspect that you have a mixed installation of org-mode. See the FAQ here:


When this has happened to me what I have done is (assuming you install via ELPA):

  1. uninstall org-mode
  2. quit emacs
  3. restart emacs using emacs -q
  4. manually add ("org" . "http://orgmode.org/elpa/") to package-archives and run (package-initialize) `
  5. install org-mode
  6. restart emacs

Hope that helps.

| improve this answer | |
  • It didn't work. I also erased my .emacs folder and started from scratch (like emacs -q, I guess), only installing org-mode (which appears to be today's version) as you suggest, and the file keeps opening in a buffer. org-version gives good result (as in your link). Bad luck. – El Diego Efe Oct 21 '14 at 1:36
  • Now, if I try @King suggestion: org-export-as-html-and-open, the answer is No match, so it seems that function is not well installed. – El Diego Efe Oct 21 '14 at 1:38
  • 2
    Export and open uses org-open-file, which uses the variable org-file-apps. Perhaps you have something strange in that variable. org-export-as-html-and-open is not a function in recent org mode versions. – Erik Hetzner Oct 21 '14 at 4:34
emacs --version 
GNU Emacs 25.1.1

It works for me:

(setq org-file-apps
        ((auto-mode . emacs)
        ("\\.mm\\'" . default)
        ("\\.x?html?\\'" . "/usr/bin/firefox %s")
        ("\\.pdf\\'" . default))))

REF from answer of @skizo

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.