emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Bug: switch state of invisible todo item


From: Reimar Finken
Subject: [Orgmode] Bug: switch state of invisible todo item
Date: Wed, 04 Jun 2008 15:01:39 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Dear Carsten and all the other developers,

Let me first thank you for this wonderful package. However, I
have found a small but irritating bug when using
`org-clock-in-switch-to-state'. Nothing terribly important if you
have other priorities, but it still gets me every so often. 

Thanks very much for your help in advance,

Reimar
 
* Summary:
When the variable `org-clock-in-switch-to-state' is set and the
todo item to be clocked in is invisible in the org buffer,
`org-agenda-clock-in' switches the todo state of the wrong
headline. Instead of the actual item, the state of its visible
parent is changed.

* To reproduce this bug:

1) Starting with a clean emacs with only org-mode loaded,
   evaluate: 
   (setq org-clock-in-switch-to-state "STARTED")

2) Then open the file testtasks.org, which reads (the 2nd level
   heading will be folded by default):
,----[ testtasks.org ]
| -*- mode: org; -*-
| #+SEQ_TODO: TODO STARTED | DONE
| * Tasks:
| ** TODO Task1
|  
`----

3) Add this file to the agenda list with C-c [ and call the todo
   agenda with `M-x org-agenda' `t'. Then, press `I'
   (org-agenda-clock-in) on the line " testtasks: TODO Task1".

4) Now `testtasks.org' looks like this (of course, the Task1 line
   is still folded, but not the clock line): 
,----[ testtasks.org ]
| -*- mode: org; -*-
| #+SEQ_TODO: TODO STARTED | DONE
| * STARTED Tasks:
| ** TODO Task1
|    CLOCK: [2008-06-04 Wed 14:00]
| 
`----

Note that the parent headline `Tasks' had the todo keyword
changed, not the `Task1' headline. When the `Task1' headline is
visible, its todo state gets changed correctly. 

* Related obervation:
After reverting the todo state back to `TODO' and folding it, the
same bug occurs when one clocks into Task1 via 
`C-u M-x org-clock-in'. The bug must therefore be in
`org-clock-in', where something like a `show-all' is missing in
the (save-excursion (save-restriction ...)) part (target-pos is
set to the correct value 61). But since I don't know org-mode
well enough, I will leave that to the experts.
 
* Configuration:
org-version: "6.04c" (latest git version), but also occuring in
             earlier versions
emacs-version: "22.1.1" 

-- 
Dr. Reimar Finken    (address@hidden)
II. Institut für Theoretische Physik, Universität Stuttgart  
Pfaffenwaldring 57                       Tel: 0711-68564924
70550 Stuttgart, Germany                 Fax: 0711-68564902




reply via email to

[Prev in Thread] Current Thread [Next in Thread]