From: Eppo Math <eppolito.math@gmail.com>
To: emacs-orgmode@gnu.org
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 [thread overview]
Message-ID: <62a2389f-cf1f-9caa-7266-015f3e05d734@gmail.com> (raw)
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/)
next reply other threads:[~2023-01-13 3:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 18:09 Eppo Math [this message]
2023-01-13 9:25 ` [BUG] org-agenda-span treats 7 differently [9.4.6 (9.4.6-g3ba46c @ ~/.emacs.d/straight/build/org/)] Ihor Radchenko
[not found] ` <01e57c89-e570-ff4d-5286-ff4c0a17f703@gmail.com>
[not found] ` <87fscc88lj.fsf@localhost>
2023-01-16 10:46 ` Ihor Radchenko
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62a2389f-cf1f-9caa-7266-015f3e05d734@gmail.com \
--to=eppolito.math@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).