From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id QPaLEMin+WXh+wAA62LTzQ:P1 (envelope-from ) for ; Tue, 19 Mar 2024 15:57:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id QPaLEMin+WXh+wAA62LTzQ (envelope-from ) for ; Tue, 19 Mar 2024 15:57:12 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=eUe8dbkE; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710860232; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hOEkNMufIvB4/JV+xAksX/A+8kDlA7cTkCqYxQ+brQ8=; b=hnZLiCieURZFfysxUukuHIInsSGMx1O2dK3bOkHrgV5bfjEGble/sMml1C3emYPhNIBzfS HXRrmHBw1uDEmCuv1B1aQH/5AglBC+nd7t4hApcdc65HfMiQUcVZRoQvSJEddJMIwhhO3N VxM/LPQp/OiRtp5cQ8o/lHcbbTf6POiLewxl2rVBYG6nkyjli1fWDxRf5qkJoO/MUKI/d7 JenxwQvPvakIqJRYjh653J5i91594cgQL9W3qncyLdb9g1JmbLGumHYkS8S9WW9Dhcsi2V kuEqzbPTbI6SRJ2dZrIpNV28GFllwSqfHg0txVEzE31bAYlxyvtBKM1An0vJrQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710860232; a=rsa-sha256; cv=none; b=JISyvvpLnRkRt0O0dWofbWztQi6VLdWV7bWVP2YgbL8LHr2OCWF5uscJB3j/95bTxYqBGw k1Kl2YLgQIxwByhOlkNYbbKhnE8LAyoBqGEJiyQ83aWPhInz0p7e3XWj7CD1q1OLfXvLPw ZlkUh+wQZIVBmSZgB1H+cvkvjfpea5OAaRJKzHcL57/YlimBrohXyQ1Lca7zPRpu+cWQkk oJ9Xf0F1cLHpdFKEE8+1Ssz4F4eaLhgKiA8XRKzZ5cmbmRBND9cYEwxdZldaw9Qfd46rXo cxN0ioLx30yGcqKC0ry9qcR1VSLTUgHhJANdF1CKK/qzZv3U5lrodCqgbsMv3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=eUe8dbkE; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 083826CA50 for ; Tue, 19 Mar 2024 15:57:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmatI-0007gM-Jz; Tue, 19 Mar 2024 10:56:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmatC-0007fj-Qr for emacs-orgmode@gnu.org; Tue, 19 Mar 2024 10:56:31 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmat9-0004aK-Tf for emacs-orgmode@gnu.org; Tue, 19 Mar 2024 10:56:30 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 11564240029 for ; Tue, 19 Mar 2024 15:56:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710860186; bh=gDqQPEQ6DxMj9VNpgRnIxwYFWdZqdbIkFuI2kEszSj0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=eUe8dbkEsUEkXDiGRGXKANBXkiAFmzQbli/NLbtT/rFua4QQJz4qEWaP2/kl8terv zkkQ1orzoRmG4w9kilSMTYC8CK13GQg5rzItomw1iZw/ZqE7mgEEyM94AvQpz+NvR/ QFBrp9eEXFrvNVm3B2BE5snxFgXzKAJsJgM97P3lNDXuw0yaYGS1GPNxjwV2bYX0wi Om3b+0AjdG0mnrnORwVvJ/IeoEazpby983sPr0Jps1flYMAnak6ebwZARbvQPrLpHF uWpvNSR1W1p7GdatEVDTFgvnVO7ZLwhOYhlzGmVlN/ckrnpKt9KAH4I64vYH5FJaXA yOYUWVMqXn6lg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TzZYP2CkNz6txb; Tue, 19 Mar 2024 15:56:25 +0100 (CET) From: Ihor Radchenko To: Rens Oliemans Cc: emacs-orgmode Subject: Re: Possible bug in org-agenda not showing habits properly In-Reply-To: <87sf0nu6fp.fsf@rensoliemans.nl> References: <87sf0nu6fp.fsf@rensoliemans.nl> Date: Tue, 19 Mar 2024 14:56:22 +0000 Message-ID: <87jzlyw9rd.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.27 X-Spam-Score: -9.27 X-Migadu-Queue-Id: 083826CA50 X-Migadu-Scanner: mx11.migadu.com X-TUID: C24U4CTe4bE+ Rens Oliemans writes: > 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/)). > ... > (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))) :bind keyword in use-package defers execution of the config snippet. So, with :bind, you first have the (use-package org ...) executed, loading org.el, and only later, after you press C-c a, :config block in (use-package org-agenda ...) is executed and `org-modules' is changed. If you check the docstring for `org-modules', you will see "Modules that should always be loaded together with org.el." However, your config block is executed _after_ org.el is loaded. So, changes to that variable have 0 effect and org-habit.el is not loaded. You should set `org-modules' _before_ loading Org. Or you can load org-habit in more traditional way, via (require 'org-habit) or (use-package org-habit). -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at