emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] org-agenda-span treats 7 differently [9.4.6 (9.4.6-g3ba46c @ ~/.em


From: Eppo Math
Subject: [BUG] org-agenda-span treats 7 differently [9.4.6 (9.4.6-g3ba46c @ ~/.emacs.d/straight/build/org/)]
Date: Thu, 12 Jan 2023 12:09:56 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

Many thanks in advance for taking the time to read this!

Issue: In an org agenda block (fed to org-agenda-custom-commands), the
number 7 passed to org-agenda-span causes the resulting block to begin
on the first day of the week, ignoring org-agenda-start-day.

Expected Behaviour: org-agenda-start-day and org-agenda-span should be
options with independent behaviours.

Actual Behaviour: When org-agenda-span is set to 7, the given argument
org-agenda-start-day is ignored.

Steps to Reproduce:
1. Save the following to /any-path/test.el:
#+begin_src elisp
(defun my-generate-agenda-block (START SPAN)
"Generate an agenda block for testing"
`((org-agenda-start-day ,START)
(org-agenda-span ,SPAN)
(org-agenda-overriding-header
(concat "\norg-agenda-start-day: " ,START
"\norg-agenda-span: " (number-to-string ,SPAN)))))

(setq org-agenda-custom-commands
`(("t" "Test of Agenda Blocks" (
(agenda "" ,(my-generate-agenda-block "-2d" 7))
(agenda "" ,(my-generate-agenda-block "-2d" 5))
(agenda "" ,(my-generate-agenda-block "-5d" 7))
(agenda "" ,(my-generate-agenda-block "-5d" 5))
(agenda "" ,(my-generate-agenda-block "+1d" 7))
(agenda "" ,(my-generate-agenda-block "+1d" 5))))))

(defun my-org-agenda-test () (interactive) (org-agenda "a" "t"))
#+end_src
2. Run =emacs -Q -l /any-path/test.el= at a terminal.
3. Within Emacs, run =M-x my-org-agenda-test=.

Additional Notes:
1. The order of org-agenda-start-day and org-agenda-span is irrelevant.
2. The emacs manual does not say anything helpful for either variable.
3. I've only tested "+nd" and "-nd" syntax for org-agenda-start-day.
4. My ~init.el~ is irrelevent (bug present when run from =emacs -Q=).

Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
of 2022-01-24, modified by Debian
Package: Org mode version 9.4.6 (9.4.6-g3ba46c @ ~/.emacs.d/straight/build/org/)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]