org-mode habit consistency graph not displaying
<p>org-version 8.3.4 (elpa package, 20160530)
emacs 24.4.1 (Debian package, Installed: 24.4+1-4.1~bpo70+1)</p>

<p>When I started using org-mode from elpa, the habit consistency graph stopped showing.  I was using a version of org-mode that comes with debian before, with emacs 23 and the graph showed.</p>

<p>I'm a beginner in emacs lisp, but anyway I tried stepping through the org-agenda-list function and found the org-agenda-finalize function where the org habit graph is supposed to be inserted via the org-habit-insert-consistency-graphs function.  But it skips over that function, probably because this expression returns false:</p>

<pre><code>(next-single-property-change (point-min) 'org-habit-p))
</code></pre>

<p>At this point, I don't know what to do to make habits show.  This is the first time I've looked at org-mode code, I don't know what the above test is for.</p>

<p>Help, please?</p>

<p><strong>UPDATE:  2016-06-25</strong>.  I upgraded the org-mode package to elpa, 20160620 (still org-version 8.3.4).  Still have the same behaviour.  I am getting the package from elpa.gnu.org.</p>

<p><strong>UPDATE 2:  2016-07-02</strong>:  I did try pressing K (for org-habit-toggle-habits).  It didn't change the contents of the buffer visibly.  I also tried refreshing the buffer after typing K.  And repeating the experiment, in case the K put emacs in the wrong mode the first time.</p>

<p><strong>UPDATE 3:  2016-07-08</strong>:  on the emacs-orgmode mailing list, I got advice to ensure that the structure of the entries with habits is:</p>

<ul>
<li>headline</li>
<li>SCHEDULED</li>
<li>PROPERTIES</li>
<li>everything else</li>
</ul>

<p>by using this function org-repair-property-drawers from this site:
<a href="http://orgmode.org/Changes.html" rel="noreferrer">http://orgmode.org/Changes.html</a></p>

<p>but that broke my weekly agenda display and also, once I fixed the entries, didn't make the habits work.  Probably my entries were in worse shape than the function anticipated.  But this method worked for Josiah who sent the advice.  Including it here in case it helps someone else.</p>

<p><strong>UPDATE 4:  2016-07-09</strong>: thanks Phil for the suggestion to make a minimal example of the problem.  With the following .org file and no other, I see the problem:</p>

<pre><code>** TODO daily customer meeting                             :SUPPORT:CUSTOMER:
   :SCHEDULED: &lt;2016-07-06 Wed 10:30 .+1d&gt;
   :PROPERTIES:
   :LAST_REPEAT: [2016-07-05 Tue 12:00]
   :STYLE: habit
   :END:
   :LOGBOOK:
   - State "DONE"       from "TODO"       [2016-07-05 Tue 12:00]
   - State "DONE"       from "TODO"       [2016-06-30 Thu 16:34]
   - State "DONE"       from "TODO"       [2016-06-29 Wed 20:02]
   - State "DONE"       from "TODO"       [2016-06-28 Tue 10:53]
   - State "DONE"       from "TODO"       [2016-06-27 Mon 10:50]
   - State "DONE"       from "TODO"       [2016-06-23 Thu 12:11]
   - State "CANCELLED"  from "TODO"       [2016-06-21 Tue 13:43] \\
     No meeting today, cancelled by Mmmm.
   :END:
</code></pre>

<p>I'm using the minimal.emacs suggested in the link, namely:</p>

<pre><code>(add-to-list 'load-path (expand-file-name "/home/bjb/.emacs.d/elpa/org-20160620"))
(add-to-list 'auto-mode-alist '("\\.\\(org\\  |org_archive\\|txt\\)$" . org-mode))
(setq org-agenda-files '("/home/bjb/.emacs.d/test/test.org"))
(require 'org-install)
(require 'org-habit)

;(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
;(global-set-key "\C-cb" 'org-iswitchb)
</code></pre>

<p>And showing the agenda with C-c a a.</p>

<p><strong>I had added the leading colon to the SCHEDULED line... when I remove it, the graph shows up.</strong>  However, I had added it (a while ago) because I was trying to solve other problems, which I don't remember what they were.</p>

<p>I will play with this, and see if I can get all my org files to load fully with habit-consistency-graphs.  Thanks ... will report back with results.</p>

<p>Must note that when I looked at this particular item (which is a short version of an actual habit in my org-files) there were two PROPERTY drawers, one before LOGBOOK with just the LAST-REPEAT property, and one after LOGBOOK with the habit property.  I merged the two property drawers to show you the failure, as I believe the PROPERTY drawer is supposed to be in one piece before the LOGBOOK drawer.  So I have some maintenance to do on my org-files.  I had tried to merge them into one piece in each habit before, but then agenda weekly view broke badly and I put it back the way it was.  Will have to try harder.</p>

<p><strong>UPDATE 5  2016-07-09</strong>: I had put in the leading colon before SCHEDULED: because I wanted to see when the 3-monthly items fell in the future ... I wanted to see them as scheduled items.  That worked but when I upgraded org-mode the consistency graph went away.  When I took off the leading colon on all the habits, the daily habits showed up, and I have confidence that the three-monthly items will show up when they fall on "today".  But I won't get any notice of having to pay the interest ... it will just appear on the day it must be paid.  Well that is for me to figure out.</p>

<p>Thanks everyone for considering and answering my question.</p>