org-read-property-value: Fix DEFAULT arg when values are not restricted
* lisp/org.el (org-read-property-value): Honor DEFAULT argument when property can have arbitrary value. Reported-by: Janek F <xerusx@pm.me> Link: https://orgmode.org/list/hh0ohv2LgPq86aW2Kp4AFV1VZ3yLuZafFLFqWN_NCciQcy86rxDkcZryr7gyPXrNzjFdP8lhdC0GS4c_XQtVXjOKDD-lqkJjlswSGX7OWvo=@pm.me
This commit is contained in:
parent
562cba7aab
commit
0522c1850b
|
@ -13183,7 +13183,11 @@ Optional argument DEFAULT provides a default value for PROPERTY."
|
|||
(if (org-string-nw-p current)
|
||||
(format " [%s]" current)
|
||||
"")))
|
||||
(set-function (org-set-property-function property)))
|
||||
(set-function (org-set-property-function property))
|
||||
(default (cond
|
||||
((not allowed) default)
|
||||
((member default allowed) default)
|
||||
(t nil))))
|
||||
(org-trim
|
||||
(if allowed
|
||||
(funcall set-function
|
||||
|
@ -13195,7 +13199,7 @@ Optional argument DEFAULT provides a default value for PROPERTY."
|
|||
(and pom
|
||||
(org-with-point-at pom
|
||||
(org-property-values property)))))))
|
||||
(funcall set-function prompt all nil nil "" nil current))))))
|
||||
(funcall set-function prompt all nil nil default nil current))))))
|
||||
|
||||
(defvar org-last-set-property nil)
|
||||
(defvar org-last-set-property-value nil)
|
||||
|
|
Loading…
Reference in New Issue