emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "R. Michael Weylandt <michael.weylandt@gmail.com>" <michael.weylandt@gmail.com>
To: Andreas Leha <andreas.leha@med.uni-goettingen.de>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Org-link-escape-chars (was Incorrect hexification in URLs in LaTeX Export)
Date: Mon, 3 Mar 2014 15:06:51 -0500	[thread overview]
Message-ID: <4846AB82-370A-48F1-97DC-6319ECA261A5@gmail.com> (raw)
In-Reply-To: <87fvn32dcm.fsf@med.uni-goettingen.de>



On Feb 28, 2014, at 15:26, Andreas Leha <andreas.leha@med.uni-goettingen.de> wrote:

> "R. Michael Weylandt <michael.weylandt@gmail.com>"
> <michael.weylandt@gmail.com> writes:
> 
>> I've tried this with Org 7.9.3 and 8.2.5h to the same result:
>> 
>> <---------------------->
>> #+TITLE: Test
>> * One
>> Here is a [[http://google.com/search?q=orgmode][link]]
>> <---------------------->
>> 
>> Exporting to HTML doesn't transform the link but exporting to LaTeX results in the (non-working) http://google.com/search?%3Dorgmode
>> 
>> Is there a reason for this behavior and, if so, a way to work around it?
>> 
>> RFC 3986 2.2 explicitly says URLs may include `=` and =url-encode-url= doesn't change the link in question.
>> 
>> 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.
>> 
>> Thanks,
>> Michael
> 
> 
> 
> Hi Michael,
> 
> 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:
> 
> --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" "=" 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'  is the default value of org-link-escape-chars, which explicitly escapes = as well as other valid URL characters. 

Perhaps someone more familiar with this code could explain the choice these escapes. 

Michael

[Subject updated because the problem isn't LaTeX specific in 8.2.5h, only in 7.9.3]

  reply	other threads:[~2014-03-03 20:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 18:51 Incorrect hexification in URLs in LaTeX Export R. Michael Weylandt <michael.weylandt@gmail.com>
2014-02-28 20:26 ` Andreas Leha
2014-03-03 20:06   ` R. Michael Weylandt <michael.weylandt@gmail.com> [this message]
2014-03-04 20:45     ` Org-link-escape-chars (was Incorrect hexification in URLs in LaTeX Export) Simon Thum
2014-03-06  2:58       ` R. Michael Weylandt
2014-03-06  9:17         ` Andreas Leha
2014-03-17 12:24           ` Simon Thum
2014-03-12 18:47 ` Incorrect hexification in URLs in LaTeX Export Bastien
2014-03-17 21:31   ` Andreas Leha
2014-03-18 15:41     ` Bastien
2014-03-18 21:24       ` R. Michael Weylandt <michael.weylandt@gmail.com>
2014-03-19 14:37         ` R. Michael Weylandt <michael.weylandt@gmail.com>
2014-05-25  5:56           ` Bastien
2014-05-25  7:09             ` David Maus
2014-05-25  7:18               ` Bastien
2014-05-25  7:22               ` David Maus
2014-05-26  5:16                 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4846AB82-370A-48F1-97DC-6319ECA261A5@gmail.com \
    --to=michael.weylandt@gmail.com \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).