Re: [O] Bug: Capture prepend checkbox doesn't handle scheduled [9.2.3 (9.2.3-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20190402/)]

2019-04-09 Thread Nicolas Goaziou
Hello,

Allen Li  writes:

> Make file /tmp/tmp.org containing:
>
> * TODO Foo
> SCHEDULED: <2019-04-08 Mon>
>
> 1. emacs -Q
> 2. Eval
>
> (add-to-list 'load-path (expand-file-name
> "~/.emacs.d/elpa/org-plus-contrib-20190402/"))
> (setq org-capture-templates '(("c" "Capture" checkitem (file+headline
> "/tmp/tmp.org" "Foo") "" :prepend t)))
>
> 3. M-x org-capture RET c
> 4. foo C-c C-c
>
> Contents of tmp.org:
>
> * TODO Foo
> - [ ] foo
> SCHEDULED: <2019-04-08 Mon>
>
> Expected:
>
> * TODO Foo
> SCHEDULED: <2019-04-08 Mon>
> - [ ] foo

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] Bug: Capture prepend checkbox doesn't handle scheduled [9.2.3 (9.2.3-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20190402/)]

2019-04-08 Thread Allen Li
Make file /tmp/tmp.org containing:

* TODO Foo
SCHEDULED: <2019-04-08 Mon>

1. emacs -Q
2. Eval

(add-to-list 'load-path (expand-file-name
"~/.emacs.d/elpa/org-plus-contrib-20190402/"))
(setq org-capture-templates '(("c" "Capture" checkitem (file+headline
"/tmp/tmp.org" "Foo") "" :prepend t)))

3. M-x org-capture RET c
4. foo C-c C-c

Contents of tmp.org:

* TODO Foo
- [ ] foo
SCHEDULED: <2019-04-08 Mon>

Expected:

* TODO Foo
SCHEDULED: <2019-04-08 Mon>
- [ ] foo

prepend checkitem should also skip any property drawer in addition to
the planning line.

This bug does not happen if the headline already contains a checkbox
list item.

I cannot reproduce this with the Org mode that ships with Emacs, so
it's probably a regression?

Emacs  : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.22.24), modified by Debian
Package: Org mode version 9.2.3 (9.2.3-elpaplus @
~/.emacs.d/elpa/org-plus-contrib-20190402/)