From 0d0dc0acb4c0f66753c56332cc3671c35d63a207 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 7 Jun 2010 05:52:33 +0200 Subject: [PATCH] Do not format sub- and superscripts in links * lisp/org.el (org-raise-scripts): Do not act in links. Matt Lundin writes: > Git commit 70d24c5d036cd5787f719104a0ad2f157c5207b1 causes underscores > in hyperlinks to display parts of link and description as subscripts. > E.g., this link... > > [[http://www.samplepage.com/an_underscore][Some description words]] > > ...displays the word "Some" in the description as a subscript. With M-x > visible-mode, the substring "underscore][Some" is displayed as a > subscript. --- lisp/org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index c1340ecf6..f35a91a03 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5513,13 +5513,14 @@ and subscriipts." org-match-substring-regexp org-match-substring-with-braces-regexp) limit t) - (let* ((pos (point)) table-p comment-p emph-p) + (let* ((pos (point)) table-p comment-p emph-p link-p) (setq emph-p (get-text-property (match-beginning 3) 'org-emphasis)) + (setq link-p (get-text-property (match-beginning 3) 'mouse-face)) (goto-char (point-at-bol)) (setq table-p (org-looking-at-p org-table-dataline-regexp) comment-p (org-looking-at-p "[ \t]*#")) (goto-char pos) - (if (or comment-p emph-p) + (if (or comment-p emph-p link-p) t (put-text-property (match-beginning 3) (match-end 0) 'display -- 2.11.4.GIT