Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-03-27 13:36:49 +02:00
commit 72c3c42259
2 changed files with 13 additions and 2 deletions

View File

@ -10948,7 +10948,8 @@ of matched result, which is either `dedicated' or `fuzzy'."
(normalized (replace-regexp-in-string "\n[ \t]*" " " s))
(starred (eq (string-to-char normalized) ?*))
(words (split-string (if starred (substring s 1) s)))
(s-multi-re (mapconcat #'regexp-quote words "[ \t]+\\(?:\n[ \t]*\\)?"))
(s-multi-re
(mapconcat #'regexp-quote words "\\([ \t]*\n[ \t]*\\|[ \t]+\\)"))
(s-single-re (mapconcat #'regexp-quote words "[ \t]+"))
type)
(cond

View File

@ -2282,7 +2282,17 @@ Foo Bar
(should
(org-test-with-temp-text "* [1]\n[[*%5B1%5D<point>]]"
(org-open-at-point)
(bobp))))
(bobp)))
;; Match search strings containing newline characters.
(should
(org-test-with-temp-text-in-file "Paragraph\n\nline1\nline2\n\n"
(let ((file (buffer-file-name)))
(goto-char (point-max))
(insert (format "[[file:%s::line1 line2]]" file))
(beginning-of-line)
(let ((org-link-search-must-match-exact-headline nil))
(org-open-at-point))
(looking-at-p "line1")))))
;;;; Link Escaping