From: Jambunathan K <kjambunathan@gmail.com>
To: Sebastien Vauban
<public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@plane.gmane.org>
Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org
Subject: Re: Clicking on URL does convert some special characters
Date: Wed, 07 Sep 2011 16:01:48 +0530 [thread overview]
Message-ID: <8162l41w4r.fsf@gmail.com> (raw)
In-Reply-To: <80liu0aev0.fsf@somewhere.org> (Sebastien Vauban's message of "Wed, 07 Sep 2011 11:20:03 +0200")
> Hello,
>
> I just realized a diff in behavior between 3 URL entered in the Org buffer
> with slight differences:
>
> - http://web.com/file.php?name=Rep&path=%2FPROJ%2FSomeFile.txt
> This one is correctly exported, but when clicking on it from the Org buffer,
> the URL opened in the browser is
> http://web.com/file.php?name=Rep&path=%252FPROJ%252FSomeFile.txt,
> ^^ ^^
> hence path not found error.
>
> - [[http://web.com/file.php?name=Rep&path=%2FPROJ%2FSomeFile.txt]]
> Works OK in Org and in exported HTML file.
>
> - [[http://web.com/file.php?name=Rep&path=%2FPROJ%2FSomeFile.txt][Description]]
> Idem.
Same as or 99% similar to
https://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg00513.html
1. When link is entered through C-c C-l org unescapes it. As a result
the link in the buffer IS DIFFERENT from the entered URL.
This is a CRITICAL bug.
,---- In org-insert-link
|
| (setq link (read-string "Link: "
| (org-link-unescape
| (org-match-string-no-properties 1))))
`----
2. When the Org buffer is exported to html or odt
,---- In org-html-handle-links
| (setq path (save-match-data (org-link-unescape <==
| (match-string 3 line))))
| (setq type (cond
| ((match-end 2) (match-string 2 line))
| ((save-match-data
| (or (file-name-absolute-p path)
| (string-match "^\\.\\.?/" path)))
| "file")
| (t "internal")))
| (setq path (org-extract-attributes (org-link-unescape path))) <==
`----
link unescape happens twice. Asymmetry due to One link escape + two link
unescape asymmetry creates problem on export.
Based on historical research, the second org-link-unescape can be
removed. The fact that attributes can be entered at C-c C-l prompt is
largely documented and so the second call to org-link-unescape can
largely be removed.
Jambunathan K.
> Best regards,
> Seb
--
next prev parent reply other threads:[~2011-09-07 10:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-07 9:20 Clicking on URL does convert some special characters Sebastien Vauban
2011-09-07 10:31 ` Jambunathan K [this message]
2011-09-11 17:40 ` David Maus
2011-10-09 8:12 ` Jambunathan K
2011-10-09 11:10 ` Carsten Dominik
2011-09-07 19:29 ` David Maus
2011-09-07 20:24 ` Sebastien Vauban
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=8162l41w4r.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org \
--cc=public-wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@plane.gmane.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).