From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id eHUyIVL5C2ZGIgAAe85BDQ:P1 (envelope-from ) for ; Tue, 02 Apr 2024 14:25:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id eHUyIVL5C2ZGIgAAe85BDQ (envelope-from ) for ; Tue, 02 Apr 2024 14:25:54 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=FipJtMod; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712060754; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=t0fCx8fE2rQkBSo/X9k28UH/Flw2lHclrCHCRB/U+lQ=; b=oMn6BfKSyDxFE85mjRuvzOBk9Qa1GQX8r87LwErlgntL801NlsTaLqT0hRAQ1jHEi9LRgL vynqcpSMP6UZgXBi25L3CMkjSa26Ivuns6DJxVNPVQ0xtKeq8bxIgaw7bSPG5i3O4C50so e1nza4AuN6/dIwAe2n0nlxjpJh0FPGW1N8KJXuq3wHXGo1xNApkHT78PqdyaHtpiIU4liW xN2O3BTnqe0xTZan5XavfoFpYGNdtgbXc80swF+bXaHlt5hjyoRoRRGkDfo+XgMA9hSXj5 f+gsmThxhNTtynRZ4KDbFRhPsYfPAHaTZMalvop6EKywqz9vRYWEY7N98Iz0aw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=FipJtMod; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712060754; a=rsa-sha256; cv=none; b=sgc9YWL3y4SFIHT/wIjfng9rGB04O6gZP7+A/tgFxfFZan1BRCU8Noe+/t8nifsx+hq7+r DUWJtWtEUoxTgXf7nOYyEEarZDVqK2SzZD8LglI79vGYEUVdQsQ51BVjKl3t0jd/lMGVeD ionpu3wFImBKmbhNp7jnZWNk3W9/5lN5rR305UFy8z8TMREbmrVoXDqFlVVjZ5a6a89YLW +n5wt0KvHnZuApc4hxi2vg5EK8SxUH7a/7vv9zEK5q+YgrM3tGilAqzpw7eqBgLhmktrHp QHhbsA7YH8ftvfDZPXjPlFmAaGFdRsE3v5egFBcKLs1r7HPQxf+nvCUdp7WdCQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3CF1439674 for ; Tue, 2 Apr 2024 14:25:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrdBS-0000yw-OJ; Tue, 02 Apr 2024 08:24:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrdBN-0000qq-Vd for emacs-orgmode@gnu.org; Tue, 02 Apr 2024 08:24:07 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrdAy-0003zv-6y for emacs-orgmode@gnu.org; Tue, 02 Apr 2024 08:24:04 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d700beb6beso61922791fa.2 for ; Tue, 02 Apr 2024 05:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712060617; x=1712665417; darn=gnu.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=hehOzvvxefrTDjndXMt4IifYGKZ5iNC/GIii1iBlR6o=; b=FipJtMod4upeDThRALIGf27ap/VpSAdsZx78hDLPRqnMK+LURxkjf2sP4ZLjC4fSOQ kHgR0pDY8vuPfaBP2N0gevIbC2h4Q4QzIP+p0HUuwZLoDwqYA1wiMX2vN04VvY/ym0jz StTNUBSZ+r7UUFLXiyD+Tpwuzg5/m0A4nq6D7CasE1ynoUS6ekspScKYXjh4+HpYvGtN QjEv/6RRZwDrPU003ezJg7CzZK1s6iV8Ey5njNgvCuguWgUeNTtwyZ5cQZnSrV/GBzYP OFSprXGZR4BMoD4RpemKlWhz/b8fdJxlxnKc+fJNtD4DZo8IDxTu+Fg+1oEUZAe3wlpj YiTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712060617; x=1712665417; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hehOzvvxefrTDjndXMt4IifYGKZ5iNC/GIii1iBlR6o=; b=Tikf4xAVCW/xOX8yeiezDVaCwhFwmLID3xiTtRM83IixAhYlSnf2a0amtPM5nW/kAb cbMH37Lt83ciZK5rAv/PHFM6SSZaFWo3oY0HMvia5Bk7fMs+TiouJ9Cs6TiOCMmFXtV+ 7mWcSPLIcY1GN/ouH0kiWcmcKqnt0nM8gHe25HsAHGzDNy92jWzuV4OfPqvroLh/GDEG 04UENyFh/nbuC0Ta4BobDWKrYaR5i/4WmYY1hRmaKkLZzaeTd8FKgZJTnJgEJ2wwB6y6 x5A78+UvWww2F3oUHPyq/6/QUPchpKX69txj/0OjgSiJDliQ1xZQrcZWgolDv1se+Mpa /Z8A== X-Gm-Message-State: AOJu0YzM6ClY90uwZeNWgf9LrTsdw2sisNhd/sFAxwtepzMHDhrHTt3X wIDi8IEkcQiiu1/9grEzpuaUOWuAAHj+x1hZAeqgcpcdnlN0KXGUuSfojmlrAF8= X-Google-Smtp-Source: AGHT+IFaBI5/Tqy49ssXqstzLYq5fk7ApReXWuoElynhIKhupzUm3U8pvt9T517tRVYqUc6W/qcHZA== X-Received: by 2002:a05:651c:78f:b0:2d6:bd60:1c17 with SMTP id g15-20020a05651c078f00b002d6bd601c17mr6724844lje.28.1712060616871; Tue, 02 Apr 2024 05:23:36 -0700 (PDT) Received: from windows (83.24.116.217.ipv4.supernova.orange.pl. [83.24.116.217]) by smtp.gmail.com with ESMTPSA id j20-20020a2e8014000000b002d71d9742d9sm1079322ljg.40.2024.04.02.05.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 05:23:36 -0700 (PDT) From: =?utf-8?Q?S=C5=82awomir?= Grochowski To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [FR] 'org-columns-next-allowed-value' for 'summary-checkbox'es functions should have 'intermediate state' '[-]' Date: Tue, 02 Apr 2024 14:23:24 +0200 Message-ID: <87v850c5s3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=slawomir.grochowski@gmail.com; helo=mail-lj1-x231.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: 3.65 X-Migadu-Queue-Id: 3CF1439674 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 3.65 X-TUID: sV24qUJh+H7X --=-=-= Content-Type: text/plain After careful consideration, I believe it is most prudent to only introduce a defcustom variable. This will allow for modification while simultaneously preserving the current behavior. Currently we can change the value of "org-columns-checkbox" with the following keybindings: (1) C-c C-c (org-columns-toggle-or-columns-quit) Same behavior to toggle checkbox as 'C-c C-c (org-toggle-checkbox)' on "org-checkbox". It's a great idea that keybinding works in the same way as in the case of a regular checkbox. This provides a consistent interface for the "org-checkbox" and "org-columns-checkbox". So every user who starts using "org-columns" will try to use the same keybinding they used for "org-checkbox". That's how I used it too. But I would not implement other keybindings from "org-checkbox": C-u C-c C-c (org-toggle-checkbox) - add or remove checkboxes. C-u C-u C-c C-c (org-toggle-checkbox) - set the checkbox to "[-]". Because there are too complicated and uncomfortable. And this functionality can be easily replaced by adding defcustom variable and using keybinding describe in point (3) of this mail. (2) n or S-RIGHT (org-columns-next-allowed-value) p or S-LEFT (org-columns-previous-allowed-value) Later on, I started using S-RIGHT & S-LEFT. It's simply more convenient than 'C-c C-c' because in "org-columns" we navigate with arrow keys. So, the right hand is always on the arrow keys, making it easier now to press just one SHIFT key with the left hand to change the value. When we have the default two states "[X]" and "[ ]", behavior is same as 'C-c C-c' - toggle within these two states. But if we add the third state "[-]", it might not be well-received by users who use these keybindings, because now they would have to additionally cycle between those three states, not just two. And unfortunately, they wouldn't be able to change it. That's why I believe it's worth introducing a defcustom variable. (3) 1..9,0 "Directly select the Nth allowed value, 0 selects the 10th value." Now that's how I change the values in the "org-columns-checkbox". Because it's by far the fastest, simplest, and most convenient way. Only one key and I immediately have the state I want. Right now I'm using 4 states for "org-columns-checkbox": (setq org-columns-checkbox-states '("[X]" "[-]" "[ ]" "" )) So empty state "" at digit '4' I have option to remove checkbox. Digit '2' is "[-]". Super easy and convenient in comparison to: C-u C-c C-c (org-toggle-checkbox) - add or remove checkboxes. C-u C-u C-c C-c (org-toggle-checkbox) - set the checkbox to "[-]". What do you think? Patch in attachment. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-lisp-org-colview.el-Add-defcustom-org-columns-checkb.patch >From 6f8e56cb3d20977e0f4c77c1be913dfb61480cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Grochowski?= Date: Sat, 16 Mar 2024 13:29:53 +0100 Subject: [PATCH] lisp/org-colview.el: Add defcustom `org-columns-checkbox-states' * lisp/org-colview.el Add defcustom `org-columns-checkbox-states'. (org-columns-next-allowed-value): Introduce variable `org-columns-checkbox-states'. This would allow to use more than two states ("[ ]", "[X]") in "org-columns-checkbox". In e.g to add an intermediate state ("[-]") which is also present in "org-checkbox". * etc/ORG-NEWS New option ~org-columns-checkbox-states~ --- etc/ORG-NEWS | 5 +++++ lisp/org-colview.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index ca73f06e7..1cb4b0c8e 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -1753,6 +1753,11 @@ following properties: ~:hook~, ~:prepare-finalize~, prior to their global counterparts for the selected template. ** New options +*** New option ~org-columns-checkbox-states~ + +This would allow to use more than two states ("[ ]", "[X]") in "org-columns-checkbox". +In e.g to add an intermediate state ("[-]") which is also present in "org-checkbox". + *** A new option for custom setting ~org-refile-use-outline-path~ to show document title in refile targets Setting ~org-refile-use-outline-path~ to ~'title~ will show title diff --git a/lisp/org-colview.el b/lisp/org-colview.el index d71c84a76..eac85d3d6 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -59,6 +59,11 @@ ;;; Configuration +(defcustom org-columns-checkbox-states '("[ ]" "[X]") + "Checkbox states to cycle between." + :group 'checkbox + :type '(repeat string)) + (defcustom org-columns-modify-value-for-display-function nil "Function that modifies values for display in column view. For example, it can be used to cut out a certain part from a time stamp. @@ -737,7 +742,7 @@ an integer, select that value." (let ((all (or (org-property-get-allowed-values pom key) (pcase (nth column org-columns-current-fmt-compiled) - (`(,_ ,_ ,_ ,(or "X" "X/" "X%") ,_) '("[ ]" "[X]"))) + (`(,_ ,_ ,_ ,(or "X" "X/" "X%") ,_) org-columns-checkbox-states)) (org-colview-construct-allowed-dates value)))) (if previous (reverse all) all)))) (when (equal key "ITEM") (error "Cannot edit item headline from here")) -- 2.30.2 --=-=-= Content-Type: text/plain Regards, -- Slawomir Grochowski --=-=-=--