From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org-insert-heading Date: Thu, 14 Nov 2013 23:53:54 +0100 Message-ID: <87li0qzjb1.fsf@bzg.ath.cx> References: <87wqkcznir.fsf@bzg.ath.cx> <87d2m4s7zh.fsf@bzg.ath.cx> <878uwqev02.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh5nd-0006Hl-2l for emacs-orgmode@gnu.org; Thu, 14 Nov 2013 17:54:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vh5nU-0002WU-Kw for emacs-orgmode@gnu.org; Thu, 14 Nov 2013 17:54:09 -0500 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:42029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh5nU-0002WM-Do for emacs-orgmode@gnu.org; Thu, 14 Nov 2013 17:54:00 -0500 Received: by mail-we0-f182.google.com with SMTP id q59so742190wes.27 for ; Thu, 14 Nov 2013 14:53:59 -0800 (PST) In-Reply-To: <878uwqev02.fsf@gmail.com> (Nicolas Goaziou's message of "Thu, 14 Nov 2013 18:46:53 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: Org-mode , "Thomas S. Dye" Hi Nicolas, Nicolas Goaziou 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