From mboxrd@z Thu Jan 1 00:00:00 1970 From: "R. Michael Weylandt " Subject: Org-link-escape-chars (was Incorrect hexification in URLs in LaTeX Export) Date: Mon, 3 Mar 2014 15:06:51 -0500 Message-ID: <4846AB82-370A-48F1-97DC-6319ECA261A5@gmail.com> References: <0DEDD4E4-A513-4B03-AA78-25D9859EEA9F@gmail.com> <87fvn32dcm.fsf@med.uni-goettingen.de> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKZ8k-0002fK-4t for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 15:07:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKZ8e-00045E-KH for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 15:07:06 -0500 Received: from mail-qc0-x236.google.com ([2607:f8b0:400d:c01::236]:52810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKZ8e-000455-Gp for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 15:07:00 -0500 Received: by mail-qc0-f182.google.com with SMTP id e16so4269587qcx.41 for ; Mon, 03 Mar 2014 12:06:59 -0800 (PST) In-Reply-To: <87fvn32dcm.fsf@med.uni-goettingen.de> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andreas Leha Cc: "emacs-orgmode@gnu.org" On Feb 28, 2014, at 15:26, Andreas Leha = wrote: > "R. Michael Weylandt " > writes: >=20 >> I've tried this with Org 7.9.3 and 8.2.5h to the same result: >>=20 >> <----------------------> >> #+TITLE: Test >> * One >> Here is a [[http://google.com/search?q=3Dorgmode][link]] >> <----------------------> >>=20 >> Exporting to HTML doesn't transform the link but exporting to LaTeX resul= ts in the (non-working) http://google.com/search?%3Dorgmode >>=20 >> Is there a reason for this behavior and, if so, a way to work around it? >>=20 >> RFC 3986 2.2 explicitly says URLs may include `=3D` and =3Durl-encode-url= =3D doesn't change the link in question. >>=20 >> I've played with org-url-hexify-p and read past ML discussions, but >> they seem primarily concerned with characters which should not appear >> in URIs. >>=20 >> Thanks, >> Michael >=20 >=20 >=20 > Hi Michael, >=20 > I have recently been bitten by this as well. Based on a block > post [fn:1], I now have this in my .emacs as a work-around: >=20 > --8<---------------cut here---------------start------------->8--- > (defun al-link-filter (contents backend info) > (let ((contents (replace-regexp-in-string "\\\\#\\+name:.*$" "" contents)= ));; old and unrelated > (replace-regexp-in-string "%3D" "=3D" contents))) > (add-to-list 'org-export-filter-final-output-functions 'al-link-filter) > --8<---------------cut here---------------end--------------- Hi Andreas, Thanks for this. I had time to dig further and it seems that the 'problem' i= s the default value of org-link-escape-chars, which explicitly escapes =3D a= s well as other valid URL characters.=20 Perhaps someone more familiar with this code could explain the choice these e= scapes.=20 Michael [Subject updated because the problem isn't LaTeX specific in 8.2.5h, only in= 7.9.3]