From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Sainty Subject: Feature request: Radio button option for lists of checkboxes Date: Sun, 3 Nov 2019 21:52:13 +1300 Message-ID: <58c2c0d3-f65c-45ba-dd45-5dcd29a17d42@orcon.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:41646) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRBcY-0004NP-Oe for emacs-orgmode@gnu.org; Sun, 03 Nov 2019 03:52:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRBcX-0002nU-4L for emacs-orgmode@gnu.org; Sun, 03 Nov 2019 03:52:26 -0500 Received: from smtp-2.orcon.net.nz ([60.234.4.43]:43597) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iRBcW-0002at-Q7 for emacs-orgmode@gnu.org; Sun, 03 Nov 2019 03:52:25 -0500 Content-Language: en-GB List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Cc: matus.goljer@gmail.com, John Kitchin (Where "radio button" means that for a list of checkboxes, only one may be selected at any given time -- selecting a different checkbox automatically de-selects the previous one.) Hello org-mode, John Kitchin posted this blog a few years back: http://kitchingroup.cheme.cmu.edu/blog/2015/10/05/A-checkbox-list-in-org-mode-with-one-value/ Subsequently Matúš Goljer adapted that code here: https://github.com/Fuco1/org-radiobutton I'm slow in following this up, but I contacted both John and Matúš last year suggesting that this facility would make a nice addition to the core org-mode features. Both of them were happy for me to submit the feature request, and both confirmed that they have signed FSF copyright assignment, and so their code may be safely adapted. I have CC'd them both to this message. Matúš's github project has subsequently merged a branch from one other contributor, so I have pushed a fork which excludes that particular change, as I am not aware of the copyright status for that. This FSF-safe fork is: https://github.com/phil-s/org-radiobutton (n.b. I've assigned FSF copyright for Emacs too, but none of the code on this fork was written by me.) John also independently made some later changes to his original code, and the current version of that can be found here: https://github.com/jkitchin/scimax/blob/740591268a868b4944193e0600bf71b6f2553f2b/scimax-org.el#L1426 Both implementations depend upon the dash library, so I expect the relevant bits of code would need rewriting. I suspect that a standard implementation would be able to approach things a bit differently in any case; but the existing code would surely provide at minimum a valuable reference for a core implementation, and I imagine at least some of the code could be used verbatim. I'm not familiar with org-mode internals, so I've not attempted to provide a patch for this, but I'm hoping there's enough here that someone with existing knowledge could run with it, as it seems like a nice feature to include. -Phil