emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug in dynamic block for clock table using :tags
@ 2010-08-04 16:15 Inquisitive Scientist
  2010-08-07  4:13 ` Noorul Islam
  0 siblings, 1 reply; 3+ messages in thread
From: Inquisitive Scientist @ 2010-08-04 16:15 UTC (permalink / raw)
  To: emacs-orgmode


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

Dear Experts,

There seems to be a bug in the tags feature for clock tables. When I try to
generate a dynamic block for a clock-table in the following example file it
goes into an infinite loop.

*** 2010-08-04 Wednesday

This illustrates a bug in org-clock.el. When you Do C-c C-x C-r using
org-mode version 7.01g on Windows of GNU Emacs 23.1.1
(i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON.

#+BEGIN: clocktable :maxlevel 8 :scope subtree :tags "{DAILY}"

#+END:

**** TODO PLAN <2010-08-04 Wed>
                         :PLAN:DAILY:
         SCHEDULED: <2010-08-04 Wed 09:20-09:40>
         CLOCK: [2010-08-04 Wed 09:20]--[2010-08-04 Wed 09:31] =>  0:11

**** foo
         SCHEDULED: <2010-08-04 Wed 08:30-09:20>
         CLOCK: [2010-08-04 Wed 08:30]--[2010-08-04 Wed 09:30] =>  1:00

[-- Attachment #1.2: Type: text/html, Size: 951 bytes --]

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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: bug in dynamic block for clock table using :tags
  2010-08-04 16:15 bug in dynamic block for clock table using :tags Inquisitive Scientist
@ 2010-08-07  4:13 ` Noorul Islam
  2010-08-08 12:06   ` David Maus
  0 siblings, 1 reply; 3+ messages in thread
From: Noorul Islam @ 2010-08-07  4:13 UTC (permalink / raw)
  To: Inquisitive Scientist; +Cc: emacs-orgmode


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

On Wed, Aug 4, 2010 at 9:45 PM, Inquisitive Scientist <
inquisitive.scientist@gmail.com> wrote:

> Dear Experts,
>
> There seems to be a bug in the tags feature for clock tables. When I try to
> generate a dynamic block for a clock-table in the following example file it
> goes into an infinite loop.
>
> *** 2010-08-04 Wednesday
>
> This illustrates a bug in org-clock.el. When you Do C-c C-x C-r using
> org-mode version 7.01g on Windows of GNU Emacs 23.1.1
> (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON.
>
> #+BEGIN: clocktable :maxlevel 8 :scope subtree :tags "{DAILY}"
>
> #+END:
>
> **** TODO PLAN <2010-08-04 Wed>
>                          :PLAN:DAILY:
>          SCHEDULED: <2010-08-04 Wed 09:20-09:40>
>          CLOCK: [2010-08-04 Wed 09:20]--[2010-08-04 Wed 09:31] =>  0:11
>
> **** foo
>          SCHEDULED: <2010-08-04 Wed 08:30-09:20>
>          CLOCK: [2010-08-04 Wed 08:30]--[2010-08-04 Wed 09:30] =>  1:00
>
>
>
>
This works fine on a debian lenny with


GNU Emacs 23.2.2 (i686-pc-linux-gnu)
 of 2010-06-08 on sajida

release_7.01g-53-g82218
Org-mode version 7.01trans (release_7.01g.53.g82218.dirty)



*** 2010-08-04 Wednesday

This illustrates a bug in org-clock.el. When you Do C-c C-x C-r using
org-mode version 7.01g on Windows of GNU Emacs 23.1.1
(i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON.

#+BEGIN: clocktable :maxlevel 8 :scope subtree :tags "{DAILY}"

#+END:

**** TODO PLAN <2010-08-04 Wed>
                        :PLAN:DAILY:
         SCHEDULED: <2010-08-04 Wed 09:20-09:40>
         CLOCK: [2010-08-04 Wed 09:20]--[2010-08-04 Wed 09:31] =>  0:11

**** foo
         SCHEDULED: <2010-08-04 Wed 08:30-09:20>
         CLOCK: [2010-08-04 Wed 08:30]--[2010-08-04 Wed 09:30] =>  1:00

#+BEGIN: clocktable :maxlevel 2 :scope file
Clock summary at [2010-08-07 Sat 09:40]

| L | Headline     | Time   |
|---+--------------+--------|
|   | *Total time* | *1:11* |
|---+--------------+--------|
#+END:


Thanks and Regards
Noorul

[-- Attachment #1.2: Type: text/html, Size: 2941 bytes --]

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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: bug in dynamic block for clock table using :tags
  2010-08-07  4:13 ` Noorul Islam
@ 2010-08-08 12:06   ` David Maus
  0 siblings, 0 replies; 3+ messages in thread
From: David Maus @ 2010-08-08 12:06 UTC (permalink / raw)
  To: Noorul Islam; +Cc: emacs-orgmode, Inquisitive Scientist


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

Noorul Islam wrote:
>This works fine on a debian lenny with

>GNU Emacs 23.2.2 (i686-pc-linux-gnu)
> of 2010-06-08 on sajida

>release_7.01g-53-g82218
>Org-mode version 7.01trans (release_7.01g.53.g82218.dirty)

But enters infitite loop with

Org-mode version 7.01trans (release_7.01h.88.gb8a0)

GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-08-06 on murphy, modified by Debian

When C-c C-x C-r is called on the clocktable.

Backtrace of C-g attached.

HTH,
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.1.2: backtrace-dynamic-clock.txt --]
[-- Type: text/plain, Size: 6828 bytes --]

Debugger entered--Lisp error: (quit)
  outline-on-heading-p(t)
  outline-back-to-heading(t)
  outline-up-heading(1 t)
  (while (> (funcall outline-level) 1) (outline-up-heading 1 t) (put-text-property (point) (point-at-eol) :org-clock-force-headline-inclusion t))
  (progn (while (> ... 1) (outline-up-heading 1 t) (put-text-property ... ... :org-clock-force-headline-inclusion t)))
  (unwind-protect (progn (while ... ... ...)) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set-match-data save-match-data-internal ...)))
  (save-match-data (while (> ... 1) (outline-up-heading 1 t) (put-text-property ... ... :org-clock-force-headline-inclusion t)))
  (save-excursion (save-match-data (while ... ... ...)))
  (if headline-filter (save-excursion (save-match-data ...)))
  (progn (if headline-included (loop for l from 0 to level do ...)) (setq time (aref ltimes level)) (goto-char (match-beginning 0)) (put-text-property (point) (point-at-eol) :org-clock-minutes time) (if headline-filter (save-excursion ...)))
  (if (or headline-included headline-forced) (progn (if headline-included ...) (setq time ...) (goto-char ...) (put-text-property ... ... :org-clock-minutes time) (if headline-filter ...)))
  (when (or headline-included headline-forced) (if headline-included (loop for l from 0 to level do ...)) (setq time (aref ltimes level)) (goto-char (match-beginning 0)) (put-text-property (point) (point-at-eol) :org-clock-minutes time) (if headline-filter (save-excursion ...)))
  (progn (when (or headline-included headline-forced) (if headline-included ...) (setq time ...) (goto-char ...) (put-text-property ... ... :org-clock-minutes time) (if headline-filter ...)) (setq t1 0) (loop for l from level to (1- lmax) do (aset ltimes l 0)))
  (if (or (> t1 0) (> ... 0)) (progn (when ... ... ... ... ... ...) (setq t1 0) (loop for l from level to ... do ...)))
  (when (or (> t1 0) (> ... 0)) (when (or headline-included headline-forced) (if headline-included ...) (setq time ...) (goto-char ...) (put-text-property ... ... :org-clock-minutes time) (if headline-filter ...)) (setq t1 0) (loop for l from level to (1- lmax) do (aset ltimes l 0)))
  (let* ((headline-forced ...) (headline-included ...)) (setq level (- ... ...)) (when (or ... ...) (when ... ... ... ... ... ...) (setq t1 0) (loop for l from level to ... do ...)))
  (cond ((match-end 2) (setq ts ... te ... ts ... te ... ts ... te ... dt ... t1 ...)) ((match-end 4) (setq t1 ...)) (t (when ... ...) (let* ... ... ...)))
  (while (re-search-backward re nil t) (cond (... ...) (... ...) (t ... ...)))
  (save-excursion (goto-char (point-max)) (while (re-search-backward re nil t) (cond ... ... ...)) (setq org-clock-file-total-minutes (aref ltimes 0)))
  (let* ((bmp ...) (re ...) (lmax 30) (ltimes ...) (t1 0) (level 0) ts te dt time) (if (stringp tstart) (setq tstart ...)) (if (stringp tend) (setq tend ...)) (if (consp tstart) (setq tstart ...)) (if (consp tend) (setq tend ...)) (remove-text-properties (point-min) (point-max) (quote ...)) (save-excursion (goto-char ...) (while ... ...) (setq org-clock-file-total-minutes ...)) (set-buffer-modified-p bmp))
  org-clock-sum(nil nil (lambda nil (let (...) (eval matcher))))
  (if scope-is-list nil (org-clock-sum ts te (unless ... ...)) (goto-char (point-min)) (setq st t) (while (or ... ...) (goto-char p) (when ... ...)))
  (unless scope-is-list (org-clock-sum ts te (unless ... ...)) (goto-char (point-min)) (setq st t) (while (or ... ...) (goto-char p) (when ... ...)))
  (save-restriction (cond (...) (... ...) (... ...) (... ... ...) (... ... ... ...) (scope-is-list ...)) (goto-char pos) (unless scope-is-list (org-clock-sum ts te ...) (goto-char ...) (setq st t) (while ... ... ...)) (setq tbl (nreverse tbl)) (if tostring (if tbl ... nil) (goto-char ins) (insert-before-markers ... ... "|L|" ... "Headline|Time|\n") (setq total-time ...) (insert-before-markers "|-\n|" ... ... "*Total time*| *" ... "*|\n|-\n") (setq tbl ...) (if ... ...) (insert-before-markers ...) (backward-delete-char 1) (if ... ... ...) (goto-char ipos) (skip-chars-forward "^|") (org-table-align) (when recalc ... ...) (when rm-file-column ... ...) total-time))
  (let* ((hlchars ...) (ins ...) (total-time nil) (scope ...) (tostring ...) (multifile ...) (header ...) (maxlevel ...) (step ...) (emph ...) (timestamp ...) (ts ...) (te ...) (block ...) (link ...) (tags ...) (matcher ...) ipos time p level hlc hdl tsp props content recalc formula pcol cc beg end pos tbl tbl1 range-text rm-file-column scope-is-list st) (setq org-clock-file-total-minutes nil) (when step (unless ... ...) (org-clocktable-steps params) (throw ... nil)) (when block (setq cc ... ts ... te ... range-text ...)) (when (integerp ts) (setq ts ...)) (when (integerp te) (setq te ...)) (when (and ts ...) (setq ts ...)) (when (and te ...) (setq te ...)) (if ts (setq ts ...)) (if te (setq te ...)) (move-marker ins (point)) (setq ipos (point)) (setq pos (point)) (cond (... ...) (... ...) (... ... ...) (... ...)) (setq scope-is-list (and scope ...)) (save-restriction (cond ... ... ... ... ... ...) (goto-char pos) (unless scope-is-list ... ... ... ...) (setq tbl ...) (if tostring ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... total-time)))
  (catch (quote exit) (let* (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ipos time p level hlc hdl tsp props content recalc formula pcol cc beg end pos tbl tbl1 range-text rm-file-column scope-is-list st) (setq org-clock-file-total-minutes nil) (when step ... ... ...) (when block ...) (when ... ...) (when ... ...) (when ... ...) (when ... ...) (if ts ...) (if te ...) (move-marker ins ...) (setq ipos ...) (setq pos ...) (cond ... ... ... ...) (setq scope-is-list ...) (save-restriction ... ... ... ... ...)))
  org-dblock-write:clocktable((:name "clocktable" :maxlevel 8 :scope subtree :tags "{DAILY}" :indentation-column 0 :content #("\n" 0 1 (fontified t))))
  funcall(org-dblock-write:clocktable (:name "clocktable" :maxlevel 8 :scope subtree :tags "{DAILY}" :indentation-column 0 :content #("\n" 0 1 (fontified t))))
  (let* ((pos ...) (line ...) (params ...) (name ...) (indent ...) (cmd ...)) (message "Updating dynamic block `%s' at line %d..." name line) (funcall cmd params) (message "Updating dynamic block `%s' at line %d...done" name line) (goto-char pos) (when (and indent ...) (setq indent ...) (save-excursion ... ... ... ...)))
  (save-window-excursion (let* (... ... ... ... ... ...) (message "Updating dynamic block `%s' at line %d..." name line) (funcall cmd params) (message "Updating dynamic block `%s' at line %d...done" name line) (goto-char pos) (when ... ... ...)))
  org-update-dblock()
  org-clock-report(nil)
  call-interactively(org-clock-report nil nil)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-08-08 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-04 16:15 bug in dynamic block for clock table using :tags Inquisitive Scientist
2010-08-07  4:13 ` Noorul Islam
2010-08-08 12:06   ` David Maus

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