On Feb 12, 2013 1:31 AM, "Bastien" <bzg@altern.org> wrote:
>
> Hi James,
>
> James Harkins <jamshark70@gmail.com> writes:
>
> > I'm resending the issue that I reported the other day, now with a
> > MCE.
>
> Sorry for the delay on this -- and thanks for the detailed reports.
>
> I tried not to get lost in the details actually... so I ended up using
> the attached fix.  It works here, i.e. C-u C-RET inserts a new heading
> at the right place, but I'm not using org-mobile.el so I'm not 100%
> sure if it works for you.
>
> Can you test and confirm?

I can, in about a week. I'm traveling, without my laptop (first time in years I've left it at home - phone and tablet only for this trip).

I'm creating new entries in MobileOrg on the road. When I get home, I'll apply the patch and see what happens.

One concern: When you tested with C-u C-RET, was the point on a hidden headline? The problem only occurs if the current heading is folded up underneath a parent heading. AFAIK cursor movement in org-mode ensures that the point is never on invisible text, which is why I wrote a short lisp function to demonstrate. It seems to me the issue reproduces only when calling org-insert-heading non-interactively, then, so I wanted to check if your test reproduces the problem without the patch.

hjh