From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: Bug: org-clone-subtree-with-time-shift not asking for time-shift Date: Mon, 16 Jan 2017 17:23:06 -0500 Message-ID: <87k29uy791.fsf@kyleam.com> References: <2017-01-16T12-42-31@devnull.Karl-Voit.at> <87h94yga8e.fsf@kyleam.com> <87h94y4rpx.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTFgI-00010t-Vp for emacs-orgmode@gnu.org; Mon, 16 Jan 2017 17:23:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTFgF-0007VB-S7 for emacs-orgmode@gnu.org; Mon, 16 Jan 2017 17:23:14 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]:64136 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cTFgF-0007V3-M8 for emacs-orgmode@gnu.org; Mon, 16 Jan 2017 17:23:11 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: Karl Voit , Karl Voit , emacs-orgmode@gnu.org Nicolas Goaziou writes: > Thank you. I applied your patch with an additional check. Thanks. The additional check looks good, as it replaces an error with a more appropriate user-error and gives an error message that is a bit more specific. However, the re-positioning of the org-back-to-heading call seems problematic because the call is now wrapped in a save-excursion, but the downstream code expects point to be at the beginning of the heading. When I call org-clone-subtree-with-time-shift with point at the end of *** heading <2017-02-28 Wed> I get the following error: Debugger entered--Lisp error: (error "Before first headline at position 1 in buffer *temp*") signal(error ("Before first headline at position 1 in buffer *temp*")) error("Before first headline at position %d in buffer %s" 1 #) (condition-case nil (outline-back-to-heading invisible-ok) (error (error "Before first headline at position %d in buffer %s" (point) (current-buffer)))) org-back-to-heading(t) org-end-of-subtree(t t) (save-excursion (org-end-of-subtree t t)) (outline-flag-region (point) (save-excursion (org-end-of-subtree t t)) nil) org-show-subtree() [...] org-clone-subtree-with-time-shift(2) funcall-interactively(org-clone-subtree-with-time-shift 2) call-interactively(org-clone-subtree-with-time-shift nil nil) command-execute(org-clone-subtree-with-time-shift) I think this is because beg isn't set to the beginning of the heading. But given Karl's recent email saying that the changes in maint fixed his test cases, maybe I'm missing something ... -- Kyle