Skip to content

Commit

Permalink
Merge pull request weirdNox#63 from org-noter/Issue61/Org-command-in-…
Browse files Browse the repository at this point in the history
…non-org-buffer

in `--doc-file-property`, ensure buffer is org-mode or pass
  • Loading branch information
petermao authored Sep 6, 2023
2 parents ab05d5e + 561d740 commit 9d42ebc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions org-noter-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -1125,10 +1125,11 @@ FORCE-NEW-REF is not used by PDF, NOV, or DJVU format files."
(org-noter--with-valid-session (org-noter--doc-location-change-handler)))

(defsubst org-noter--doc-file-property (headline)
(let ((doc-prop (or (org-element-property (intern (concat ":" org-noter-property-doc-file)) headline)
(org-entry-get nil org-noter-property-doc-file t))))
(or (run-hook-with-args-until-success 'org-noter-parse-document-property-hook doc-prop)
doc-prop)))
(when (derived-mode-p 'org-mode)
(let ((doc-prop (or (org-element-property (intern (concat ":" org-noter-property-doc-file)) headline)
(org-entry-get nil org-noter-property-doc-file t))))
(or (run-hook-with-args-until-success 'org-noter-parse-document-property-hook doc-prop)
doc-prop))))

(defun org-noter--check-location-property (arg)
(let ((property (if (stringp arg) arg
Expand Down

0 comments on commit 9d42ebc

Please sign in to comment.