From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reimar Finken Subject: Bug: switch state of invisible todo item Date: Wed, 04 Jun 2008 15:01:39 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3scb-0003hU-NV for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 09:01:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3sca-0003gT-SB for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 09:01:45 -0400 Received: from [199.232.76.173] (port=59496 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3sca-0003gB-KV for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 09:01:44 -0400 Received: from endor.theo2.physik.uni-stuttgart.de ([129.69.228.125]:10529) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K3scZ-0007Cw-VM for emacs-orgmode@gnu.org; Wed, 04 Jun 2008 09:01:44 -0400 Received: from rhea.theo2.physik.uni-stuttgart.de (rhea.theo2.physik.uni-stuttgart.de [129.69.125.131]) by endor.theo2.physik.uni-stuttgart.de (Postfix) with ESMTP id B380B12509 for ; Wed, 4 Jun 2008 15:01:39 +0200 (CEST) Received: from larissa.theo2.physik.uni-stuttgart.de.theo2.physik.uni-stuttgart.de (larissa.theo2.physik.uni-stuttgart.de [129.69.125.198]) by rhea.theo2.physik.uni-stuttgart.de (Postfix) with ESMTP id 7F86D64AC for ; Wed, 4 Jun 2008 15:01:39 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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.=20 Thanks very much for your help in advance, Reimar =20 * 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:=20 (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 |=20=20 `---- 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):=20 ,----[ testtasks.org ] | -*- mode: org; -*- | #+SEQ_TODO: TODO STARTED | DONE | * STARTED Tasks: | ** TODO Task1 | CLOCK: [2008-06-04 Wed 14:00] |=20 `---- 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.=20 * Related obervation: After reverting the todo state back to `TODO' and folding it, the same bug occurs when one clocks into Task1 via=20 `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. =20 * Configuration: org-version: "6.04c" (latest git version), but also occuring in earlier versions emacs-version: "22.1.1"=20 --=20 Dr. Reimar Finken (finken@theo2.physik.uni-stuttgart.de) II. Institut f=C3=BCr Theoretische Physik, Universit=C3=A4t Stuttgart=20=20 Pfaffenwaldring 57 Tel: 0711-68564924 70550 Stuttgart, Germany Fax: 0711-68564902