commit bc607a9af46095035b1c0271b73d61ba4d6608d6 (patch)
parent ebd450a17 org.texi (Custom Table Styles - An Illustration): New node
tree fde40348571f83f27c89f511bd990e7d7d96a735
author David Maus <dmaus@ictsoc.de> 2011-12-11 10:53:14 +0100
committer David Maus <dmaus@ictsoc.de> 2011-12-11 10:53:14 +0100
Avoid erroneous normalization of bracket link parts
* org-exp.el (org-export-normalize-links): Mark bracket links before
normalization to avoid erroneous normalization of bracket link parts.
This fixes a bug reported by M. Bauer at
<http://thread.gmane.org/gmane.emacs.orgmode/49756> and allows proper
normalization of bracket links with a link in the query part, e.g.
[[http://example.tld?q=http://example.tld][Example]]
---
lisp/org-exp.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index b7d447d08..eae5be7e9 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2083,10 +2083,11 @@ Also, store forced alignment information found in such lines."
(re-angle-link (concat "\\([^[]\\)" org-angle-link-re))
nodesc)
(goto-char (point-min))
+ (while (re-search-forward org-bracket-link-regexp nil t)
+ (put-text-property (match-beginning 0) (match-end 0) 'org-normalized-link t))
+ (goto-char (point-min))
(while (re-search-forward re-plain-link nil t)
- (unless (org-string-match-p
- "\\[\\[\\S-+:\\S-*?\\<"
- (buffer-substring (point-at-bol) (match-beginning 0)))
+ (unless (get-text-property (match-beginning 0) 'org-normalized-link)
(goto-char (1- (match-end 0)))
(org-if-unprotected-at (1+ (match-beginning 0))
(let* ((s (concat (match-string 1)
glossary
--------
Commit objects reference one tree, and zero or more parents.
Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.
Multiple parents means the commit is a merge.
Root commits have no ancestor. Note that it is
possible to have multiple root commits when merging independent histories.
Every commit references one top-level tree object.
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).