[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Properly handle defaults in org-set-property
From: |
Ihor Radchenko |
Subject: |
Re: Properly handle defaults in org-set-property |
Date: |
Tue, 20 Sep 2022 16:11:09 +0800 |
Janek F <xerusx@pm.me> writes:
> As discussed in
> https://emacs.stackexchange.com/questions/71774/pass-default-value-to-org-set-property/71777,
> providing a default to org-set-property does not always work.
>
> It calls `org-read-property-value`, which only uses the supplied default
> value if it can compute a list of allowed values for the property. But then,
> the default value has to be part of that `_ALL` list.
>
> Can this be changed so it always uses the given default?
Why don't you just use
(map! :desc "Set ID property" "lI"
'(lambda ()
(interactive)
(org-set-property "ID" (org-read-property-value "ID" nil
"default-value"))))
?
--
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92