(fix) strip todo, priority, and tags from headline candidates (#1052)

Fixes #1047
This commit is contained in:
Jethro Kuan 2020-08-20 15:01:19 +08:00 committed by GitHub
parent c33867e6bc
commit 4e5b52fbd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1203,8 +1203,6 @@ If USE-STACK, include the parent paths as well."
(or (find-buffer-visiting file)
(find-file-noselect file)))
(current-buffer)))
(bol-regex (concat "^\\(?:" outline-regexp "\\)"))
(outline-title-fn (lambda () (buffer-substring-no-properties (point) (line-end-position))))
(outline-level-fn outline-level)
(path-separator "/")
(stack-level 0)
@ -1212,11 +1210,9 @@ If USE-STACK, include the parent paths as well."
(with-current-buffer buf
(save-excursion
(goto-char (point-min))
(while (re-search-forward bol-regex nil t)
(while (re-search-forward org-complex-heading-regexp nil t)
(save-excursion
(setq name (or (save-match-data
(funcall outline-title-fn))
""))
(setq name (substring-no-properties (or (match-string 4) "")))
(setq marker (point-marker))
(when use-stack
(goto-char (match-beginning 0))