From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-insert-heading Date: Fri, 15 Nov 2013 07:42:21 +0100 Message-ID: References: <87wqkcznir.fsf@bzg.ath.cx> <87d2m4s7zh.fsf@bzg.ath.cx> <878uwqev02.fsf@gmail.com> <87li0qzjb1.fsf@bzg.ath.cx> Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhD6x-0006mQ-Oe for emacs-orgmode@gnu.org; Fri, 15 Nov 2013 01:42:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VhD6s-0008OU-Ek for emacs-orgmode@gnu.org; Fri, 15 Nov 2013 01:42:35 -0500 In-Reply-To: <87li0qzjb1.fsf@bzg.ath.cx> 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: Bastien Cc: Org-mode , Nicolas Goaziou , "Thomas S. Dye" On 14.11.2013, at 23:53, Bastien wrote: > Hi Nicolas, >=20 > Nicolas Goaziou writes: >=20 >>> Confirmed -- I quickly looked, it seems that `org-in-item-p' should = do >>> a better job when preceeded by invisible text. >>=20 >> I need to rewrite this function. >>=20 >> 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). >=20 > The problem is this one: >=20 > * Folded subtree... >=20 > ^-{ Point here >=20 > 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 >=20 > So maybe `org-insert-heading' should be fixed instead, as a higher > level function, ignoring the folded content before the point? >=20 > --=20 > Bastien >=20