emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how can I html export a relative link to an org file?
@ 2014-12-03 13:07 Alan Schmitt
  2014-12-03 14:05 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Schmitt @ 2014-12-03 13:07 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hello,

I'm writing a web site in org mode where some results are made available
in an org file. If I put a fully qualified http link to that file, all
goes well, but if I use a relative link, then the link is done to an
html file instead.

This is to be expected according to the documentation
(http://orgmode.org/manual/Links-in-HTML-export.html):

,----
| Links to other .org files will be translated into HTML links under the
| assumption that an HTML version also exists of the linked file, at the
| same relative path.
`----
 
What I don't see is how to disable this, and have a link to the real org
file.

Is there a way?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can I html export a relative link to an org file?
  2014-12-03 13:07 how can I html export a relative link to an org file? Alan Schmitt
@ 2014-12-03 14:05 ` Nicolas Goaziou
  2014-12-03 14:52   ` Alan Schmitt
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-12-03 14:05 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Hello,

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> I'm writing a web site in org mode where some results are made available
> in an org file. If I put a fully qualified http link to that file, all
> goes well, but if I use a relative link, then the link is done to an
> html file instead.
>
> This is to be expected according to the documentation
> (http://orgmode.org/manual/Links-in-HTML-export.html):
>
> ,----
> | Links to other .org files will be translated into HTML links under the
> | assumption that an HTML version also exists of the linked file, at the
> | same relative path.
> `----
>  
> What I don't see is how to disable this, and have a link to the real org
> file.
>
> Is there a way?

See `org-html-link-org-files-as-html'.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can I html export a relative link to an org file?
  2014-12-03 14:05 ` Nicolas Goaziou
@ 2014-12-03 14:52   ` Alan Schmitt
  2014-12-03 16:22     ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Schmitt @ 2014-12-03 14:52 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 975 bytes --]

On 2014-12-03 15:05, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> I'm writing a web site in org mode where some results are made available
>> in an org file. If I put a fully qualified http link to that file, all
>> goes well, but if I use a relative link, then the link is done to an
>> html file instead.
>>
>> This is to be expected according to the documentation
>> (http://orgmode.org/manual/Links-in-HTML-export.html):
>>
>> ,----
>> | Links to other .org files will be translated into HTML links under the
>> | assumption that an HTML version also exists of the linked file, at the
>> | same relative path.
>> `----
>>  
>> What I don't see is how to disable this, and have a link to the real org
>> file.
>>
>> Is there a way?
>
> See `org-html-link-org-files-as-html'.

Thank you. Here is a manual patch to mention this option as that point.

Best,

Alan


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-org.texi-Document-org-html-link-org-files-as-html.patch --]
[-- Type: text/x-patch, Size: 1531 bytes --]

From 09b34f73ad042194efbed8969a1b7fd9010b2bee Mon Sep 17 00:00:00 2001
From: Alan Schmitt <alan.schmitt@polytechnique.org>
Date: Wed, 3 Dec 2014 15:40:50 +0100
Subject: [PATCH] org.texi: Document `org-html-link-org-files-as-html'

* doc/org.texi: Document `org-html-link-org-files-as-html' in the
"Links in HTML export" section.
---
 doc/org.texi | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 15830fc..5316ee6 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11331,9 +11331,10 @@ targets}).  Links to external files will still work if the target file is on
 the same @i{relative} path as the published Org file.  Links to other
 @file{.org} files will be translated into HTML links under the assumption
 that an HTML version also exists of the linked file, at the same relative
-path.  @samp{id:} links can then be used to jump to specific entries across
-files.  For information related to linking files while publishing them to a
-publishing directory see @ref{Publishing links}.
+path; setting @code{org-html-link-org-files-as-html} to @code{nil} disables
+this translation.  @samp{id:} links can then be used to jump to specific
+entries across files.  For information related to linking files while
+publishing them to a publishing directory see @ref{Publishing links}.
 
 If you want to specify attributes for links, you can do so using a special
 @code{#+ATTR_HTML} line to define attributes that will be added to the
-- 
2.2.0


[-- Attachment #1.3: Type: text/plain, Size: 44 bytes --]



-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: how can I html export a relative link to an org file?
  2014-12-03 14:52   ` Alan Schmitt
@ 2014-12-03 16:22     ` Nicolas Goaziou
  2014-12-03 19:11       ` Alan Schmitt
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-12-03 16:22 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> Thank you. Here is a manual patch to mention this option as that
> point.

Thank you. Could you add an appropriate @vindex entry above modified
paragraph?

Regards,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can I html export a relative link to an org file?
  2014-12-03 16:22     ` Nicolas Goaziou
@ 2014-12-03 19:11       ` Alan Schmitt
  2014-12-03 20:10         ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Schmitt @ 2014-12-03 19:11 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 308 bytes --]

On 2014-12-03 17:22, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> Thank you. Here is a manual patch to mention this option as that
>> point.
>
> Thank you. Could you add an appropriate @vindex entry above modified
> paragraph?

Here you go.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-org.texi-Document-org-html-link-org-files-as-html.patch --]
[-- Type: text/x-patch, Size: 1892 bytes --]

From 82f941e23929357d18b3c8f180caaf8abe3bc118 Mon Sep 17 00:00:00 2001
From: Alan Schmitt <alan.schmitt@polytechnique.org>
Date: Wed, 3 Dec 2014 15:40:50 +0100
Subject: [PATCH] org.texi: Document `org-html-link-org-files-as-html'

* doc/org.texi: Document `org-html-link-org-files-as-html' in the
"Links in HTML export" section.
---
 doc/org.texi | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 15830fc..8bbc801 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11325,15 +11325,17 @@ All lines between these markers are exported literally
 @cindex links, in HTML export
 @cindex internal links, in HTML export
 @cindex external links, in HTML export
+@vindex org-html-link-org-files-as-html
 Internal links (@pxref{Internal links}) will continue to work in HTML@.  This
 includes automatic links created by radio targets (@pxref{Radio
 targets}).  Links to external files will still work if the target file is on
 the same @i{relative} path as the published Org file.  Links to other
 @file{.org} files will be translated into HTML links under the assumption
 that an HTML version also exists of the linked file, at the same relative
-path.  @samp{id:} links can then be used to jump to specific entries across
-files.  For information related to linking files while publishing them to a
-publishing directory see @ref{Publishing links}.
+path; setting @code{org-html-link-org-files-as-html} to @code{nil} disables
+this translation.  @samp{id:} links can then be used to jump to specific
+entries across files.  For information related to linking files while
+publishing them to a publishing directory see @ref{Publishing links}.
 
 If you want to specify attributes for links, you can do so using a special
 @code{#+ATTR_HTML} line to define attributes that will be added to the
-- 
2.2.0


[-- Attachment #1.3: Type: text/plain, Size: 102 bytes --]


I can commit is directly if you prefer.

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: how can I html export a relative link to an org file?
  2014-12-03 19:11       ` Alan Schmitt
@ 2014-12-03 20:10         ` Nicolas Goaziou
  2014-12-04  7:09           ` Alan Schmitt
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2014-12-03 20:10 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> Here you go.

Thanks. It looks good.

> I can commit is directly if you prefer.

My lazy self would be delighted.

Regards,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: how can I html export a relative link to an org file?
  2014-12-03 20:10         ` Nicolas Goaziou
@ 2014-12-04  7:09           ` Alan Schmitt
  0 siblings, 0 replies; 7+ messages in thread
From: Alan Schmitt @ 2014-12-04  7:09 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

On 2014-12-03 21:10, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> I can commit is directly if you prefer.
>
> My lazy self would be delighted.

Done (on master).

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-12-04  7:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 13:07 how can I html export a relative link to an org file? Alan Schmitt
2014-12-03 14:05 ` Nicolas Goaziou
2014-12-03 14:52   ` Alan Schmitt
2014-12-03 16:22     ` Nicolas Goaziou
2014-12-03 19:11       ` Alan Schmitt
2014-12-03 20:10         ` Nicolas Goaziou
2014-12-04  7:09           ` Alan Schmitt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).