diff options
author | Bastien Guerry <bzg@altern.org> | 2012-12-28 11:03:58 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-12-28 18:37:07 +0100 |
commit | de6201b19c78c9f13f857f43a8f097e56d75fa0f (patch) | |
tree | 7a52c55dbb63c07901493e03271ff48fd81cf1fe | |
parent | 6671e80453590ec82ec18c1343ce4829f523af2d (diff) | |
download | org-mode-de6201b19c78c9f13f857f43a8f097e56d75fa0f.tar.gz |
org.el (org-insert-link): Fix bug when inserting links to headlines containing the ">" character
* org.el (org-insert-link): Fix bug when inserting links to
headlines containing the ">" character.
Thanks to William Léchelle for reporting this.
-rw-r--r-- | lisp/org.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 0fabaf6..837d49b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9317,10 +9317,11 @@ Use TAB to complete link prefixes, then RET for type-specific completion support ;; URL-like link, normalize the use of angular brackets. (setq link (org-remove-angle-brackets link))) - ;; Check if we are linking to the current file with a search option - ;; If yes, simplify the link by using only the search option. + ;; Check if we are linking to the current file with a search + ;; option If yes, simplify the link by using only the search + ;; option. (when (and buffer-file-name - (string-match "^file:\\(.+?\\)::\\([^>]+\\)" link)) + (string-match "^file:\\(.+?\\)::\\(.+\\)" link)) (let* ((path (match-string 1 link)) (case-fold-search nil) (search (match-string 2 link))) |