find header if not currently at point
Creating a single story would fail if the point was not on a header. Now the code tries to find the header for the element at point.
This commit is contained in:
parent
489b37d17d
commit
16cda5b42b
1 changed files with 5 additions and 3 deletions
|
@ -224,9 +224,11 @@ If set to nil, will never create stories with labels")
|
|||
;; (org-element-find-headline)))))
|
||||
|
||||
(defun org-element-find-headline ()
|
||||
(save-mark-and-excursion
|
||||
(when (not (outline-on-heading-p)) (org-back-to-heading))
|
||||
(let ((current-elt (org-element-at-point)))
|
||||
(when (equal 'headline (car current-elt))
|
||||
(cadr current-elt))))
|
||||
(cadr current-elt)))))
|
||||
|
||||
(defun org-element-extract-clubhouse-id (elt &optional property)
|
||||
(when-let* ((clubhouse-id-link (plist-get elt (or property :CLUBHOUSE-ID))))
|
||||
|
|
Loading…
Reference in a new issue