From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id aHXcDom/XGSL4wAASxT56A (envelope-from ) for ; Thu, 11 May 2023 12:12:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GOWUDom/XGTf/AAAauVa8A (envelope-from ) for ; Thu, 11 May 2023 12:12:25 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DEEB93C859 for ; Thu, 11 May 2023 12:12:24 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1px3HA-0000Mn-L8; Thu, 11 May 2023 06:11:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px3H8-0000MM-GI for emacs-orgmode@gnu.org; Thu, 11 May 2023 06:11:54 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px3H3-0002SC-VQ for emacs-orgmode@gnu.org; Thu, 11 May 2023 06:11:54 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 869DF240123 for ; Thu, 11 May 2023 12:11:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683799907; bh=ktCaIbW75nxxOXiABPKpjmGtJ9DLX5sqsTWbqpW4hHk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=J+mX+3nsOTKfixnMnOO405PDCaLsBpihZtWrvK0IH78mPsbQ1rMcjL5k1cUsm0voc 31mM5SoXV/AkbQQPnhruGFrzaz5N1G7zRExmzlxn9/d1Lms/z3UurLav9cbPzHBknn bH49JACe/mXpj8n9Vew+wiQ8axjHamUFVF4tf73HOJyhZCVdGebAzsdj2Lk5cTc3Fx qWkahmAtRrD8bLJDXL38odsN/gLQzCyi58M89LrCEsWttB557rYrEuT0xx+MA0NDaz q1XZhLd+a011OmPYchGY3F/9QQ/YKePAtgJCDgNytOdqFUQsj7DHPV993+PEsNXclr RhmkvocsMRKSw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QH73R01g9z6twf; Thu, 11 May 2023 12:11:46 +0200 (CEST) From: Ihor Radchenko To: Michael Dauer Cc: emacs-orgmode@gnu.org Subject: Re: BUG: (org-insert-subheading) fails when on true begin of line (first star) of heading In-Reply-To: References: Date: Thu, 11 May 2023 10:15:13 +0000 Message-ID: <87wn1f41ji.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683799944; a=rsa-sha256; cv=none; b=EUsG03nB+oJXOqsFSYtG4Jbj+P0MYbCAGTJQ2vL6AsFuwV5pC376uyBYzTfom8F5Nyv0Ug 0kcR7slrSBkD5cj5v8vuXB9rPliwarDTL8xDMFbGAPLyUAzZKbXDt2szH+X8GUoBzD1eK3 brBB/KONmQ3gN4uFDObPs2wRhTOVSS1jcWcVYEgp0rLm/4lKmNqtd74ySCkCsgwq9gNrsG nNsBGDv3MdaJCYath6L5I/1oGHifEoIkMmpe9zJTKcKmfanwB12bzmsnuvH8eNSkgG/Ec6 Gbj6jMOIx14VSOCyCgU4K5oWEVJiWI7Rrv4jz9mSd0Lbq3E5DS0OaoUO8QiDHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=J+mX+3ns; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683799944; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Zitb3zkQA9t7j86kxqMsLLAFxE9OlmuqkwrGi1nUElg=; b=UCWEowrJIhSGW1Yd1orgQCu+WOoikc6/5CMpNXH9ZHKb5aS5q8OUTdVZLNJ3TYsgdwoP6S +3UfWLvSveaIB/bIW/OubTfkCd5Qidr6PnjxKUjaOLQDHnPMjuvknpuq8nEMHYAQWd2GoH kIjmXXzS8P8HjaEGBlLo+UqvUg7ErWzd3Faxhx1pds6hPzV7Qm6JPgwoiFpqMjBjn0OGOb rBJ49p9mcEyxJZQAVgJBuCHLRQexvniQyb1tO3ELBGq2EZUtD29Z+EBC7CkehM1LB+Ur4i wvecJ+f8p9+ZMbkZk8pH2sE3b8iGgxbzPn51G4B8Hd6h23/sUTYBB4rexpOIyw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=J+mX+3ns; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.65 X-Spam-Score: -4.65 X-Migadu-Queue-Id: DEEB93C859 X-TUID: TsetF/AAORuS Michael Dauer writes: > Example > * h1 > <>** h11 > > brings: > * h1 > *** <> > ** h11 This is expected. `org-insert-subheading' inherits what `org-insert-heading' does: Insert a new heading or an item with the same depth at point. *************************************************************** If point is at the beginning of a heading, insert a new heading or a new headline above the current one. When at the beginning of a regular line of text, turn it into a heading. *************************************************************** If point is in the middle of a line, split it and create a new headline with the text in the current line after point (see org-M-RET-may-split-line on how to modify this behavior). As a special case, on a headline, splitting can only happen on the title itself. E.g., this excludes breaking stars or tags. With a C-u prefix, set org-insert-heading-respect-content to a non-nil value for the duration of the command. This forces the insertion of a heading after the current subtree, independently on the location of point. With a C-u C-u prefix, insert the heading at the end of the tree above the current heading. For example, if point is within a 2nd-level heading, then it will insert a 2nd-level heading at the end of the 1st-level parent subtree. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at