emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Possible bug in org-agenda not showing habits properly
@ 2024-03-18 11:26 Rens Oliemans
  2024-03-19 14:56 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Rens Oliemans @ 2024-03-18 11:26 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]

When I open an org file before opening the agenda, my habits show up as regular tasks,
rather than with the consistency graph. Additionally, many CANCELed tasks still show up in
the agenda. When I open the agenda first however, everything goes fine.

Interestingly, this only happens when I bind 'org-agenda' to a key. To show this, I have
attached bad.el and good.el which reproduce the issue on current main (Org mode version
9.7-pre (release_9.6.21-1295-g46909a @ /opt/org-mode/lisp/)).

Note that they set

    (setq org-directory "/tmp/tmp.emacs/notes")

and they expect '/tmp/tmp.emacs/notes/file.org' to exist, see attachment.

Reproduce with:

  emacs -Q -l bad.el /tmp/tmp.emacs/notes/file.org

so that it definitely opens an org-file before the org-agenda. After opening the agenda,
my habits do not show up as habits. My habits do show up with:

  emacs -Q -l bad.el --eval="(org-agenda-list)"

and with they also show up:

  emacs -Q -l good.el /tmp/tmp.emacs/notes/file.org

I am running Emacs 29.2. Am I doing something wrong here?


[-- Attachment #2: bad.el --]
[-- Type: text/plain, Size: 306 bytes --]

(use-package org
  :load-path "/opt/org-mode/lisp"
  :init
  (setq org-directory "/tmp/tmp.emacs/notes"))

(use-package org-agenda
  :ensure nil
  :load-path "/opt/org-mode/lisp"
  :config
  (add-to-list 'org-modules 'org-habit t)
  (setq org-agenda-files '("file.org"))

  :bind (("C-c a" . org-agenda)))

[-- Attachment #3: good.el --]
[-- Type: text/plain, Size: 272 bytes --]

(use-package org
  :load-path "/opt/org-mode/lisp"
  :init
  (setq org-directory "/tmp/tmp.emacs/notes"))

(use-package org-agenda
  :ensure nil
  :load-path "/opt/org-mode/lisp"
  :config
  (add-to-list 'org-modules 'org-habit t)
  (setq org-agenda-files '("file.org")))

[-- Attachment #4: file.org --]
[-- Type: application/vnd.lotus-organizer, Size: 185 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-20 11:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 11:26 Possible bug in org-agenda not showing habits properly Rens Oliemans
2024-03-19 14:56 ` Ihor Radchenko
2024-03-20 11:20   ` Rens Oliemans

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