emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: James Harkins <jamshark70@gmail.com>
To: Bastien <bzg@gnu.org>, Emacs-orgmode@gnu.org
Subject: Re: Bug: org-insert-heading-respect-content inserts at the wrong level if target heading is invisible [7.9.2 (release_7.9.2-883-g6fb36e.dirty @ /home/dlm/share/org-mode.git/lisp/)]
Date: Wed, 13 Mar 2013 17:03:26 +0800	[thread overview]
Message-ID: <CAFniQ7U4hpsMj9KfOaH86p-9aVGWApcOEjqJpRR=zWHsb2cGTQ@mail.gmail.com> (raw)
In-Reply-To: <87mwujdp87.fsf@bzg.ath.cx>

On Tue, Mar 5, 2013 at 1:41 AM, Bastien <bzg@gnu.org> wrote:
> There is some obscure issues here... I fixed various things in
> `org-insert-heading' in master, but inserting in invisible parts of
> the subtree is still unstable.  So I went and used the workaround you
> suggested (i.e. org-show-subtree) in the maint branch, so that it will
> be in 7.9.4.

Apologies -- this seems to be the issue that wouldn't die -- but I
have to report another failure with this.

I just did org-mobile-pull with the following entry:

~~
* F(edit:addheading) [[olp:semester.org:Dates][Dates]]
** Old value

** New value
Graduating exams
the modern music Important Notice:.....
** End of edit
~~

This means the new heading should be at the second level, underneath
Dates. Instead, it was added as the topmost *first* level heading:

~~ BEFORE
#+LAST_MOBILE_CHANGE: 2013-03-13 16:38:42

* Dates
** DONE Teachers' meeting
~~

~~ AFTER
* Graduating exams
the modern music Important Notice:....#+LAST_MOBILE_CHANGE: 2013-03-13 16:38:42
* Dates
** DONE Teachers' meeting
~~

~~ EXPECTED
#+LAST_MOBILE_CHANGE: 2013-03-13 16:38:42

* Dates
** DONE Teachers' meeting
** ... a few other level 2 headings ...
** Graduating exams
the modern music Important Notice:....
~~

Also, "#+LAST_MOBILE_CHANGE:" should be the first line in any org file
that's being synced to MobileOrg, but
(org-insert-heading-respect-content '(4) t) ignores this.

BTW, I believe the arg '(4) is incorrect. In MobileOrg (at least in
android -- actually, I think the iPhone doesn't support this feature
yet), new nodes go to the bottom of the parent's children. They should
not be inserted at the top in Emacs.

This is slightly different from the earlier bug. "* Dates" *is* a
top-level heading in the target file -- hence, it *can't* be
invisible. Nonetheless, when inserting the new heading, it seems to be
reading the level of the target node as level 0, rather than level 1.
After that, the new node goes at the top of level 1 (which will also
obliterate any #+ preamble the file might have).

This may be a recent issue. I updated via git after you said that you
had put my workaround in place, and I don't remember seeing this
problem before. New second-level nodes did go into the right places. I
saw this issue only today (git pull yesterday).

Thanks...
hjh

  parent reply	other threads:[~2013-03-13  9:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25  4:46 Bug: org-insert-heading-respect-content inserts at the wrong level if target heading is invisible [7.9.2 (release_7.9.2-883-g6fb36e.dirty @ /home/dlm/share/org-mode.git/lisp/)] James Harkins
2013-02-11 17:30 ` Bastien
2013-02-12  3:50   ` James Harkins
2013-02-12 10:34     ` Bastien
2013-02-14  9:09     ` Bastien
     [not found]       ` <CAFniQ7XpJnqOW8DqdGLJ1RbtPtrnKQz=zXBH-O0M1ZFPBa5ucw@mail.gmail.com>
     [not found]         ` <87mwujdp87.fsf@bzg.ath.cx>
2013-03-13  9:03           ` James Harkins [this message]
2013-04-10 23:06             ` Bastien

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='CAFniQ7U4hpsMj9KfOaH86p-9aVGWApcOEjqJpRR=zWHsb2cGTQ@mail.gmail.com' \
    --to=jamshark70@gmail.com \
    --cc=Emacs-orgmode@gnu.org \
    --cc=bzg@gnu.org \
    --cc=jamshark70@dewdrop-world.net \
    /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).