emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Robert Horn <rjhorn@alum.mit.edu>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: org-habit config tinypatch
Date: Mon, 17 Sep 2012 06:42:26 -0400	[thread overview]
Message-ID: <m34nmx2anh.fsf@quad.robs.office> (raw)

This patch fixes my problem, but indicates that there is a startup
sequencing issue that may also affect other parts of org.  

First the patch

--- org-agenda.el~	2012-09-12 21:24:27.000000000 -0400
+++ org-agenda.el	2012-09-17 06:02:45.000000000 -0400
@@ -90,7 +90,7 @@
 (defvar org-mobile-force-id-on-agenda-items)  ; defined in org-mobile.el
 (defvar org-habit-show-habits)                ; defined in org-habit.el
 (defvar org-habit-show-habits-only-for-today)
-(defvar org-habit-show-all-today nil)
+(defvar org-habit-show-all-today)             ; defined in org-habit.el
 
 ;; Defined somewhere in this file, but used before definition.
 (defvar org-agenda-buffer-name "*Org Agenda*")

Second, the symptom

Without this patch the emacs config shows the "show-all-today" as having
been changed outside the config process, and it is set to "nil" rather
than the setting in the .emacs file.  It shows this immediately upon
startup when the config option is started and nothing else has been done.

If I understand defvar properly, this means that the org-agenda is being
evaluated before the .emacs, which is not what I expected at all.  So
either I don't understand defvar properly or the order of evaluation at
startup is not what I thought.  Either way, there are possibly other
defvars that need fixing.

Now that org-habit is part of the base org-mode, perhaps the proper fix
is to remove those three defvars.  Someone who understands the startup
sequence should make that decision.

R Horn 
rjhorn@alum.mit.edu

             reply	other threads:[~2012-09-17 10:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17 10:42 Robert Horn [this message]
2012-09-17 17:02 ` org-habit config tinypatch Bastien
2012-09-18 16:47   ` Robert Horn
2012-09-19  8:16     ` Bastien

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=m34nmx2anh.fsf@quad.robs.office \
    --to=rjhorn@alum.mit.edu \
    --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).