Visuwesh via "General discussions about Org-mode."
<[email protected]> writes:

> 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.

Hello Visuwesh (cc the Org list)!

I'm a newly appointed "Org contributor liaison", which basically means
I'm a newbie in training on the Org team, assigned to work on tidying up
the backlog of bug reports. That's why I'm replying to this very old
report of yours (thanks for reporting it, apologies that you - as far as
I can tell - haven't had any response to it until now).

Seeing as how I'm new both to working with the Org team and Elisp in
general, I can't really contribute much on the matter itself, other than
to say that I didn't get an error when I tried to use a function as the
second entry. But I don't know enough about Org or Elisp to confirm that
the problem you're describing has been fixed either.

So, I turn to the other members of the list and ask - can someone who
knows more than me investigate this?

And, a keyword for our bug tracker:

Owned.

-- 
Christer Enfors
Org contributor liaison
GPG Fingerprint: 9CF7 3292 83BC D643 DF01  992C 1C3B 434F 2AC2 B1E6
Public Key available at: keys.openpgp.org

Reply via email to