Re: [O] Bug: [bisected] note from clocking out is above :LOGBOOK: drawer [8.3.3 (release_8.3.3-469-g2e7716 @ /home/grfz/src/org-mode/lisp/)]

2016-01-20 Thread Gregor Zattler
Hi Nicolas,
* Nicolas Goaziou  [20. Jan. 2016]:
> Gregor Zattler  writes:
>> It would be great when notes taken when clocking out would come
>> next to their respective clock lines.
> 
> This is already possible: just make sure notes and clocks are stored at
> the same location (e.g., set `org-log-into-drawer' to t in your ECM).

Actually this keeps all notes in the :LOGBOOK: drawer but notes
taken while clocking out appear above instead of below the clock
line.  I would have to shuffle all existing clock-out-notes above
their respective clock line in order to have consistent
documents.  This is doable.

This way notes taken while clocked in are mixed with the ones
taken when clocking out and are even nearer to the clock line.  But...

> However, by default, they aren't.
>
> I see no reason to force notes taken upon clocking out to be always
> located next to the clock line, as long as you can get that behaviour
> somehow. Thus, I think the documentation could be improved as it sort of
> implies clock notes are always next to the closed clock.
> 
> IIUC, you are suggesting to implement two types of notes, but that never
> was the case in Org, AFAICT. You could, however, use a hook (e.g.,
> `org-clock-out-hook') in order to put data relative to clocks in
> a specific drawer and keep general notes in LOGBOOK at the same time.

... I guess this hook will be run before actually clocking out?
Thus I would change the notes drawer to the clock line drawer,
clock out and set it back again?


Thanks for your help, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-




Re: [O] Bug: [bisected] note from clocking out is above :LOGBOOK: drawer [8.3.3 (release_8.3.3-469-g2e7716 @ /home/grfz/src/org-mode/lisp/)]

2016-01-20 Thread Gregor Zattler
Hi Nicolas,
* Nicolas Goaziou  [20. Jan. 2016]:
> Gregor Zattler  writes:
>> Notes produced when clocking out with org-log-note-clock-out set
>> will be placed above the clock line instead below the clock line.
>> In my heavily customized sessions the notes show up on the
>> previos line respective to the clock line.  Without
>> customizations (see below) they end up above the :LOGBOOK:
>> drawer.
>>
>> ECM:
>> emacs24 -Q -nw -L /home/grfz/src/org-mode/lisp/ --eval "(require 'org)"  
>> --eval '(setq org-log-note-clock-out t)' /tmp/test.org
>>
>> now add a heading, clock in, clock out, write something as a note,
>> do C-c C-c to finish note taking.  Result:
>>
>> * heading
>>   - note
>>   :LOGBOOK:
>>   CLOCK: [2016-01-19 Di 16:22]--[2016-01-19 Di 16:22] =>  0:00
>>   :END:
> 
> I can reproduce it. However, I don't think it is a bug. It looks like
> the expected default behaviour.
> 
> By default, clocks and notes are not stored at the same location. See
> `org-log-into-drawer' and `org-clock-into-drawer'. So, there's no reason
> to put them together here. 
> 
> Moreover, I cannot see anything in the code that would make "clock
> notes" special in any way. This is basically the same as calling
> `org-add-note' right after clocking out, and, as this function's
> docstring points out:
> 
>   This is done in the same way as adding a state change note.
> 
> OTOH, the manual says
> 
>   See the variable ‘org-log-note-clock-out’ for the possibility to
>   record an additional note together with the clock-out timestamp.
> 
> In particular, the term "together" is ambiguous, as it can indeed be
> understood as "at the same place". However, I doubt the intent is to
> create a new type of note that would purposely ignore global logging
> settings. So I lean towards a documentation bug here.
> 
> WDYT?

Thanks for your explanation.  To me this is not a documentation
bug.  What the documentation describes allows for a helpful
distinction of notes in different contexts which IMHO should not
be conflated: 

I understand that to you all notes are created equal: They
somehow belong to a node.

I think the note taken when clocking out belongs specifically to
its clock line and explains it.  Clocking is for reasons of
measurement of time often in context of accounting.  Such notes
answer to the question ""Why took it so long".  This is different
to notes which are there to remember specific aspects of a tasks.

This was default behaviour when users decided to be asked for a
note taken after clocking out.

 I for instance document my working hours this way and have
 2072 such notes sitting below their corresponding clock
 line.
 
 I have the task of maintaining some complex spreadsheets for
 the accounting department.  My employer want's to know how
 much time I spend on this task.  So I clock this working
 hours.  I want to be able to anser to the question why it
 took so long.
 
 OTHT there are notes regarding the work with these complex
 spreadsheets, e.g. "conditional colouring of cells may lead
 to performance problem when thousands of conditionally
 coloured cells are in use".  This is a note which belongs to
 the Spreadsheets and is not only true for the time interval
 indicated by a clock line.
 
It would be great when notes taken when clocking out would come
next to their respective clock lines.


Thanks for your attention, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-




Re: [O] Bug: [bisected] note from clocking out is above :LOGBOOK: drawer [8.3.3 (release_8.3.3-469-g2e7716 @ /home/grfz/src/org-mode/lisp/)]

2016-01-20 Thread Nicolas Goaziou
Gregor Zattler  writes:

> Thanks for your explanation.  To me this is not a documentation
> bug.  What the documentation describes allows for a helpful
> distinction of notes in different contexts which IMHO should not
> be conflated: 
>
> I understand that to you all notes are created equal: They
> somehow belong to a node.
>
> I think the note taken when clocking out belongs specifically to
> its clock line and explains it.  Clocking is for reasons of
> measurement of time often in context of accounting.  Such notes
> answer to the question ""Why took it so long".  This is different
> to notes which are there to remember specific aspects of a tasks.
>
> This was default behaviour when users decided to be asked for a
> note taken after clocking out.
>
>  I for instance document my working hours this way and have
>  2072 such notes sitting below their corresponding clock
>  line.
>  
>  I have the task of maintaining some complex spreadsheets for
>  the accounting department.  My employer want's to know how
>  much time I spend on this task.  So I clock this working
>  hours.  I want to be able to anser to the question why it
>  took so long.
>  
>  OTHT there are notes regarding the work with these complex
>  spreadsheets, e.g. "conditional colouring of cells may lead
>  to performance problem when thousands of conditionally
>  coloured cells are in use".  This is a note which belongs to
>  the Spreadsheets and is not only true for the time interval
>  indicated by a clock line.
>  
> It would be great when notes taken when clocking out would come
> next to their respective clock lines.

This is already possible: just make sure notes and clocks are stored at
the same location (e.g., set `org-log-into-drawer' to t in your ECM).
However, by default, they aren't.

I see no reason to force notes taken upon clocking out to be always
located next to the clock line, as long as you can get that behaviour
somehow. Thus, I think the documentation could be improved as it sort of
implies clock notes are always next to the closed clock.

IIUC, you are suggesting to implement two types of notes, but that never
was the case in Org, AFAICT. You could, however, use a hook (e.g.,
`org-clock-out-hook') in order to put data relative to clocks in
a specific drawer and keep general notes in LOGBOOK at the same time.


Regards,

-- 
Nicolas



Re: [O] Bug: [bisected] note from clocking out is above :LOGBOOK: drawer [8.3.3 (release_8.3.3-469-g2e7716 @ /home/grfz/src/org-mode/lisp/)]

2016-01-20 Thread Nicolas Goaziou
Hello,

Gregor Zattler  writes:

> Notes produced when clocking out with org-log-note-clock-out set
> will be placed above the clock line instead below the clock line.
> In my heavily customized sessions the notes show up on the
> previos line respective to the clock line.  Without
> customizations (see below) they end up above the :LOGBOOK:
> drawer.
>
> ECM:
> emacs24 -Q -nw -L /home/grfz/src/org-mode/lisp/ --eval "(require 'org)"  
> --eval '(setq org-log-note-clock-out t)' /tmp/test.org
>
> now add a heading, clock in, clock out, write something as a note,
> do C-c C-c to finish note taking.  Result:
>
> * heading
>   - note
>   :LOGBOOK:
>   CLOCK: [2016-01-19 Di 16:22]--[2016-01-19 Di 16:22] =>  0:00
>   :END:

I can reproduce it. However, I don't think it is a bug. It looks like
the expected default behaviour.

By default, clocks and notes are not stored at the same location. See
`org-log-into-drawer' and `org-clock-into-drawer'. So, there's no reason
to put them together here. 

Moreover, I cannot see anything in the code that would make "clock
notes" special in any way. This is basically the same as calling
`org-add-note' right after clocking out, and, as this function's
docstring points out:

  This is done in the same way as adding a state change note.

OTOH, the manual says

  See the variable ‘org-log-note-clock-out’ for the possibility to
  record an additional note together with the clock-out timestamp.

In particular, the term "together" is ambiguous, as it can indeed be
understood as "at the same place". However, I doubt the intent is to
create a new type of note that would purposely ignore global logging
settings. So I lean towards a documentation bug here.

WDYT?


Regards,

-- 
Nicolas Goaziou



[O] Bug: [bisected] note from clocking out is above :LOGBOOK: drawer [8.3.3 (release_8.3.3-469-g2e7716 @ /home/grfz/src/org-mode/lisp/)]

2016-01-19 Thread Gregor Zattler

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


Notes produced when clocking out with org-log-note-clock-out set
will be placed above the clock line instead below the clock line.
In my heavily customized sessions the notes show up on the
previos line respective to the clock line.  Without
customizations (see below) they end up above the :LOGBOOK:
drawer.

ECM:
emacs24 -Q -nw -L /home/grfz/src/org-mode/lisp/ --eval "(require 'org)"  --eval 
'(setq org-log-note-clock-out t)' /tmp/test.org

now add a heading, clock in, clock out, write something as a note,
do C-c C-c to finish note taking.  Result:

* heading
  - note
  :LOGBOOK:
  CLOCK: [2016-01-19 Di 16:22]--[2016-01-19 Di 16:22] =>  0:00
  :END:



This is with
Package: Org-mode version 8.3.3 (release_8.3.3-469-g2e7716 @ 
/home/grfz/src/org-mode/lisp/)

Emacs version doesn't matter (tested with
- GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 
2015-10-24 on trouble, modified by Debian
and
- Emacs  : GNU Emacs 25.0.50.15 (x86_64-pc-linux-gnu, GTK+ Version 3.18.6) of 
2016-01-19


I git bisected this:

8ddc7314b801b48dff5c246c0954c67021b145f9 is the first bad commit
commit 8ddc7314b801b48dff5c246c0954c67021b145f9
Author: Nicolas Goaziou 
Date:   Tue Jan 12 21:28:32 2016 +0100

Store notes outside drawers at a correct location

* lisp/org.el (org-log-beginning): Move to an appropriate location even
when `org-log-state-notes-insert-after-drawers' is nil and notes are
not stored within a drawer.

Reported-by: swfl...@flintfam.org (Samuel W. Flint)


:04 04 82c4d500315fa5ea5e4e1968e633bfac078f2e6a 
a4fee4c6e2e140cbba8b3fb16513b269b1f9cfe0 M  lisp


Thanks for your attention, Gregor