At Tue, 4 Jan 2011 05:40:30 -0600, Leo Alekseyev wrote: > > Hi All, > I am trying to achieve the following: any link of the form > [[/ssh:host:/path/to/file]] should, when followed, be translated to > [[/plink:host:/path/to/file]] (without being textually altered, of > course). > > The reason for this is that Emacs Tramp under Windows refuses to > cooperate with OpenSSH and can't handle SSH links. The only > workaround I've found is to use the plink protocol instead of SSH. > > I think what I'm trying to achieve is possible with > org-link-translation-function, but my naive attempts haven't been > successful... Any help would be greatly appreciated!
Maybe this might help:
(defun dmaus/org-mode/org-link-ssh-to-plink (type path)
"Return plink: link with PATH if TYPE is ssh."
(cons type (if (string-match "/ssh:" path)
(replace-match "/plink:" nil nil path)
path)))
(setq org-link-translation-function 'dmaus/org-mode/org-link-ssh-to-plink)
HTH,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... [email protected]
Email..... [email protected]
pgpaXZ2tJJavR.pgp
Description: PGP signature
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. [email protected] http://lists.gnu.org/mailman/listinfo/emacs-orgmode
