Fuzzy links to headlines ignore COMMENT keywords

* lisp/org.el (org-link-search): Ignore COMMENT keyword.
* testing/lisp/test-org.el (test-org/fuzzy-links): Add test.

Reported-by: Martin Carlé <mc@aiguphonie.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96413>
This commit is contained in:
Nicolas Goaziou 2015-03-26 21:05:27 +01:00
parent 2f58e3c011
commit 22f732c255
2 changed files with 6 additions and 0 deletions

View File

@ -11079,6 +11079,7 @@ variable."
org-outline-regexp-bol
"\\(?:" org-todo-regexp "[ \t]+\\)?"
"\\(?:\\[#.\\][ \t]+\\)?"
"\\(?:" org-comment-string "[ \t]+\\)?"
sep "*"
(mapconcat #'identity
(org-split-string (regexp-quote s))

View File

@ -1389,6 +1389,11 @@
(let ((org-link-search-must-match-exact-headline nil)
(org-todo-regexp "TODO"))
(org-open-at-point)))))
;; Heading match ignores COMMENT keyword.
(should
(org-test-with-temp-text "[[*Test]]\n* COMMENT Test"
(org-open-at-point)
(looking-at "\\* COMMENT Test")))
;; Correctly un-hexify fuzzy links.
(should
(org-test-with-temp-text "* With space\n[[*With%20space][With space]]"