Hello Kyle,

On 2021-02-16 23:01, Kyle Meyer <k...@kyleam.com> writes:

>> By the way, I’m surprised by the code of this function, as it is defined
>> as:
>>
>> (defun org-agenda-goto-date (span)
>>   "Jump to DATE in agenda."
>>   …
>> )
>>
>> and "span" is never mentioned in the function. Am I missing something?
>
> That does look wrong.  Among other changes, 93fcfe4d3 (org-agenda.el:
> Fix org-agenda-goto-date' again, 2012-08-30) switched the DATE argument
> to SPAN, moving the org-read-date call out of the interactive form.
> From that commit alone, I don't have a good guess at why and am
> wondering if the above change was an unfinished thought that came along
> with the other changes.
>
> Here are two threads from around that time that may be related, though I
> haven't reviewed either of them:
>
>  https://orgmode.org/list/blu0-smtp912fc379760ee431d3d68ebb...@phx.gbl/T/#u
>  https://orgmode.org/list/blu0-smtp950e9387b34fa390c4fd9cbb...@phx.gbl/T/#u
>
> Moving org-read-date back to the interactive form would allow lisp
> callers to pass in the date, though perhaps it'd bring back some
> misbehavior discussed in the above threads.

I’ve tried this change here and it works great, thanks a lot.

Looking at the code, I don’t see how it could cause trouble elsewhere
(but understanding agenda code is always tricky…)

Should I file a bug regarding this?

Best,

Alan

Attachment: signature.asc
Description: PGP signature

Reply via email to