emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Leo Vivier <leo.vivier@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Bug: org-clock commands spawn drawer outside of narrowing [9.2.1 (9.2.1-2-gc6d37c-elpaplus @ /home/zaeph/.emacs.d/elpa/org-plus-contrib-20190204/)]
Date: Thu, 14 Feb 2019 15:53:22 +0100	[thread overview]
Message-ID: <8736oqs9p9.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87lg2m6u85.fsf@hidden> (Leo Vivier's message of "Mon, 11 Feb 2019 19:44:10 +0100")

Hello,

Leo Vivier <leo.vivier@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

  reply	other threads:[~2019-02-14 14:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 18:44 Bug: Bug: org-clock commands spawn drawer outside of narrowing [9.2.1 (9.2.1-2-gc6d37c-elpaplus @ /home/zaeph/.emacs.d/elpa/org-plus-contrib-20190204/)] Leo Vivier
2019-02-14 14:53 ` Nicolas Goaziou [this message]
     [not found] <87pnruq81e.fsf@nicolasgoaziou.fr>
2019-02-15  8:48 ` Leo Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736oqs9p9.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=leo.vivier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).