From e48a76355307d4f30df4d0e19bf9815ff8eca4a4 Mon Sep 17 00:00:00 2001
From: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
Date: Mon, 24 Feb 2014 12:27:28 -0500
Subject: [PATCH] When computing clock table, remove arbitrary limit on
 hierarchy depth.

* org-clock.el (org-clock-sum): Enlarge array of per-level clock
  totals as needed on demand.
---
 lisp/org-clock.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 8e1d632..4c8946a 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1782,6 +1782,8 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes."
 		       (save-excursion
 			 (save-match-data (funcall headline-filter))))))
 	     (setq level (- (match-end 1) (match-beginning 1)))
+	     (when (>= level lmax)
+	       (setq ltimes (vconcat ltimes (make-vector lmax 0)) lmax (* 2 lmax)))
 	     (when (or (> t1 0) (> (aref ltimes level) 0))
 	       (when (or headline-included headline-forced)
 		 (if headline-included
-- 
1.8.4

