As documented on Worg (and mentioned in other answers), org-mode usesorg-file-apps
to determine how to open files. Moreover, org-file-apps
can call emacs functions instead of specifying external applications. Especially for opening stuff in the web-browser, emacs ships with the browse-url
package. This package provides a lot of functions to call a lot of different browsers (most of them are not really used anymore), and M-x customize-group
Enter browse-url
can help to give an overview.
When browse-url
is configured correctly, then the function browse-url
will open a new browser (or a tab in an already running browser). This can be leveraged in org-file-apps
:
(setq org-file-apps
(quote
(
("\\.x?html?\\'" . browse-url)
)
)
)
This configuration is more portable then specifying exact paths, and it also allows to have a different entry in the .mailcap
, which org-mode normally uses if nothing is defined in org-file-apps
.
C-c C-e b
?b
after C-c C-e. It givesInvalid key
M-x org-export-as-html-and-open
?org-html-do-expand: Symbol's value as variable is void: org-export-html-special-string-regexps
C-c C-e h h
But, I am not 100% sure that will work.