emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Karl Voit <devnull@Karl-Voit.at>,
	Karl Voit <news1142@Karl-Voit.at>,
	emacs-orgmode@gnu.org
Subject: Re: Bug: org-clone-subtree-with-time-shift not asking for time-shift
Date: Mon, 16 Jan 2017 17:23:06 -0500	[thread overview]
Message-ID: <87k29uy791.fsf@kyleam.com> (raw)
In-Reply-To: 87h94y4rpx.fsf@nicolasgoaziou.fr

Nicolas Goaziou <mail@nicolasgoaziou.fr> 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 #<buffer  *temp*>)
      (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

  parent reply	other threads:[~2017-01-16 22:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 11:48 Bug: org-clone-subtree-with-time-shift not asking for time-shift Karl Voit
2017-01-16 14:50 ` Karl Voit
2017-01-16 17:56 ` Kyle Meyer
2017-01-16 21:31   ` Nicolas Goaziou
2017-01-16 22:07     ` Bug: org-clone-subtree-with-time-shift not asking for time-shift (FIXED) Karl Voit
2017-01-16 22:23     ` Kyle Meyer [this message]
2017-01-16 22:30       ` Bug: org-clone-subtree-with-time-shift not asking for time-shift Karl Voit
2017-01-17  8:54         ` Nicolas Goaziou
2017-01-18  2:42           ` Kyle Meyer
2017-01-18 11:11             ` Nicolas Goaziou

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=87k29uy791.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=devnull@Karl-Voit.at \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=news1142@Karl-Voit.at \
    /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).