emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Org-mode <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <n.goaziou@gmail.com>,
	"Thomas S. Dye" <tsd@tsdye.com>
Subject: Re: org-insert-heading
Date: Fri, 15 Nov 2013 07:42:21 +0100	[thread overview]
Message-ID: <E6A15E61-13BD-4088-98B5-EA2D56A6BA7F@gmail.com> (raw)
In-Reply-To: <87li0qzjb1.fsf@bzg.ath.cx>


On 14.11.2013, at 23:53, Bastien <bzg@gnu.org> wrote:

> 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.


I think it is dangerous to change the behavior in such a way that
it will depend on the heading being folded or not.  Definitely org-in-item-p
should not depend on that.  I am still debating with myself if org-insert-heading
should.  Maybe only in interactive use or something like that.  Dangerous territory.

- Carsten

> 
> 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-15  6:42 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         ` org-insert-heading Bastien
2013-11-15  6:42           ` Carsten Dominik [this message]
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=E6A15E61-13BD-4088-98B5-EA2D56A6BA7F@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=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).