emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>, "Thomas S. Dye" <tsd@tsdye.com>
Subject: Re: org-insert-heading
Date: Thu, 14 Nov 2013 23:53:54 +0100	[thread overview]
Message-ID: <87li0qzjb1.fsf@bzg.ath.cx> (raw)
In-Reply-To: <878uwqev02.fsf@gmail.com> (Nicolas Goaziou's message of "Thu, 14 Nov 2013 18:46:53 +0100")

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> Confirmed -- I quickly looked, it seems that `org-in-item-p' should do
>> a better job when preceeded by invisible text.
>
> I need to rewrite this function.
>
> Anyway, I'm not sure what you mean in your last sentence because, as
> a low-level function, its results shouldn't be affected by folding
> status of the document (I didn't follow the thread closely, though, and
> could be off tracks).

The problem is this one:

* Folded subtree...

^-{ Point here

then M-x org-insert-heading RET will *not* insert a heading if the
folded subtree is ending with a list, because `org-in-item-p' will
infer point is within a list.

So maybe `org-insert-heading' should be fixed instead, as a higher
level function, ignoring the folded content before the point?

-- 
 Bastien

  reply	other threads:[~2013-11-14 22:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13  1:49 org-insert-heading Thomas S. Dye
2013-11-13  8:58 ` org-insert-heading Bastien
2013-11-13 13:06   ` org-insert-heading Thomas S. Dye
2013-11-13 14:15     ` org-insert-heading Bastien
2013-11-14 17:46       ` org-insert-heading Nicolas Goaziou
2013-11-14 22:53         ` Bastien [this message]
2013-11-15  6:42           ` org-insert-heading Carsten Dominik
2013-11-15  8:08             ` org-insert-heading Bastien
  -- strict thread matches above, loose matches on Subject: below --
2014-11-12  0:10 org-insert-heading Luke Crook
2014-11-12  0:13 ` org-insert-heading Luke Crook
2014-11-13 20:01 ` org-insert-heading Nicolas Goaziou
2014-11-14  3:14   ` org-insert-heading Luke Crook
2014-11-14  4:18     ` org-insert-heading Luke Crook
2014-11-16 14:52     ` org-insert-heading Nicolas Goaziou
2010-10-15 17:38 org-insert-heading Andreas Röhler
2010-10-16  5:30 ` org-insert-heading Carsten Dominik
2010-10-16  6:14   ` org-insert-heading Andreas Röhler

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=87li0qzjb1.fsf@bzg.ath.cx \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    --cc=tsd@tsdye.com \
    /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).