>>>>> On Mon, 10 Feb 2025 19:27:03 +0000, Ihor Radchenko <[email protected]>
>>>>> said:
Ihor> Robert Pluim <[email protected]> writes:
>> The custom types for org-clock-rounding-minutes and
>> org-table-duration-custom-format suffer from excessive quoting. Patch
>> attached.
Ihor> Thanks!
Ihor> May you please rebase your changes to the latest bugfix?
Ihor> I've already fixed one of the :type specifications in
Ihor>
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d2e8100b2db63f3f40464775876ea6ba2671e1a3
There are a few more things that need fixing (thanks Mauro for the
pointer). In defcustom, `symbol' means "any symbol", when specifying a
particular symbol itʼs better to use `const'.
I hope I found them all. This is against org-mode master.
Thanks
Robert
--
>From 9f130ed2f38e0796bd51ea912f683aced23c96f4 Mon Sep 17 00:00:00 2001
From: Robert Pluim <[email protected]>
Date: Tue, 11 Feb 2025 09:38:41 +0100
Subject: [PATCH] Fix custom types to use const instead of symbol
* lisp/org-agenda.el (org-agenda-max-entries): Use const instead
of symbol.
(org-agenda-max-todos, org-agenda-max-tags)
org-agenda-max-effort): Likewise.
* lisp/org-clock.el (org-clock-rounding-minutes): Remove extra
quote and use const.
* lisp/org-table.el (org-table-duration-custom-format): Use
const instead of symbol.
---
lisp/org-agenda.el | 8 ++++----
lisp/org-clock.el | 2 +-
lisp/org-table.el | 10 +++++-----
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 8143fd97a..2a09a6a19 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2829,7 +2829,7 @@ (defcustom org-agenda-max-entries nil
:version "24.4"
:package-version '(Org . "8.0")
:group 'org-agenda-custom-commands
- :type '(choice (symbol :tag "No limit" nil)
+ :type '(choice (const :tag "No limit" nil)
(integer :tag "Max number of entries")
(repeat
(cons (choice :tag "Agenda type"
@@ -2847,7 +2847,7 @@ (defcustom org-agenda-max-todos nil
:version "24.4"
:package-version '(Org . "8.0")
:group 'org-agenda-custom-commands
- :type '(choice (symbol :tag "No limit" nil)
+ :type '(choice (const :tag "No limit" nil)
(integer :tag "Max number of TODOs")
(repeat
(cons (choice :tag "Agenda type"
@@ -2865,7 +2865,7 @@ (defcustom org-agenda-max-tags nil
:version "24.4"
:package-version '(Org . "8.0")
:group 'org-agenda-custom-commands
- :type '(choice (symbol :tag "No limit" nil)
+ :type '(choice (const :tag "No limit" nil)
(integer :tag "Max number of tagged entries")
(repeat
(cons (choice :tag "Agenda type"
@@ -2883,7 +2883,7 @@ (defcustom org-agenda-max-effort nil
:version "24.4"
:package-version '(Org . "8.0")
:group 'org-agenda-custom-commands
- :type '(choice (symbol :tag "No limit" nil)
+ :type '(choice (const :tag "No limit" nil)
(integer :tag "Max number of minutes")
(repeat
(cons (choice :tag "Agenda type"
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 5fd0580d0..933c05487 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -144,7 +144,7 @@ (defcustom org-clock-rounding-minutes 0
:package-version '(Org . "8.0")
:type '(choice
(integer :tag "Minutes (0 for no rounding)")
- (symbol :tag "Use `org-time-stamp-rounding-minutes'" 'same-as-time-stamp)))
+ (const :tag "Use `org-time-stamp-rounding-minutes'" same-as-time-stamp)))
(defcustom org-clock-out-remove-zero-time-clocks nil
"Non-nil means remove the clock line when the resulting time is zero."
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 39115bb5f..0147fe440 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -344,11 +344,11 @@ (defcustom org-table-duration-custom-format 'hours
a single formula."
:group 'org-table-calculation
:version "24.1"
- :type '(choice (symbol :tag "Seconds" seconds)
- (symbol :tag "Minutes" minutes)
- (symbol :tag "Hours " hours)
- (symbol :tag "Days " days)
- (symbol :tag "HH:MM " hh:mm)))
+ :type '(choice (const :tag "Seconds" seconds)
+ (const :tag "Minutes" minutes)
+ (const :tag "Hours " hours)
+ (const :tag "Days " days)
+ (const :tag "HH:MM " hh:mm)))
(defcustom org-table-duration-hour-zero-padding t
"Non-nil means hours in table duration computations should be zero-padded.
--
2.39.5