 ;;;###autoload
 (defun doom-completing-read-org-headings (prompt files &optional depth include-files initial-input extra-candidates)
   "TODO"
-  (let (ivy-sort-functions-alist)
-    (if-let* ((result (completing-read
-                       prompt
-                       (append (doom--org-headings files depth include-files)
-                               extra-candidates)
-                       nil nil initial-input)))
-        (cl-destructuring-bind (file . location)
-            (get-text-property 0 'location result)
+  (let ((alist
+         (append (doom--org-headings files depth include-files)
+                 extra-candidates))
+        ivy-sort-functions-alist)
+    (if-let (result (completing-read prompt alist nil nil initial-input))
+        (cl-destructuring-bind (file &optional location)
+            (cdr (assoc result alist))
           (find-file file)
-          (when location
-            (goto-char location)))
+          (cond ((functionp location)
+                 (funcall location))
+                (location
+                 (goto-char location))))
       (user-error "Aborted"))))
 
 ;;;###autoload

(defun doom--help-modules-list ()
  (cl-loop for path in (cdr (doom-module-load-path 'all))
           for (cat . mod) = (doom-module-from-path path)
           for location = (cons (or (doom-module-locate-path cat mod "README.org")
                                    (doom-module-locate-path cat mod))
                                nil)
           for format = (propertize (format "%s %s" cat mod)
                                    'location location)
           if (doom-module-p cat mod)
           collect format
           else if (and cat mod)
           collect
           (propertize
            format
            'face 'font-lock-comment-face
            'location location)))

(defun doom--help-current-module-str ()
  (cond ((and buffer-file-name

         "faq.org")
   2 t initial-input
   (mapcar (lambda (x)
             (setcar x (concat "Doom Modules > " (car x)))
             x)
           (doom--help-modules-list))))

;;;###autoload
