emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] When computing clock table, remove arbitrary limit on hierarchy depth.
Date: Mon, 24 Feb 2014 12:40:47 -0500	[thread overview]
Message-ID: <CACfYvRbXUhZUKGMi5dq0kbsM3N=tpWt9x6wuRPvkrRvHW6N_Fw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0001-When-computing-clock-table-remove-arbitrary-limit-on.patch --]
[-- Type: application/octet-stream, Size: 1020 bytes --]

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


             reply	other threads:[~2014-02-24 17:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 17:40 Ilya Shlyakhter [this message]
2014-03-03 12:26 ` [PATCH] When computing clock table, remove arbitrary limit on hierarchy depth 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='CACfYvRbXUhZUKGMi5dq0kbsM3N=tpWt9x6wuRPvkrRvHW6N_Fw@mail.gmail.com' \
    --to=ilya_shl@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).