Function: org-find-exact-heading-in-directory
org-find-exact-heading-in-directory is a byte-compiled function
defined in org.el.gz.
Signature
(org-find-exact-heading-in-directory HEADING &optional DIR)
Documentation
Find Org node headline HEADING in all ".org" files in directory DIR.
When the target headline is found, return a marker to this location.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-find-exact-heading-in-directory (heading &optional dir)
"Find Org node headline HEADING in all \".org\" files in directory DIR.
When the target headline is found, return a marker to this location."
(let ((files (directory-files (or dir default-directory)
t "\\`[^.#].*\\.org\\'"))
visiting m buffer)
(catch 'found
(dolist (file files)
(message "trying %s" file)
(setq visiting (org-find-base-buffer-visiting file))
(setq buffer (or visiting (find-file-noselect file)))
(setq m (org-find-exact-headline-in-buffer
heading buffer))
(when (and (not m) (not visiting)) (kill-buffer buffer))
(and m (throw 'found m))))))