From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: org-list-make-subtree produces incorrect level [9.2.3 (9.2.3-20-g31873e-elpaplus @ /home/felix/.emacs.d/elpa/org-plus-contrib-20190527/)] Date: Mon, 10 Jun 2019 00:20:44 +0200 Message-ID: <87pnnml7sz.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38481) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha6BT-0007Mj-Cq for emacs-orgmode@gnu.org; Sun, 09 Jun 2019 18:21:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha6BR-0001oy-Am for emacs-orgmode@gnu.org; Sun, 09 Jun 2019 18:21:03 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:52209) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ha6BO-0001kV-EW for emacs-orgmode@gnu.org; Sun, 09 Jun 2019 18:21:01 -0400 In-Reply-To: (Felix Wiemuth's message of "Sat, 1 Jun 2019 19:30:55 +0000") 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" To: Felix Wiemuth Cc: "emacs-orgmode@gnu.org" Hello, Felix Wiemuth writes: > In some situations, org-list-make-subtree does not create the tree at > the desired level. For example, in the following case, when executing > the command on the first list element, the resulting level is 3 instead > of 2: > > * L1 > - List Item > ** L2 > > The result is: > > * L1 > *** List Item > ** L2 > > Expected result (as in most situations): > > * L1 > ** List Item > ** L2 > > The last item (L2) is necessary for this to happen, whether the list has multiple items or > subitems does not matter. The identation of the list item does not > matter either. > > The same happens in deeper levels: > > * L1 > ** L2a > ** L2b > - List Item > *** L3 > > It seems that the resulting tree is always put one level deeper than a > (deeper) heading following without a newline. Maybe this was intended > but it feels unintuitive to me. > > * L1 > - List Item > *** L3 > > results in > > * L1 > **** List Item > *** L3 > > but > > * L1 > - List Item > > *** L3 > > results in > > * L1 > ** List Item > > *** L3 > > I think I also observed a case where the resulting level was 2 instead > of 4, so the other way round, but unfortunately I cannot reproduce it. I think this is now fixed in master. Thank you. Regards, -- Nicolas Goaziou