On 12/02/20 12:10 pm, Bastien wrote:
> From latest master, please try C-c C-x C-r on a checkbox or turn
> on M-x org-list-checkbox-radio-mode RET so that C-c C-c consider
> all checkboxes as radio buttons.
Brilliant, thanks Bastien!
A nice feature that may be missing from this implementation
is the ability to mark individual lists as radio-button lists,
and then have C-c C-c do the right thing contextually.
The syntax John and Matúš used was:
#+attr_org: :radio
- [ ] localhost
- [X] staging
- [ ] production
Then you can always just use C-c C-c to select a checkbox -- but
if the list is intended to be radio buttons then that behaviour
gets used automatically.
If that's practical to add to the new implementation, I would think
it would provide the best end-user experience for interacting with
such lists.
-Phil
p.s. Their code for detecting this was along similar lines:
(when (-contains? (org-element-property
:attr_org
(org-element-property :parent (org-element-context)))
":radio")
vs
(let ((list (org-radiobutton--get-list-at-point)))
(when (-contains? (org-element-property :attr_org list) ":radio")