You can set up your own protocols in org-link-parameters
with org-link-set-parameters
.
If you run
(org-link-set-parameters "chrome" :follow (lambda (path) (browse-url-chrome (concat "http:" path))))
(org-link-set-parameters "chromes" :follow (lambda (path) (browse-url-chrome (concat "https:" path))))
(org-link-set-parameters "chromium" :follow (lambda (path) (browse-url-chromium (concat "http:" path))))
(org-link-set-parameters "chromiums" :follow (lambda (path) (browse-url-chromium (concat "https:" path))))
you can use [[chrome://www.gnu.org/software/emacs/][GNU Emacs]]
or [[chromes://www.gnu.org/software/emacs/][GNU Emacs]]
to open the link with the chrome browser google-chrome
and [[chromium://www.gnu.org/software/emacs/][GNU Emacs]]
or [[chromiums://www.gnu.org/software/emacs/][GNU Emacs]]
to open the link with the chromium browser chromium
.
If you want to choose between different chrome
browsers I suggest you copy the function definition of browse-url-chrome
from the library browse-url
. Paste it into your init file, change the function name, and adapt the function to your purposes. Afterwards you can add link parameters for it.
You find the library browse-url
easily with M-x find-library
RET... .
You can expand that solution to your likings. For an instance you can add an optional tab-number to the link if the chrome
commando has such a parameter. You just have to process this information in your link handler. Note that the link handlers are the lambda
expressions in the above example.