From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: export to html and relative links: Date: Tue, 24 Jun 2008 08:38:03 +0200 Message-ID: <8D453617-E574-4032-B7B4-B421D34E6163@gmail.com> References: <18433.37101.453170.649918@gargle.gargle.HOWL> <18434.10211.460576.220006@gargle.gargle.HOWL> <18434.13307.199469.747272@gargle.gargle.HOWL> <83DA18C3-10D2-4286-95BE-8E81EA1D0652@science.uva.nl> <18434.21887.554746.137185@gargle.gargle.HOWL> Mime-Version: 1.0 (Apple Message framework v924) Content-Type: multipart/mixed; boundary="===============1714439973==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KB2AO-0006wM-78 for emacs-orgmode@gnu.org; Tue, 24 Jun 2008 02:38:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KB2AN-0006wA-8c for emacs-orgmode@gnu.org; Tue, 24 Jun 2008 02:38:11 -0400 Received: from [199.232.76.173] (port=36446 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KB2AN-0006w7-2K for emacs-orgmode@gnu.org; Tue, 24 Jun 2008 02:38:11 -0400 Received: from ug-out-1314.google.com ([66.249.92.174]:3892) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KB2AM-00016d-7p for emacs-orgmode@gnu.org; Tue, 24 Jun 2008 02:38:10 -0400 Received: by ug-out-1314.google.com with SMTP id l31so568966ugc.48 for ; Mon, 23 Jun 2008 23:38:09 -0700 (PDT) In-Reply-To: <18434.21887.554746.137185@gargle.gargle.HOWL> 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: raman@users.sf.net Cc: emacs-orgmode@gnu.org --===============1714439973== Content-Type: multipart/alternative; boundary=Apple-Mail-1--240917213 --Apple-Mail-1--240917213 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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 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 >>>>>>>> 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 >>>>>>>>>> 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 >>>>>> href="#foo">... >>>>>>> >>>>>>> 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 --Apple-Mail-1--240917213 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
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" =3D=3D 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=3D"foo.html" file:foo.org ->
   Carsten> = href=3D"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=3D"http:foo.html" = and not
   Carsten> href=3D"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=3D"a/b/c.html" in the
generated = html.

"Carsten" =3D=3D 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" =3D=3D Carsten = Dominik
<dominik@science.uva.nl> = writes:
=    Carsten> On Apr 13, 2008, at 6:49 AM, T. V. Raman = wrote:
   Carsten>
Hi,
<= /blockquote>

org-export turns links of the form [[foo][link = to
relative url = foo]]
=

ends = up creating links of the form = <a
=
href=3D"#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

= --Apple-Mail-1--240917213-- --===============1714439973== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1714439973==--