emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rens Oliemans <hallo@rensoliemans.nl>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Possible bug in org-agenda not showing habits properly
Date: Mon, 18 Mar 2024 12:26:34 +0100	[thread overview]
Message-ID: <87sf0nu6fp.fsf@rensoliemans.nl> (raw)

[-- 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 --]

             reply	other threads:[~2024-03-18 12:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 11:26 Rens Oliemans [this message]
2024-03-19 14:56 ` Possible bug in org-agenda not showing habits properly Ihor Radchenko
2024-03-20 11:20   ` Rens Oliemans

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=87sf0nu6fp.fsf@rensoliemans.nl \
    --to=hallo@rensoliemans.nl \
    --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).