From 73c141e43ed1ab746d7f841478550fe4df85f432 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 16 Apr 2014 22:46:53 +0200 Subject: [PATCH] Revert "Fix link export" This reverts commit fc1f7d752fcd526909f0bb619cb9b3568c87665f. --- contrib/lisp/ox-groff.el | 4 +++- lisp/ox-html.el | 2 +- lisp/ox-latex.el | 2 +- lisp/ox-man.el | 4 +++- lisp/ox-md.el | 2 +- lisp/ox-odt.el | 2 +- lisp/ox-texinfo.el | 2 +- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/contrib/lisp/ox-groff.el b/contrib/lisp/ox-groff.el index 46be766e4..1990f878f 100644 --- a/contrib/lisp/ox-groff.el +++ b/contrib/lisp/ox-groff.el @@ -1252,8 +1252,10 @@ INFO is a plist holding contextual information. See link org-groff-inline-image-rules)) (path (cond ((member type '("http" "https" "ftp" "mailto")) - (concat type "://" raw-path)) + (concat type ":" raw-path)) ((string= type "file") + (when (string-match "\\(.+\\)::.+" raw-path) + (setq raw-path (match-string 1 raw-path))) (if (file-name-absolute-p raw-path) (concat "file://" (expand-file-name raw-path)) (concat "file://" raw-path))) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 9455d6249..c590d86c4 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2661,7 +2661,7 @@ INFO is a plist holding contextual information. See ((member type '("http" "https" "ftp" "mailto")) (org-link-escape (org-link-unescape - (concat type "://" raw-path)) org-link-escape-chars-browser)) + (concat type ":" raw-path)) org-link-escape-chars-browser)) ((string= type "file") ;; Treat links to ".org" files as ".html", if needed. (setq raw-path diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index e70ff0105..6a2f69dde 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1798,7 +1798,7 @@ INFO is a plist holding contextual information. See link org-latex-inline-image-rules)) (path (cond ((member type '("http" "https" "ftp" "mailto")) - (concat type "://" raw-path)) + (concat type ":" raw-path)) ((string= type "file") (if (not (file-name-absolute-p raw-path)) raw-path (concat "file://" (expand-file-name raw-path)))) diff --git a/lisp/ox-man.el b/lisp/ox-man.el index 2985a75e3..f5653f1a2 100644 --- a/lisp/ox-man.el +++ b/lisp/ox-man.el @@ -646,8 +646,10 @@ INFO is a plist holding contextual information. See (path (cond ((member type '("http" "https" "ftp" "mailto")) - (concat type "://" raw-path)) + (concat type ":" raw-path)) ((string= type "file") + (when (string-match "\\(.+\\)::.+" raw-path) + (setq raw-path (match-string 1 raw-path))) (if (file-name-absolute-p raw-path) (concat "file://" (expand-file-name raw-path)) (concat "file://" raw-path))) diff --git a/lisp/ox-md.el b/lisp/ox-md.el index 455c3b334..47994ac32 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -320,7 +320,7 @@ a communication channel." (path (cond ((member type '("http" "https" "ftp")) - (concat type "://" raw-path)) + (concat type ":" raw-path)) ((equal type "file") (let ((path (funcall link-org-files-as-md raw-path))) (if (not (file-name-absolute-p path)) path diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index e0f42d2a2..0ddf2d56e 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -2712,7 +2712,7 @@ INFO is a plist holding contextual information. See link org-odt-inline-image-rules)) (path (cond ((member type '("http" "https" "ftp" "mailto")) - (concat type "://" raw-path)) + (concat type ":" raw-path)) ((string= type "file") (if (file-name-absolute-p raw-path) (concat "file://" (expand-file-name raw-path)) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 865a21dbb..ef881afe2 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1221,7 +1221,7 @@ INFO is a plist holding contextual information. See (desc (and (not (string= desc "")) desc)) (path (cond ((member type '("http" "https" "ftp")) - (concat type "://" raw-path)) + (concat type ":" raw-path)) ((string= type "file") (if (file-name-absolute-p raw-path) (concat "file://" (expand-file-name raw-path)) -- 2.11.4.GIT