From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Otterson Subject: Re: Bug: Latex export fails with link in headline Date: Mon, 5 Dec 2016 09:19:58 +0100 Message-ID: References: <87mvgjg805.fsf@nicolasgoaziou.fr> <87a8ccd8sh.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1134c26a83512b0542e4f647 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDoVx-0006Ay-JK for emacs-orgmode@gnu.org; Mon, 05 Dec 2016 03:20:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDoVt-0003vh-9w for emacs-orgmode@gnu.org; Mon, 05 Dec 2016 03:20:45 -0500 Received: from mail-wj0-x22f.google.com ([2a00:1450:400c:c01::22f]:35693) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cDoVt-0003vC-1b for emacs-orgmode@gnu.org; Mon, 05 Dec 2016 03:20:41 -0500 Received: by mail-wj0-x22f.google.com with SMTP id v7so282592875wjy.2 for ; Mon, 05 Dec 2016 00:20:40 -0800 (PST) In-Reply-To: <87a8ccd8sh.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "Emacs-orgmode@gnu.org" , Nicolas Goaziou --001a1134c26a83512b0542e4f647 Content-Type: text/plain; charset=UTF-8 Huh, the mystery deepens. Does TexLive really behave differently on Linux? Anyway, I'd argue that Org should do the minimum to prevent Latex crashes. It seems that org is aiming to be a generic document format, which can be exported to other formats without modification. But with the current behavior, that's not possible. If I modify the org doc to avoid latex crashes (escaping the '#' in the URL), then the same document exported to html will not work; click on the html link and you'll get a 404 error. On Sat, Dec 3, 2016 at 10:03 PM, Nicolas Goaziou wrote: > Hello, > > Scott Otterson writes: > > > Could you please check the .tex output you got when exported my .org file > > example (attached again)? In the .tex I get (also attached), it's clear > > that org-mode has forgotten to escape the '#' in the URL. In > headlink.tex, > > if I replace '#' with ''\#', then latexmk can successfully make a pdf. > > > > Do you see something different? > > I do. While I get the same .tex output, compiling the file to a pdf > doesn't crash. I also use Texlive, but on GNU/Linux. > > Besides, Org mode doesn't escape anything. It calles `url-encode-url' on > the link instead. > > Regards, > > -- > Nicolas Goaziou > --001a1134c26a83512b0542e4f647 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Huh, the mystery deepens.=C2=A0 Does TexLive really behave= differently on Linux?

Anyway, I'd argue that Org sh= ould do the minimum to prevent Latex crashes.=C2=A0 It seems that org is ai= ming to be a generic document format, which can be exported to other format= s without modification. =C2=A0

But with the curren= t behavior, that's not possible.=C2=A0 If I modify the org doc to avoid= latex crashes (escaping the '#' in the URL), then the same documen= t exported to html will not work; click on the html link and you'll get= a 404 error.

On Sat, Dec 3, 2016 at 10:03 PM, Nicolas Goaziou = <mail@nicola= sgoaziou.fr> wrote:
Hello,

Scott Otterson <scotto@sharpleaf= .org> writes:

> Could you please check the .tex output you got= when exported my .org file
> example (attached again)?=C2=A0 In the .tex I get (also attached), it&= #39;s clear
> that org-mode has forgotten to escape the '#' in the URL.=C2= =A0 In headlink.tex,
> if I replace '#' with ''\#', then latexmk can succ= essfully make a pdf.
>
> Do you see something different?

I do. While I get the same .tex output, compiling the file to a pdf<= br> doesn't crash. I also use Texlive, but on GNU/Linux.

Besides, Org mode doesn't escape anything. It calles `url-encode-url= 9; on
the link instead.

Regards,

--
Nicolas Goaziou

--001a1134c26a83512b0542e4f647--