emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* BUG: Clocking deeply nested tasks
@ 2008-02-28  0:09 Bernt Hansen
  2008-02-28  0:29 ` [PATCH] Allow more asterisks in tasks when summarizing clock time Bernt Hansen
  0 siblings, 1 reply; 4+ messages in thread
From: Bernt Hansen @ 2008-02-28  0:09 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org Mode Mailing List

Hi Carsten,

I ran into another bug a few minutes ago.

,----[ test.org ]
| #+STARTUP: odd
| * Task1
| *** Task2
| ***** Task3
| ******* Task4
| ********* Task5
| *********** Task6
| 	    :CLOCK:
| 	    CLOCK: [2008-02-27 Wed 14:30]--[2008-02-27 Wed 14:44] =>  0:14
| 	    :END:
`----

,----[ minimal.emacs ]
| (setq org-use-fast-todo-selection t)
| (setq inhibit-splash-screen t)
| (global-font-lock-mode t)
| (add-to-list 'load-path (expand-file-name "~/git/org-mode"))
| (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
| (require 'org-install)
| (define-key global-map "\C-ca" 'org-agenda)
| (custom-set-variables
|  '(org-agenda-files (quote ("~/org/test.org"))))
`----

Key strokes:

| Key                    | Notes                   |
|------------------------+-------------------------|
| C-x C-f ~/org/test.org | Open org file           |
| C-c C-a                | Expand everything       |
| C-c C-x C-d            | Clock summaries by task |

This gives the error

org-put-clock-overlay: Wrong type argument: wholenump, -1

If I use odd even levels I can get many more nested levels before
triggering this problem so it seems to be related to the number of stars
in the tasks.  With #+STARTUP: oddeven it works for

********* TaskN (9 stars)

but

********** Task N (10 stars)

fails.


Regards,
Bernt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Allow more asterisks in tasks when summarizing clock time
  2008-02-28  0:09 BUG: Clocking deeply nested tasks Bernt Hansen
@ 2008-02-28  0:29 ` Bernt Hansen
  2008-02-28  1:08   ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Bernt Hansen @ 2008-02-28  0:29 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org Mode Mailing List


10 asterisks is only 6 levels deep when odd levels only are used.
This increases the number of asterisks to 40 (still an arbitrary number)
but it's much larger than the current limit of 10.

This fixes C-c C-x C-d when trying to summarize clock time on a
deeply nested task

,----[ test.org ]
| * Task1
| *** Task2
| ***** Task3
| ******* Task4
| ********* Task5
| *********** Task6
| 	    :CLOCK:
| 	    CLOCK: [2008-02-27 Wed 14:30]--[2008-02-27 Wed 14:44] =>  0:14
| 	    :END:
`----
---

This patch works for me.  You can apply this patch directly in git by
saving this message in mbox format (e.g. file.mbox) and then doing 

$ git am file.mbox

This will create the commit on the current HEAD with all of the provided
commit message text.

The text between the three dashes (---) above and the start of the
diffstat below (org.el |    2 +-) is discarded which is why I'm writing
my extra notes here :)

HTH,
-Bernt


 org.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/org.el b/org.el
index 0c2762d..504dcd5 100644
--- a/org.el
+++ b/org.el
@@ -18919,7 +18919,7 @@ will be easy to remove."
 		     (make-string (+ off (max 0 (- c (current-column)))) ?.)
 		     (org-add-props (format "%s %2d:%02d%s"
 					    (make-string l ?*) h m
-					    (make-string (- 10 l) ?\ ))
+					    (make-string (- 40 l) ?\ ))
 			 '(face secondary-selection))
 		     ""))
     (if (not (featurep 'xemacs))
-- 
1.5.4.3.192.g923d4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Allow more asterisks in tasks when summarizing clock time
  2008-02-28  0:29 ` [PATCH] Allow more asterisks in tasks when summarizing clock time Bernt Hansen
@ 2008-02-28  1:08   ` Bastien
  2008-02-28  1:09     ` Bernt Hansen
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2008-02-28  1:08 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Carsten Dominik, Org Mode Mailing List

Hi Bernt,

Bernt Hansen <bernt@norang.ca> writes:

> 10 asterisks is only 6 levels deep when odd levels only are used.
> This increases the number of asterisks to 40 (still an arbitrary number)
> but it's much larger than the current limit of 10.

Thanks for the patch.  

I applied it, but used an arbitrary limit of 16 instead of 40, since 16
asterisks characters are required for 8 (odd) levels, and 8 seems to be
quite a natural limit for Org levels.

-- 
Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Allow more asterisks in tasks when summarizing clock time
  2008-02-28  1:08   ` Bastien
@ 2008-02-28  1:09     ` Bernt Hansen
  0 siblings, 0 replies; 4+ messages in thread
From: Bernt Hansen @ 2008-02-28  1:09 UTC (permalink / raw)
  To: Bastien; +Cc: Carsten Dominik, Org Mode Mailing List

Thanks :)

Bastien <bzg@altern.org> writes:

> Hi Bernt,
>
> Bernt Hansen <bernt@norang.ca> writes:
>
>> 10 asterisks is only 6 levels deep when odd levels only are used.
>> This increases the number of asterisks to 40 (still an arbitrary number)
>> but it's much larger than the current limit of 10.
>
> Thanks for the patch.  
>
> I applied it, but used an arbitrary limit of 16 instead of 40, since 16
> asterisks characters are required for 8 (odd) levels, and 8 seems to be
> quite a natural limit for Org levels.
>
> -- 
> Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-28  1:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28  0:09 BUG: Clocking deeply nested tasks Bernt Hansen
2008-02-28  0:29 ` [PATCH] Allow more asterisks in tasks when summarizing clock time Bernt Hansen
2008-02-28  1:08   ` Bastien
2008-02-28  1:09     ` Bernt Hansen

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).