* export to html and relative links: @ 2008-04-13 4:49 T. V. Raman 2008-04-13 5:37 ` Carsten Dominik 0 siblings, 1 reply; 14+ messages in thread From: T. V. Raman @ 2008-04-13 4:49 UTC (permalink / raw) To: emacs-orgmode Hi, org-export turns links of the form [[foo][link to relative url foo]] ends up creating links of the form <a href="#foo">...</a> this means that it becomes impossible to write hyperlinks that are relative URLs. -- Best Regards, --raman Email: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 4:49 export to html and relative links: T. V. Raman @ 2008-04-13 5:37 ` Carsten Dominik 2008-04-13 15:33 ` T. V. Raman 0 siblings, 1 reply; 14+ messages in thread From: Carsten Dominik @ 2008-04-13 5:37 UTC (permalink / raw) To: raman; +Cc: emacs-orgmode On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: > Hi, > > org-export turns links of the form > [[foo][link to relative url foo]] > > ends up creating links of the form > <a href="#foo">...</a> > > this means that it becomes impossible to write hyperlinks that > are relative URLs. Hi Raman, the url goes into the first pair of square brackets, the description into the second. If you put something into the first bracket pair that does not look lie a url, it will be treated as an internal link. Have you tried to use something like [[http:foo.html][link to relative url]] ? - Carsten ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 5:37 ` Carsten Dominik @ 2008-04-13 15:33 ` T. V. Raman 2008-04-13 15:54 ` Carsten Dominik 0 siblings, 1 reply; 14+ messages in thread From: T. V. Raman @ 2008-04-13 15:33 UTC (permalink / raw) To: dominik; +Cc: raman, emacs-orgmode I've not tried http:foo.html -- but I suggest doing that to author a relative URL is a bad idea. I tried ./foo.html and that didn't work either. One compromise would be to get ./foo.html to link to a relative url, while foo.html continues to link to a local anchor >>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> writes: Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: Carsten> >> Hi, >> >> org-export turns links of the form [[foo][link to relative >> url foo]] >> >> ends up creating links of the form <a href="#foo">...</a> >> >> this means that it becomes impossible to write hyperlinks >> that are relative URLs. Carsten> Carsten> Hi Raman, Carsten> Carsten> the url goes into the first pair of square brackets, Carsten> the description into the second. If you put Carsten> something into the first bracket pair that does not Carsten> look lie a url, it will be treated as an internal Carsten> link. Carsten> Carsten> Have you tried to use something like Carsten> Carsten> [[http:foo.html][link to relative url]] Carsten> Carsten> ? Carsten> Carsten> - Carsten -- Best Regards, --raman Email: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 15:33 ` T. V. Raman @ 2008-04-13 15:54 ` Carsten Dominik 2008-04-13 16:25 ` T. V. Raman 0 siblings, 1 reply; 14+ messages in thread From: Carsten Dominik @ 2008-04-13 15:54 UTC (permalink / raw) To: raman; +Cc: emacs-orgmode On Apr 13, 2008, at 5:33 PM, T. V. Raman wrote: > I've not tried http:foo.html -- but I suggest doing that to > author a relative URL is a bad idea. Can you explain why you think that this is a bad idea? Educate me! What is wrong with writing http:foo.html ?????? - Carsten > > > I tried ./foo.html and that didn't work either. One compromise > would be to get ./foo.html to link to a relative url, while > foo.html continues to link to a local anchor > >>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> writes: > Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: > Carsten> >>> Hi, >>> >>> org-export turns links of the form [[foo][link to relative >>> url foo]] >>> >>> ends up creating links of the form <a href="#foo">...</a> >>> >>> this means that it becomes impossible to write hyperlinks >>> that are relative URLs. > Carsten> > Carsten> Hi Raman, > Carsten> > Carsten> the url goes into the first pair of square brackets, > Carsten> the description into the second. If you put > Carsten> something into the first bracket pair that does not > Carsten> look lie a url, it will be treated as an internal > Carsten> link. > Carsten> > Carsten> Have you tried to use something like > Carsten> > Carsten> [[http:foo.html][link to relative url]] > Carsten> > Carsten> ? > Carsten> > Carsten> - Carsten > > -- > Best Regards, > --raman > > > Email: raman@users.sf.net > WWW: http://emacspeak.sf.net/raman/ > AIM: emacspeak GTalk: tv.raman.tv@gmail.com > PGP: http://emacspeak.sf.net/raman/raman-almaden.asc > Google: tv+raman > IRC: irc://irc.freenode.net/#emacs ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 15:54 ` Carsten Dominik @ 2008-04-13 16:25 ` T. V. Raman 2008-04-13 17:19 ` Carsten Dominik 0 siblings, 1 reply; 14+ messages in thread From: T. V. Raman @ 2008-04-13 16:25 UTC (permalink / raw) To: dominik; +Cc: raman, emacs-orgmode I think writing http:foo.html is a bad idea because typing that string in other contexts is sort of meaningless as a URL. Until now, everything one types in org-mode sort of has meaning elsewhere. If you want it to look like a url in this case too then I'd suggest file:foo.html -- rther than http:file.html. I did not suggest that earlier because it's more chars to type, but that's not a huge concern since emacs does the typing, and we could always augment c-c c-l to enable authoring of relative links with file completion. so file:a/b/c.html would become href="a/b/c.html" in the generated html. >>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> writes: Carsten> On Apr 13, 2008, at 5:33 PM, T. V. Raman wrote: Carsten> >> I've not tried http:foo.html -- but I suggest doing that >> to author a relative URL is a bad idea. Carsten> Carsten> Can you explain why you think that this is a bad Carsten> idea? Educate me! What is wrong with writing Carsten> http:foo.html ?????? Carsten> Carsten> - Carsten Carsten> >> > > I tried ./foo.html and that didn't work either. One compromise >> would be to get ./foo.html to link to a relative url, >> while foo.html continues to link to a local anchor >> >>>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> >>>>>>> writes: Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: Carsten> >>>> Hi, >>>> >>>> org-export turns links of the form [[foo][link to >>>> relative url foo]] >>>> >>>> ends up creating links of the form <a >>>> href="#foo">...</a> >>>> >>>> this means that it becomes impossible to write >>>> hyperlinks that are relative URLs. Carsten> Carsten> Hi Raman, Carsten> Carsten> the url goes into the first pair of square brackets, Carsten> the description into the second. If you put Carsten> something into the first bracket pair that does not Carsten> look lie a url, it will be treated as an internal Carsten> link. Carsten> Carsten> Have you tried to use something like Carsten> Carsten> [[http:foo.html][link to relative url]] Carsten> Carsten> ? Carsten> Carsten> - Carsten >> >> -- >> Best Regards, --raman >> >> >> Email: raman@users.sf.net WWW: >> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >> tv.raman.tv@gmail.com PGP: >> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >> tv+raman IRC: irc://irc.freenode.net/#emacs -- Best Regards, --raman Email: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 16:25 ` T. V. Raman @ 2008-04-13 17:19 ` Carsten Dominik 2008-04-13 18:48 ` T. V. Raman 0 siblings, 1 reply; 14+ messages in thread From: Carsten Dominik @ 2008-04-13 17:19 UTC (permalink / raw) To: raman; +Cc: emacs-orgmode Hmmmm, this is *such* a good idea, that I will implement this retroactively into all versions since ... 2.0 or so? Abracadabra! Done. In fact, it has been working just so for a very long time. file:foo.html -> href="foo.html" file:foo.org -> href="foo.html" The second line assumes that the org file foo.org will also be converted to an html file in the publishing process.... Also, I was mistaken earlier: http:foo.html becomes href="http:foo.html" and not href="foo.html" so this actually cannot be used for a local link. So what remains from this exchange? Should we accept links that look like absolute file names (including ./foo.html) as equivalent to file:./foo.html ? - Carsten On Apr 13, 2008, at 6:25 PM, T. V. Raman wrote: > > I think writing http:foo.html is a bad idea because typing that > string in other contexts is sort of meaningless as a URL. > Until now, everything one types in org-mode sort of has meaning > elsewhere. If you want it to look like a url in this case too > then I'd suggest file:foo.html -- rther than http:file.html. > > I did not suggest that earlier because it's more chars to type, > but that's not a huge concern since emacs does the typing, and we > could always augment c-c c-l to enable authoring of relative > links with file completion. > > so file:a/b/c.html would become href="a/b/c.html" in the > generated html. > >>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> writes: > Carsten> On Apr 13, 2008, at 5:33 PM, T. V. Raman wrote: > Carsten> >>> I've not tried http:foo.html -- but I suggest doing that >>> to author a relative URL is a bad idea. > Carsten> > Carsten> Can you explain why you think that this is a bad > Carsten> idea? Educate me! What is wrong with writing > Carsten> http:foo.html ?????? > Carsten> > Carsten> - Carsten > Carsten> >>> >> >> I tried ./foo.html and that didn't work either. One compromise >>> would be to get ./foo.html to link to a relative url, >>> while foo.html continues to link to a local anchor >>> >>>>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> >>>>>>>> writes: > Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: > Carsten> >>>>> Hi, >>>>> >>>>> org-export turns links of the form [[foo][link to >>>>> relative url foo]] >>>>> >>>>> ends up creating links of the form <a >>>>> href="#foo">...</a> >>>>> >>>>> this means that it becomes impossible to write >>>>> hyperlinks that are relative URLs. > Carsten> > Carsten> Hi Raman, > Carsten> > Carsten> the url goes into the first pair of square brackets, > Carsten> the description into the second. If you put > Carsten> something into the first bracket pair that does not > Carsten> look lie a url, it will be treated as an internal > Carsten> link. > Carsten> > Carsten> Have you tried to use something like > Carsten> > Carsten> [[http:foo.html][link to relative url]] > Carsten> > Carsten> ? > Carsten> > Carsten> - Carsten >>> >>> -- >>> Best Regards, --raman >>> >>> >>> Email: raman@users.sf.net WWW: >>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>> tv.raman.tv@gmail.com PGP: >>> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >>> tv+raman IRC: irc://irc.freenode.net/#emacs > > -- > Best Regards, > --raman > > > Email: raman@users.sf.net > WWW: http://emacspeak.sf.net/raman/ > AIM: emacspeak GTalk: tv.raman.tv@gmail.com > PGP: http://emacspeak.sf.net/raman/raman-almaden.asc > Google: tv+raman > IRC: irc://irc.freenode.net/#emacs ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 17:19 ` Carsten Dominik @ 2008-04-13 18:48 ` T. V. Raman 2008-04-13 19:35 ` Carsten Dominik 2008-06-24 6:38 ` Carsten Dominik 0 siblings, 2 replies; 14+ messages in thread From: T. V. Raman @ 2008-04-13 18:48 UTC (permalink / raw) To: dominik; +Cc: raman, emacs-orgmode two suggestions: 1) accept paths like "./foo.html" as local links. 2) Augment C-c C-l to react to file: by providing filename completion relative to the working directory. The emacs binding to the w3m browser does this if you type file: in the minibuffer when prompted for a URL. >>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> writes: Carsten> Hmmmm, this is *such* a good idea, that I will Carsten> implement this retroactively into all versions since Carsten> ... 2.0 or so? Abracadabra! Done. Carsten> Carsten> In fact, it has been working just so for a very long Carsten> time. Carsten> Carsten> file:foo.html -> href="foo.html" file:foo.org -> Carsten> href="foo.html" Carsten> Carsten> The second line assumes that the org file foo.org Carsten> will also be converted to an html file in the Carsten> publishing process.... Carsten> Carsten> Also, I was mistaken earlier: Carsten> Carsten> http:foo.html becomes href="http:foo.html" and not Carsten> href="foo.html" Carsten> Carsten> so this actually cannot be used for a local link. Carsten> Carsten> So what remains from this exchange? Should we Carsten> accept links that look like absolute file names Carsten> (including ./foo.html) as equivalent to Carsten> file:./foo.html ? Carsten> Carsten> - Carsten Carsten> Carsten> On Apr 13, 2008, at 6:25 PM, T. V. Raman wrote: Carsten> >> > I think writing http:foo.html is a bad idea because typing that >> string in other contexts is sort of meaningless as a URL. >> Until now, everything one types in org-mode sort of has >> meaning elsewhere. If you want it to look like a url in >> this case too then I'd suggest file:foo.html -- rther than >> http:file.html. >> >> I did not suggest that earlier because it's more chars to >> type, but that's not a huge concern since emacs does the >> typing, and we could always augment c-c c-l to enable >> authoring of relative links with file completion. >> >> so file:a/b/c.html would become href="a/b/c.html" in the >> generated html. >> >>>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> >>>>>>> writes: Carsten> On Apr 13, 2008, at 5:33 PM, T. V. Raman wrote: Carsten> >>>> I've not tried http:foo.html -- but I suggest doing that >>>> to author a relative URL is a bad idea. Carsten> Carsten> Can you explain why you think that this is a bad Carsten> idea? Educate me! What is wrong with writing Carsten> http:foo.html ?????? Carsten> Carsten> - Carsten Carsten> >>>> >> >> I tried ./foo.html and that didn't work either. One compromise >>>> would be to get ./foo.html to link to a relative url, >>>> while foo.html continues to link to a local anchor >>>> >>>>>>>>> "Carsten" == Carsten Dominik >>>>>>>>> <dominik@science.uva.nl> writes: Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: Carsten> >>>>>> Hi, >>>>>> >>>>>> org-export turns links of the form [[foo][link to >>>>>> relative url foo]] >>>>>> >>>>>> ends up creating links of the form <a >>>>>> href="#foo">...</a> >>>>>> >>>>>> this means that it becomes impossible to write >>>>>> hyperlinks that are relative URLs. Carsten> Carsten> Hi Raman, Carsten> Carsten> the url goes into the first pair of square brackets, Carsten> the description into the second. If you put Carsten> something into the first bracket pair that does not Carsten> look lie a url, it will be treated as an internal Carsten> link. Carsten> Carsten> Have you tried to use something like Carsten> Carsten> [[http:foo.html][link to relative url]] Carsten> Carsten> ? Carsten> Carsten> - Carsten >>>> >>>> -- >>>> Best Regards, --raman >>>> >>>> >>>> Email: raman@users.sf.net WWW: >>>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>>> tv.raman.tv@gmail.com PGP: >>>> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >>>> tv+raman IRC: irc://irc.freenode.net/#emacs >> >> -- >> Best Regards, --raman >> >> >> Email: raman@users.sf.net WWW: >> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >> tv.raman.tv@gmail.com PGP: >> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >> tv+raman IRC: irc://irc.freenode.net/#emacs -- Best Regards, --raman Email: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 18:48 ` T. V. Raman @ 2008-04-13 19:35 ` Carsten Dominik 2008-04-13 20:32 ` T. V. Raman 2008-06-24 6:38 ` Carsten Dominik 1 sibling, 1 reply; 14+ messages in thread From: Carsten Dominik @ 2008-04-13 19:35 UTC (permalink / raw) To: raman; +Cc: emacs-orgmode Hi Raman, On Apr 13, 2008, at 8:48 PM, T. V. Raman wrote: > two suggestions: > > 1) accept paths like "./foo.html" as local links. I will look into this. The problem is the system dependence of file names, so I am not sure what a good solution would be that would work on Windows as well as on Unix. > 2) Augment C-c C-l to react to file: by providing filename > completion relative to the working directory. Hmm, that is difficult, but thanks for the pointer, maybe we can steel some code. For now, if you use `C-u C-c C-l', you get file completion, and the result will be a "file:" link with a relative path (unless you enter a path starting with "/"). Even if you find the file with ../../../some/path, it will still be inserted as a relative link. - Carsten > > > The emacs binding to the w3m browser does this if you type file: in > the minibuffer > when prompted for a URL. > >>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> writes: > Carsten> Hmmmm, this is *such* a good idea, that I will > Carsten> implement this retroactively into all versions since > Carsten> ... 2.0 or so? Abracadabra! Done. > Carsten> > Carsten> In fact, it has been working just so for a very long > Carsten> time. > Carsten> > Carsten> file:foo.html -> href="foo.html" file:foo.org -> > Carsten> href="foo.html" > Carsten> > Carsten> The second line assumes that the org file foo.org > Carsten> will also be converted to an html file in the > Carsten> publishing process.... > Carsten> > Carsten> Also, I was mistaken earlier: > Carsten> > Carsten> http:foo.html becomes href="http:foo.html" and not > Carsten> href="foo.html" > Carsten> > Carsten> so this actually cannot be used for a local link. > Carsten> > Carsten> So what remains from this exchange? Should we > Carsten> accept links that look like absolute file names > Carsten> (including ./foo.html) as equivalent to > Carsten> file:./foo.html ? > Carsten> > Carsten> - Carsten > Carsten> > Carsten> On Apr 13, 2008, at 6:25 PM, T. V. Raman wrote: > Carsten> >>> >> I think writing http:foo.html is a bad idea because typing that >>> string in other contexts is sort of meaningless as a URL. >>> Until now, everything one types in org-mode sort of has >>> meaning elsewhere. If you want it to look like a url in >>> this case too then I'd suggest file:foo.html -- rther than >>> http:file.html. >>> >>> I did not suggest that earlier because it's more chars to >>> type, but that's not a huge concern since emacs does the >>> typing, and we could always augment c-c c-l to enable >>> authoring of relative links with file completion. >>> >>> so file:a/b/c.html would become href="a/b/c.html" in the >>> generated html. >>> >>>>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> >>>>>>>> writes: > Carsten> On Apr 13, 2008, at 5:33 PM, T. V. Raman wrote: > Carsten> >>>>> I've not tried http:foo.html -- but I suggest doing that >>>>> to author a relative URL is a bad idea. > Carsten> > Carsten> Can you explain why you think that this is a bad > Carsten> idea? Educate me! What is wrong with writing > Carsten> http:foo.html ?????? > Carsten> > Carsten> - Carsten > Carsten> >>>>> >>> >>> I tried ./foo.html and that didn't work either. One compromise >>>>> would be to get ./foo.html to link to a relative url, >>>>> while foo.html continues to link to a local anchor >>>>> >>>>>>>>>> "Carsten" == Carsten Dominik >>>>>>>>>> <dominik@science.uva.nl> writes: > Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: > Carsten> >>>>>>> Hi, >>>>>>> >>>>>>> org-export turns links of the form [[foo][link to >>>>>>> relative url foo]] >>>>>>> >>>>>>> ends up creating links of the form <a >>>>>>> href="#foo">...</a> >>>>>>> >>>>>>> this means that it becomes impossible to write >>>>>>> hyperlinks that are relative URLs. > Carsten> > Carsten> Hi Raman, > Carsten> > Carsten> the url goes into the first pair of square brackets, > Carsten> the description into the second. If you put > Carsten> something into the first bracket pair that does not > Carsten> look lie a url, it will be treated as an internal > Carsten> link. > Carsten> > Carsten> Have you tried to use something like > Carsten> > Carsten> [[http:foo.html][link to relative url]] > Carsten> > Carsten> ? > Carsten> > Carsten> - Carsten >>>>> >>>>> -- >>>>> Best Regards, --raman >>>>> >>>>> >>>>> Email: raman@users.sf.net WWW: >>>>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>>>> tv.raman.tv@gmail.com PGP: >>>>> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >>>>> tv+raman IRC: irc://irc.freenode.net/#emacs >>> >>> -- >>> Best Regards, --raman >>> >>> >>> Email: raman@users.sf.net WWW: >>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>> tv.raman.tv@gmail.com PGP: >>> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >>> tv+raman IRC: irc://irc.freenode.net/#emacs > > -- > Best Regards, > --raman > > > Email: raman@users.sf.net > WWW: http://emacspeak.sf.net/raman/ > AIM: emacspeak GTalk: tv.raman.tv@gmail.com > PGP: http://emacspeak.sf.net/raman/raman-almaden.asc > Google: tv+raman > IRC: irc://irc.freenode.net/#emacs ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 19:35 ` Carsten Dominik @ 2008-04-13 20:32 ` T. V. Raman 2008-04-13 21:37 ` Carsten Dominik 0 siblings, 1 reply; 14+ messages in thread From: T. V. Raman @ 2008-04-13 20:32 UTC (permalink / raw) To: dominik; +Cc: raman, emacs-orgmode file:// urls are already designed to be platform independent. So an org file should never carry in it a path like a\\b\\c.html -- we should always use a/b/c.html since that's the syntax used by relative URLs. >>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> writes: Carsten> Hi Raman, On Apr 13, 2008, at 8:48 PM, T. V. Raman Carsten> wrote: Carsten> >> two suggestions: >> >> 1) accept paths like "./foo.html" as local links. Carsten> Carsten> I will look into this. The problem is the system Carsten> dependence of file names, so I am not sure what a Carsten> good solution would be that would work on Windows as Carsten> well as on Unix. Carsten> >> 2) Augment C-c C-l to react to file: by providing filename >> completion relative to the working directory. Carsten> Carsten> Hmm, that is difficult, but thanks for the pointer, Carsten> maybe we can steel some code. Carsten> Carsten> For now, if you use `C-u C-c C-l', you get file Carsten> completion, and the result will be a "file:" link Carsten> with a relative path (unless you enter a path Carsten> starting with "/"). Even if you find the file with Carsten> ../../../some/path, it will still be inserted as a Carsten> relative link. Carsten> Carsten> - Carsten Carsten> >> > > The emacs binding to the w3m browser does this if you type >> file: in the minibuffer when prompted for a URL. >> >>>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> >>>>>>> writes: Carsten> Hmmmm, this is *such* a good idea, that I will Carsten> implement this retroactively into all versions since Carsten> ... 2.0 or so? Abracadabra! Done. Carsten> Carsten> In fact, it has been working just so for a very long Carsten> time. Carsten> Carsten> file:foo.html -> href="foo.html" file:foo.org -> Carsten> href="foo.html" Carsten> Carsten> The second line assumes that the org file foo.org Carsten> will also be converted to an html file in the Carsten> publishing process.... Carsten> Carsten> Also, I was mistaken earlier: Carsten> Carsten> http:foo.html becomes href="http:foo.html" and not Carsten> href="foo.html" Carsten> Carsten> so this actually cannot be used for a local link. Carsten> Carsten> So what remains from this exchange? Should we Carsten> accept links that look like absolute file names Carsten> (including ./foo.html) as equivalent to Carsten> file:./foo.html ? Carsten> Carsten> - Carsten Carsten> Carsten> On Apr 13, 2008, at 6:25 PM, T. V. Raman wrote: Carsten> >>>> >> I think writing http:foo.html is a bad idea because typing >>>> that string in other contexts is sort of meaningless as >>>> a URL. Until now, everything one types in org-mode sort >>>> of has meaning elsewhere. If you want it to look like a >>>> url in this case too then I'd suggest file:foo.html -- >>>> rther than http:file.html. >>>> >>>> I did not suggest that earlier because it's more chars >>>> to type, but that's not a huge concern since emacs does >>>> the typing, and we could always augment c-c c-l to >>>> enable authoring of relative links with file completion. >>>> >>>> so file:a/b/c.html would become href="a/b/c.html" in the >>>> generated html. >>>> >>>>>>>>> "Carsten" == Carsten Dominik >>>>>>>>> <dominik@science.uva.nl> writes: Carsten> On Apr 13, 2008, at 5:33 PM, T. V. Raman wrote: Carsten> >>>>>> I've not tried http:foo.html -- but I suggest doing >>>>>> that to author a relative URL is a bad idea. Carsten> Carsten> Can you explain why you think that this is a bad Carsten> idea? Educate me! What is wrong with writing Carsten> http:foo.html ?????? Carsten> Carsten> - Carsten Carsten> >>>>>> >>> >>> I tried ./foo.html and that didn't work either. One >>>>>> compromise would be to get ./foo.html to link to a >>>>>> relative url, while foo.html continues to link to a >>>>>> local anchor >>>>>> >>>>>>>>>>> "Carsten" == Carsten Dominik >>>>>>>>>>> <dominik@science.uva.nl> writes: Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: Carsten> >>>>>>>> Hi, >>>>>>>> >>>>>>>> org-export turns links of the form [[foo][link to >>>>>>>> relative url foo]] >>>>>>>> >>>>>>>> ends up creating links of the form <a >>>>>>>> href="#foo">...</a> >>>>>>>> >>>>>>>> this means that it becomes impossible to write >>>>>>>> hyperlinks that are relative URLs. Carsten> Carsten> Hi Raman, Carsten> Carsten> the url goes into the first pair of square brackets, Carsten> the description into the second. If you put Carsten> something into the first bracket pair that does not Carsten> look lie a url, it will be treated as an internal Carsten> link. Carsten> Carsten> Have you tried to use something like Carsten> Carsten> [[http:foo.html][link to relative url]] Carsten> Carsten> ? Carsten> Carsten> - Carsten >>>>>> >>>>>> -- >>>>>> Best Regards, --raman >>>>>> >>>>>> >>>>>> Email: raman@users.sf.net WWW: >>>>>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>>>>> tv.raman.tv@gmail.com PGP: >>>>>> http://emacspeak.sf.net/raman/raman-almaden.asc >>>>>> Google: tv+raman IRC: irc://irc.freenode.net/#emacs >>>> >>>> -- >>>> Best Regards, --raman >>>> >>>> >>>> Email: raman@users.sf.net WWW: >>>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>>> tv.raman.tv@gmail.com PGP: >>>> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >>>> tv+raman IRC: irc://irc.freenode.net/#emacs >> >> -- >> Best Regards, --raman >> >> >> Email: raman@users.sf.net WWW: >> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >> tv.raman.tv@gmail.com PGP: >> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >> tv+raman IRC: irc://irc.freenode.net/#emacs -- Best Regards, --raman Email: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 20:32 ` T. V. Raman @ 2008-04-13 21:37 ` Carsten Dominik 0 siblings, 0 replies; 14+ messages in thread From: Carsten Dominik @ 2008-04-13 21:37 UTC (permalink / raw) To: raman; +Cc: emacs-orgmode On Apr 13, 2008, at 10:32 PM, T. V. Raman wrote: > file:// urls are already designed to be platform independent. > So an org file should never carry in it a path like a\\b\\c.html > -- we should always use a/b/c.html > since that's the syntax used by relative URLs. Yes, but while an Org file is still an Org file, the same links function is links to open the corresponding file in Emacs, and my fear is that this can lead to conflicts. Anyway, this is for the windows people to complain about and to propose solutions... :-) - Carsten > > >>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> writes: > Carsten> Hi Raman, On Apr 13, 2008, at 8:48 PM, T. V. Raman > Carsten> wrote: > Carsten> >>> two suggestions: >>> >>> 1) accept paths like "./foo.html" as local links. > Carsten> > Carsten> I will look into this. The problem is the system > Carsten> dependence of file names, so I am not sure what a > Carsten> good solution would be that would work on Windows as > Carsten> well as on Unix. > Carsten> >>> 2) Augment C-c C-l to react to file: by providing filename >>> completion relative to the working directory. > Carsten> > Carsten> Hmm, that is difficult, but thanks for the pointer, > Carsten> maybe we can steel some code. > Carsten> > Carsten> For now, if you use `C-u C-c C-l', you get file > Carsten> completion, and the result will be a "file:" link > Carsten> with a relative path (unless you enter a path > Carsten> starting with "/"). Even if you find the file with > Carsten> ../../../some/path, it will still be inserted as a > Carsten> relative link. > Carsten> > Carsten> - Carsten > Carsten> >>> >> >> The emacs binding to the w3m browser does this if you type >>> file: in the minibuffer when prompted for a URL. >>> >>>>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> >>>>>>>> writes: > Carsten> Hmmmm, this is *such* a good idea, that I will > Carsten> implement this retroactively into all versions since > Carsten> ... 2.0 or so? Abracadabra! Done. > Carsten> > Carsten> In fact, it has been working just so for a very long > Carsten> time. > Carsten> > Carsten> file:foo.html -> href="foo.html" file:foo.org -> > Carsten> href="foo.html" > Carsten> > Carsten> The second line assumes that the org file foo.org > Carsten> will also be converted to an html file in the > Carsten> publishing process.... > Carsten> > Carsten> Also, I was mistaken earlier: > Carsten> > Carsten> http:foo.html becomes href="http:foo.html" and not > Carsten> href="foo.html" > Carsten> > Carsten> so this actually cannot be used for a local link. > Carsten> > Carsten> So what remains from this exchange? Should we > Carsten> accept links that look like absolute file names > Carsten> (including ./foo.html) as equivalent to > Carsten> file:./foo.html ? > Carsten> > Carsten> - Carsten > Carsten> > Carsten> On Apr 13, 2008, at 6:25 PM, T. V. Raman wrote: > Carsten> >>>>> >>> I think writing http:foo.html is a bad idea because typing >>>>> that string in other contexts is sort of meaningless as >>>>> a URL. Until now, everything one types in org-mode sort >>>>> of has meaning elsewhere. If you want it to look like a >>>>> url in this case too then I'd suggest file:foo.html -- >>>>> rther than http:file.html. >>>>> >>>>> I did not suggest that earlier because it's more chars >>>>> to type, but that's not a huge concern since emacs does >>>>> the typing, and we could always augment c-c c-l to >>>>> enable authoring of relative links with file completion. >>>>> >>>>> so file:a/b/c.html would become href="a/b/c.html" in the >>>>> generated html. >>>>> >>>>>>>>>> "Carsten" == Carsten Dominik >>>>>>>>>> <dominik@science.uva.nl> writes: > Carsten> On Apr 13, 2008, at 5:33 PM, T. V. Raman wrote: > Carsten> >>>>>>> I've not tried http:foo.html -- but I suggest doing >>>>>>> that to author a relative URL is a bad idea. > Carsten> > Carsten> Can you explain why you think that this is a bad > Carsten> idea? Educate me! What is wrong with writing > Carsten> http:foo.html ?????? > Carsten> > Carsten> - Carsten > Carsten> >>>>>>> >>>> >>>> I tried ./foo.html and that didn't work either. One >>>>>>> compromise would be to get ./foo.html to link to a >>>>>>> relative url, while foo.html continues to link to a >>>>>>> local anchor >>>>>>> >>>>>>>>>>>> "Carsten" == Carsten Dominik >>>>>>>>>>>> <dominik@science.uva.nl> writes: > Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: > Carsten> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> org-export turns links of the form [[foo][link to >>>>>>>>> relative url foo]] >>>>>>>>> >>>>>>>>> ends up creating links of the form <a >>>>>>>>> href="#foo">...</a> >>>>>>>>> >>>>>>>>> this means that it becomes impossible to write >>>>>>>>> hyperlinks that are relative URLs. > Carsten> > Carsten> Hi Raman, > Carsten> > Carsten> the url goes into the first pair of square brackets, > Carsten> the description into the second. If you put > Carsten> something into the first bracket pair that does not > Carsten> look lie a url, it will be treated as an internal > Carsten> link. > Carsten> > Carsten> Have you tried to use something like > Carsten> > Carsten> [[http:foo.html][link to relative url]] > Carsten> > Carsten> ? > Carsten> > Carsten> - Carsten >>>>>>> >>>>>>> -- >>>>>>> Best Regards, --raman >>>>>>> >>>>>>> >>>>>>> Email: raman@users.sf.net WWW: >>>>>>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>>>>>> tv.raman.tv@gmail.com PGP: >>>>>>> http://emacspeak.sf.net/raman/raman-almaden.asc >>>>>>> Google: tv+raman IRC: irc://irc.freenode.net/#emacs >>>>> >>>>> -- >>>>> Best Regards, --raman >>>>> >>>>> >>>>> Email: raman@users.sf.net WWW: >>>>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>>>> tv.raman.tv@gmail.com PGP: >>>>> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >>>>> tv+raman IRC: irc://irc.freenode.net/#emacs >>> >>> -- >>> Best Regards, --raman >>> >>> >>> Email: raman@users.sf.net WWW: >>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>> tv.raman.tv@gmail.com PGP: >>> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >>> tv+raman IRC: irc://irc.freenode.net/#emacs > > -- > Best Regards, > --raman > > > Email: raman@users.sf.net > WWW: http://emacspeak.sf.net/raman/ > AIM: emacspeak GTalk: tv.raman.tv@gmail.com > PGP: http://emacspeak.sf.net/raman/raman-almaden.asc > Google: tv+raman > IRC: irc://irc.freenode.net/#emacs ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-04-13 18:48 ` T. V. Raman 2008-04-13 19:35 ` Carsten Dominik @ 2008-06-24 6:38 ` Carsten Dominik 2008-06-24 8:36 ` Paul R 1 sibling, 1 reply; 14+ messages in thread From: Carsten Dominik @ 2008-06-24 6:38 UTC (permalink / raw) To: raman; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 4919 bytes --] On Apr 13, 2008, at 8:48 PM, T. V. Raman wrote: > two suggestions: > > 1) accept paths like "./foo.html" as local links. This is now allowed. > > 2) Augment C-c C-l to react to file: by providing filename > completion relative to the working directory. This is hard and therefore not yet implemented. Use `C-u C-c C-l' to insert a file link with completion. - Carsten > > > The emacs binding to the w3m browser does this if you type file: in > the minibuffer > when prompted for a URL. > >>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> writes: > Carsten> Hmmmm, this is *such* a good idea, that I will > Carsten> implement this retroactively into all versions since > Carsten> ... 2.0 or so? Abracadabra! Done. > Carsten> > Carsten> In fact, it has been working just so for a very long > Carsten> time. > Carsten> > Carsten> file:foo.html -> href="foo.html" file:foo.org -> > Carsten> href="foo.html" > Carsten> > Carsten> The second line assumes that the org file foo.org > Carsten> will also be converted to an html file in the > Carsten> publishing process.... > Carsten> > Carsten> Also, I was mistaken earlier: > Carsten> > Carsten> http:foo.html becomes href="http:foo.html" and not > Carsten> href="foo.html" > Carsten> > Carsten> so this actually cannot be used for a local link. > Carsten> > Carsten> So what remains from this exchange? Should we > Carsten> accept links that look like absolute file names > Carsten> (including ./foo.html) as equivalent to > Carsten> file:./foo.html ? > Carsten> > Carsten> - Carsten > Carsten> > Carsten> On Apr 13, 2008, at 6:25 PM, T. V. Raman wrote: > Carsten> >>> >> I think writing http:foo.html is a bad idea because typing that >>> string in other contexts is sort of meaningless as a URL. >>> Until now, everything one types in org-mode sort of has >>> meaning elsewhere. If you want it to look like a url in >>> this case too then I'd suggest file:foo.html -- rther than >>> http:file.html. >>> >>> I did not suggest that earlier because it's more chars to >>> type, but that's not a huge concern since emacs does the >>> typing, and we could always augment c-c c-l to enable >>> authoring of relative links with file completion. >>> >>> so file:a/b/c.html would become href="a/b/c.html" in the >>> generated html. >>> >>>>>>>> "Carsten" == Carsten Dominik <dominik@science.uva.nl> >>>>>>>> writes: > Carsten> On Apr 13, 2008, at 5:33 PM, T. V. Raman wrote: > Carsten> >>>>> I've not tried http:foo.html -- but I suggest doing that >>>>> to author a relative URL is a bad idea. > Carsten> > Carsten> Can you explain why you think that this is a bad > Carsten> idea? Educate me! What is wrong with writing > Carsten> http:foo.html ?????? > Carsten> > Carsten> - Carsten > Carsten> >>>>> >>> >>> I tried ./foo.html and that didn't work either. One compromise >>>>> would be to get ./foo.html to link to a relative url, >>>>> while foo.html continues to link to a local anchor >>>>> >>>>>>>>>> "Carsten" == Carsten Dominik >>>>>>>>>> <dominik@science.uva.nl> writes: > Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman wrote: > Carsten> >>>>>>> Hi, >>>>>>> >>>>>>> org-export turns links of the form [[foo][link to >>>>>>> relative url foo]] >>>>>>> >>>>>>> ends up creating links of the form <a >>>>>>> href="#foo">...</a> >>>>>>> >>>>>>> this means that it becomes impossible to write >>>>>>> hyperlinks that are relative URLs. > Carsten> > Carsten> Hi Raman, > Carsten> > Carsten> the url goes into the first pair of square brackets, > Carsten> the description into the second. If you put > Carsten> something into the first bracket pair that does not > Carsten> look lie a url, it will be treated as an internal > Carsten> link. > Carsten> > Carsten> Have you tried to use something like > Carsten> > Carsten> [[http:foo.html][link to relative url]] > Carsten> > Carsten> ? > Carsten> > Carsten> - Carsten >>>>> >>>>> -- >>>>> Best Regards, --raman >>>>> >>>>> >>>>> Email: raman@users.sf.net WWW: >>>>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>>>> tv.raman.tv@gmail.com PGP: >>>>> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >>>>> tv+raman IRC: irc://irc.freenode.net/#emacs >>> >>> -- >>> Best Regards, --raman >>> >>> >>> Email: raman@users.sf.net WWW: >>> http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: >>> tv.raman.tv@gmail.com PGP: >>> http://emacspeak.sf.net/raman/raman-almaden.asc Google: >>> tv+raman IRC: irc://irc.freenode.net/#emacs > > -- > Best Regards, > --raman > > > Email: raman@users.sf.net > WWW: http://emacspeak.sf.net/raman/ > AIM: emacspeak GTalk: tv.raman.tv@gmail.com > PGP: http://emacspeak.sf.net/raman/raman-almaden.asc > Google: tv+raman > IRC: irc://irc.freenode.net/#emacs [-- Attachment #1.2: Type: text/html, Size: 15062 bytes --] [-- Attachment #2: Type: text/plain, Size: 204 bytes --] _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: export to html and relative links: 2008-06-24 6:38 ` Carsten Dominik @ 2008-06-24 8:36 ` Paul R 2008-06-24 9:39 ` Carsten Dominik 0 siblings, 1 reply; 14+ messages in thread From: Paul R @ 2008-06-24 8:36 UTC (permalink / raw) To: Carsten Dominik; +Cc: raman, emacs-orgmode Carsten Dominik <carsten.dominik@gmail.com> writes: > 2) Augment C-c C-l to react to file: by providing filename > completion relative to the working directory. > > This is hard and therefore not yet implemented. Use `C-u C-c C-l' to insert a file link with > completion. Drop it if I'm off-topic, but isn't it what (file-relative-name path) does ? -- Paul ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: export to html and relative links: 2008-06-24 8:36 ` Paul R @ 2008-06-24 9:39 ` Carsten Dominik 2008-06-24 9:45 ` Paul R 0 siblings, 1 reply; 14+ messages in thread From: Carsten Dominik @ 2008-06-24 9:39 UTC (permalink / raw) To: Paul R; +Cc: raman, emacs-orgmode On Jun 24, 2008, at 10:36 AM, Paul R wrote: > Carsten Dominik <carsten.dominik@gmail.com> writes: > > >> 2) Augment C-c C-l to react to file: by providing filename >> completion relative to the working directory. >> >> This is hard and therefore not yet implemented. Use `C-u C-c C-l' >> to insert a file link with >> completion. > > Drop it if I'm off-topic, but isn't it what (file-relative-name path) > does ? It is hard because I would have to write a special completion function which sees the "file:" types and the switches its completion tactics. - Carsten ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: export to html and relative links: 2008-06-24 9:39 ` Carsten Dominik @ 2008-06-24 9:45 ` Paul R 0 siblings, 0 replies; 14+ messages in thread From: Paul R @ 2008-06-24 9:45 UTC (permalink / raw) To: Carsten Dominik; +Cc: raman, emacs-orgmode Carsten Dominik <carsten.dominik@gmail.com> writes: >> Drop it if I'm off-topic, but isn't it what (file-relative-name path) >> does ? > > It is hard because I would have to write a special completion function > which sees the "file:" types and the switches its completion tactics. So I was right ! Right to beleive I was off topic ;-) -- Paul ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-06-24 9:45 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-04-13 4:49 export to html and relative links: T. V. Raman 2008-04-13 5:37 ` Carsten Dominik 2008-04-13 15:33 ` T. V. Raman 2008-04-13 15:54 ` Carsten Dominik 2008-04-13 16:25 ` T. V. Raman 2008-04-13 17:19 ` Carsten Dominik 2008-04-13 18:48 ` T. V. Raman 2008-04-13 19:35 ` Carsten Dominik 2008-04-13 20:32 ` T. V. Raman 2008-04-13 21:37 ` Carsten Dominik 2008-06-24 6:38 ` Carsten Dominik 2008-06-24 8:36 ` Paul R 2008-06-24 9:39 ` Carsten Dominik 2008-06-24 9:45 ` Paul R
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).