Hello, Leo Vivier <leo.viv...@gmail.com> writes:
> The bug only happens in narrowed org-mode buffers when the tree at > point (or targeted by the resolving) is a single line not followed by a > blank line. [...] > MWE: > > --------------------------------[START]-------------------------------- > * Tree 1 > * Tree 2 > ---------------------------------[END]--------------------------------- > > - Narrow to ‘Tree 1’l > - Clock in. > > Observations: > - No clock drawer visible in the narrowed buffer. > - Feedback in the minibuffer that the clock was started. > - Widening the buffer confirms the presence of the buffer where it > should be. This looks correct, indeed. > Whilst the observations would lead one to think that everything ‘Just > Works™’, it causes a slew of problems. Two examples: > - After clocking in, adding a new heading ‘Subtree’ bellow ‘Tree 1’ > would make the drawer belong to ‘Subtree’ instead of ‘Tree 1’ This is to be expected. The same would happen in a widened buffer, if you insert a new headline (M-RET) at the end of the one being clocked. The difference here is that you cannot see the running clock, but this is to be expected when you narrow the document to a single line which is not meaningful syntactically. Try narrowing the buffer to a single character: all weird things may happen. I suggest to narrow only to meaningful parts of a document, e.g., a paragraph, a subtree… > - `org-clock-out-when-done` isn’t respected since the drawer is not > visible This is a bug. I fixed it. Regards, -- Nicolas Goaziou