Ensure org-password-manager only checks for properties when in Org
This surpresses warnings like > Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer *Org Agenda*> (org-agenda-mode) among others.
This commit is contained in:
parent
f196d6e808
commit
e84b4fb825
@ -169,7 +169,8 @@ the `agenda' scope searches through all agenda files."
|
|||||||
If ASK-FOR-INPUT? is t, will ask for input even if point is on a
|
If ASK-FOR-INPUT? is t, will ask for input even if point is on a
|
||||||
heading that contains the property."
|
heading that contains the property."
|
||||||
(let ((display-property-name (capitalize property-name))
|
(let ((display-property-name (capitalize property-name))
|
||||||
(property (org-entry-get (point) property-name t))
|
(property (when (derived-mode-p 'org-mode)
|
||||||
|
(org-entry-get (point) property-name t)))
|
||||||
output-message heading)
|
output-message heading)
|
||||||
(if (and property (not ask-for-input?))
|
(if (and property (not ask-for-input?))
|
||||||
(setq heading (org-link-display-format (org-get-heading t t)))
|
(setq heading (org-link-display-format (org-get-heading t t)))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user