From: Visuwesh via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: emacs-orgmode@gnu.org
Subject: [BUG] Second item of `org-agenda-timerange-leaders' cannot be a function [9.4.6 (9.4.6-gf70e36 @ /home/viz/lib/emacs/straight/build/org/)]
Date: Fri, 30 Jul 2021 08:18:55 +0200 (CEST) [thread overview]
Message-ID: <Mfq3BmM--3-2@tutanota.com> (raw)
Looking at the definition of `org-agenda-timerange-leaders' suggests
that the second item of the list can be a function.
(defcustom org-agenda-timerange-leaders '("" "(%d/%d): ")
"Text preceding timerange entries in the agenda view.
This is a list with two strings. The first applies when the range
is entirely on one day. The second applies if the range spans several days.
The strings may have two \"%d\" format specifiers which will be filled
with the sequence number of the days, and the total number of days in the
range, respectively."
:group 'org-agenda-line-format
:type '(list
(string :tag "Deadline today ")
(choice :tag "Deadline relative"
(string :tag "Format string")
(function))))
^^^
However, setting it to a function simply yields a type error since
`format' expects a string. This has been a problem ever since the
option was introduced in the commit ea258dbdb.
It would be nice if org could accept a function, as one would expect
from the definition of the concerned option. The function would accept two arguments and return a format-string or a _formatted_ string?
Regards.
P.S. Please add me to CCs since I don't follow the mailing list.
reply other threads:[~2021-08-03 12:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Mfq3BmM--3-2@tutanota.com \
--to=emacs-orgmode@gnu.org \
--cc=visuwesh@tutanota.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.