org-clone-subtree-with-time-shift: Fix timestamp search
commit8fc9ab83b4651c7910235473a1c4c4a428e71b2a
authorKyle Meyer <kyle@kyleam.com>
Mon, 16 Jan 2017 17:56:01 +0000 (16 12:56 -0500)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 16 Jan 2017 21:24:25 +0000 (16 22:24 +0100)
tree0b3566978dbcf6c852ce02e680aa9caeedef59a1
parentf277d95c3b6bdfb72d3a75793fe7058dfe6f263a
org-clone-subtree-with-time-shift: Fix timestamp search

* lisp/org.el (org-clone-subtree-with-time-shift): Move to the
  beginning of the heading before the timestamp search so that the
  user will be prompted for a time shift even if point is after the
  timestamp.

This also prevents an "Invalid search bound" error if point is on the
blank line following a body-less heading:

   * single line <2017-02-28 Wed>
    <point here>

Reported-by: Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/111456>
lisp/org.el