From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-clock-find-position confusion (bug?) Date: Sun, 28 Sep 2008 07:16:39 +0200 Message-ID: References: <20080928034922.GA22412@elb.elitists.net> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: multipart/mixed; boundary="===============1166355865==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KjoeN-0001M2-T6 for emacs-orgmode@gnu.org; Sun, 28 Sep 2008 01:16:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KjoeL-0001KQ-1A for emacs-orgmode@gnu.org; Sun, 28 Sep 2008 01:16:54 -0400 Received: from [199.232.76.173] (port=33478 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjoeK-0001KN-NW for emacs-orgmode@gnu.org; Sun, 28 Sep 2008 01:16:52 -0400 Received: from postduif.ic.uva.nl ([145.18.40.180]:56331) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KjoeK-0000FV-Hg for emacs-orgmode@gnu.org; Sun, 28 Sep 2008 01:16:52 -0400 In-Reply-To: <20080928034922.GA22412@elb.elitists.net> 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: Ethan Blanton Cc: emacs-orgmode@gnu.org --===============1166355865== Content-Type: multipart/alternative; boundary=Apple-Mail-1--541336522 --Apple-Mail-1--541336522 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi Ethan, On Sep 28, 2008, at 5:49 AM, Ethan Blanton wrote: > Thanks for taking care of my last issue so quickly; as a reward, I've > found another one! ;-) (Seriously, thanks for the blazing turn > around last time -- and thanks for org-mode, I'm finding a lot of > things to love!) > > org-clock-find-position (6.07b again) displays unexpected behavior > when it encounters a clock line preceding a bulleted list. > Specifically, when a :CLOCK: drawer is created, the drawer encompasses > the first list item. E.g.: > > * Heading > CLOCK: [2008-09-27 Sat 14:00]--[2008-09-27 Sat 14:30] => 0:30 > - Bullet 1 > - Bullet 2 > > Clocking in on this item again will yield (if drawer creation is > enabled): > > * Heading > :CLOCK: > CLOCK: [2008-09-27 Sat 15:00] > CLOCK: [2008-09-27 Sat 14:00]--[2008-09-27 Sat 14:30] => 0:30 > - Bullet 1 > :END: > - Bullet 2 > The reason for this behavior is that Org sometimes records a note when the clock is stopped in an item. That note is formatted like an item and attached directly to the CLOCK line. When a drawer is created, this note should go into the drawer. A work-around would be to leave an empty line before your list, like so: * Heading - bullet 1 - bullet 2 If you then clock this entry, Org will know that "bullet 1" is not a clocking note. HTH - Carsten > Looking at org-clock-find-position, this seems to be intentional; > removing the (if (org-at-item-p) (org-end-of-item)) statement "fixes" > this behavior for me, but may be breaking something else which I am > not seeing. > > Ethan > > -- > The laws that forbid the carrying of arms are laws [that have no > remedy > for evils]. They disarm only those who are neither inclined nor > determined to commit crimes. > -- Cesare Beccaria, "On Crimes and Punishments", 1764 > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-1--541336522 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Ethan,

On = Sep 28, 2008, at 5:49 AM, Ethan Blanton wrote:

Thanks = for taking care of my last issue so quickly; as a reward, I've
found = another one!  ;-)  (Seriously, thanks for the blazing = turn
around last time -- and thanks for org-mode, I'm finding a lot = of
things to love!)

org-clock-find-position (6.07b again) = displays unexpected behavior
when it encounters a clock line = preceding a bulleted list.
Specifically, when a :CLOCK: drawer is = created, the drawer encompasses
the first list item. =  E.g.:

* Heading
 CLOCK: [2008-09-27 Sat = 14:00]--[2008-09-27 Sat 14:30] =3D>  0:30
 - Bullet 1
=  - Bullet 2

Clocking in on this item again will yield (if = drawer creation is
enabled):

* Heading
 :CLOCK:
=  CLOCK: [2008-09-27 Sat 15:00]
 CLOCK: [2008-09-27 Sat = 14:00]--[2008-09-27 Sat 14:30] =3D>  0:30
 - Bullet 1
=    :END:
 - Bullet = 2


The reason for this = behavior is that Org sometimes records a note when the clock is stopped = in an item.  That note is formatted like an item and attached = directly to the CLOCK line.  When a drawer is created, this note = should go into the drawer.

A work-around = would be to leave an empty line before your list, like = so:

* = Heading

  - bullet = 1
  - bullet 2

If you then = clock this entry, Org will know that "bullet 1" is not a clocking = note.

HTH

- = Carsten

Looking at = org-clock-find-position, this seems to be intentional;
removing the = (if (org-at-item-p) (org-end-of-item)) statement "fixes"
this = behavior for me, but may be breaking something else which I am
not = seeing.

Ethan

--
The laws that forbid the carrying of = arms are laws [that have no remedy
for evils].  They disarm only = those who are neither inclined nor
determined to commit = crimes.
= = -- Cesare Beccaria, "On Crimes and Punishments", = 1764
_______________________________________________
Emacs-orgmode = mailing list
Remember: use `Reply All' to send replies to the = list.
Emacs-orgmode@gnu.org
http://= lists.gnu.org/mailman/listinfo/emacs-orgmode
<= br>
= --Apple-Mail-1--541336522-- --===============1166355865== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1166355865==--