From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: Help with org-link-translation-function Date: Sun, 16 Jan 2011 11:15:49 +0100 Message-ID: <87tyh9upbe.wl%dmaus@ictsoc.de> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============0318868173==" Return-path: Received: from [140.186.70.92] (port=58661 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PeQfO-0007cV-VF for emacs-orgmode@gnu.org; Sun, 16 Jan 2011 06:21:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PeQfN-0002rz-LO for emacs-orgmode@gnu.org; Sun, 16 Jan 2011 06:21:02 -0500 Received: from mailout110.xlhost.de ([213.202.242.110]:55345 helo=mysql1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PeQfN-0002ru-Ep for emacs-orgmode@gnu.org; Sun, 16 Jan 2011 06:21:01 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Leo Alekseyev Cc: emacs-orgmode@gnu.org --===============0318868173== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sun_Jan_16_11:15:49_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Sun_Jan_16_11:15:49_2011-1 Content-Type: text/plain; charset=US-ASCII 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.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Sun_Jan_16_11:15:49_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EAREIAAYFAk0yxVUACgkQma24O1pEeOYTJAEA1oYR2vNdW6rkheCf0xHzVuig fGvunt7C4fPX5VP0PeYA/AwgZh2Y1tHvq9NuLc/X0jQ207KpPm5YNpoFqIEVfNPg =XJ3S -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_Jan_16_11:15:49_2011-1-- --===============0318868173== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0318868173==--