[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Properly handle defaults in org-set-property
From: |
Janek F |
Subject: |
Re: Properly handle defaults in org-set-property |
Date: |
Thu, 02 Feb 2023 06:44:43 +0000 |
That is exactly what I use, as you can see in my dotfiles:
https://code.ftt.gmbh/janek/dotfiles/src/branch/main/.config/doom/config.el#L293
But it leads to the exact aforementioned problem...
------- Original Message -------
Ihor Radchenko <yantar92@gmail.com> schrieb am Dienstag, 20. September 2022 um
10:10:
> 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
- Re: Properly handle defaults in org-set-property,
Janek F <=