emacs - How can I use specific protocol (in my case : txmt) with Org mode? -
i have textmate running on mac, , has txmt protocol, can use on web browser such txmt://open/?url=file:///users/smcho/smcho/bin/rst2html
. can use textmate editing rst2html.
however, when tried use protocol org-mode [txmt://open/?url=file:///users/smcho/smcho/bin/rst2html]
, instead of opening textmate, rst2html binary running.
i tried
(setq org-link-abbrev-alist '( ("edit" . "txmt://open/?url=file://%s") ))
to use [edit:/users/smcho/smcho/bin/rst2html]
, same result.
how can use specific protocol (in case : txmt) org mode?
added
it's not using protocol, 1 can run open , edit file command.
("edit" . "shell:/usr/local/bin/mate %s")
i believe org-mode can handle links specified on this page (and maybe few other link types, e.g. links git repos, courtesy of contrib packages). i'm not textmate/apple user, seems me txmt:// protocol in question handler textmate sets installed browsers; can't expect work org.
the real question -- can set link particular file opened in textmate. straightforward way issue shell command open file in textmate. using org-link-abbrev-alist, ("edit" . "shell:/path/to/textmate_binary %s &")
. you'll want use (setq org-confirm-shell-link-function nil)
suppress confirmation prompt.
in general, possible create custom link types described here; involves writing handler function in elisp. in case, call start textmate using e.g. start-process
. cleaner solution, not worth effort. in customizing org link handlers, sufficient set shortcuts via org-link-abbrev-alist
, or set handlers based on extension via org-file-apps
.
Comments
Post a Comment