From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id e7suKK9YOmGPBwEAgWs5BA (envelope-from ) for ; Thu, 09 Sep 2021 20:55:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wAQiI69YOmFdUQAAbx9fmQ (envelope-from ) for ; Thu, 09 Sep 2021 18:55:43 +0000 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 ED14624D58 for ; Thu, 9 Sep 2021 20:55:42 +0200 (CEST) Received: from localhost ([::1]:49394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOPD3-00081F-Rj for larch@yhetil.org; Thu, 09 Sep 2021 14:55:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOPCM-00080t-Fb for emacs-orgmode@gnu.org; Thu, 09 Sep 2021 14:54:58 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:38718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOPCK-0003CY-TX for emacs-orgmode@gnu.org; Thu, 09 Sep 2021 14:54:58 -0400 Received: by mail-wr1-x431.google.com with SMTP id u16so3981418wrn.5 for ; Thu, 09 Sep 2021 11:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=m5umDq0bSqF7XHg01Wwg9VWyaCPEbkOax7U25txWUYg=; b=GKP5Z/pznPGR373ayFGh8YIkdlKNpQKZKpZJcze1MPxvLg1p5ijh98flx2hmE2EXGF PMLBmndS8zlKMpPrFscapuvZLD04YnDYaDhK+KWTUTox49Bwz6dSX92EuH+MD9lZN1B6 M0wVC3uxDctFAaDUTGkkK7jVyUJk0QunIiGMak6xvh0DDaoa0GsEBUMDeXy9hTTmWWhQ 5l6Fd2wsaD4zwcyo0mj0aso/lyBGnMspeC7GmOfp3bdIwE7HWrELhJcIPgXdOhFewCbG /TJrUIILNR+RqoDIbaCCERz3vP9IegDJSvxk8IMpuRnwdHdG0+aZLUEnUIjJ01kP+a7O is4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=m5umDq0bSqF7XHg01Wwg9VWyaCPEbkOax7U25txWUYg=; b=rdqVIMBwZpfN46Xj1HEdiI3FaDdIxyf5KRf4x3bs9Unsv8PsW52y+8onW42ql2w0lh L1BcgIvYWvD6IxNqFW2flYovKrfObjxxAV83s9jCt5IVdHMLXRJWBsu0NtXrt6hTs+OL NmNKAqfMSZD4h/cWA26k76lHz0Ijf5PFaGIDlhNLBK8a7xr+YEiGCdEaSkuMRi7l2+uB D/ZcnVvmGaNg7am3GKM3kuM4ry7W51scFyxgOwphyaeRo71TrYFiKMVAoJrFuRRkJoQA MDbXjmX4CwMIMMq1uFYvqzN/xqQNHhH0Rhix+dRD3Av3febkOGkc7z1BJBrn54eflirl KFfw== X-Gm-Message-State: AOAM531gWTSm0Gz5hb91Mndwo+L+gkfcTJKgXkdrXVzxc5ZHmPHGU5wJ pbj9JC/aW3jj4CA8zsRDFHU= X-Google-Smtp-Source: ABdhPJysKwz2ZSRxILTc5lfri8zRAUPb2d6CDmDgbZcntI1zZH5Ziox0eZMCDP6Sx8MoOwi/jVcSug== X-Received: by 2002:a5d:6781:: with SMTP id v1mr5401498wru.249.1631213694894; Thu, 09 Sep 2021 11:54:54 -0700 (PDT) Received: from aspire-5942 (p200300d867434900a1ab729d3a38cf55.dip0.t-ipconnect.de. [2003:d8:6743:4900:a1ab:729d:3a38:cf55]) by smtp.gmail.com with ESMTPSA id n3sm2000476wmh.30.2021.09.09.11.54.53 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Sep 2021 11:54:54 -0700 (PDT) From: Marco Wahl To: "Victor A. Stoichita" Subject: Re: behavior of (org-insert-heading-respect-content) References: <87lf4594t3.fsf@svictor.net> Date: Thu, 09 Sep 2021 20:54:39 +0200 In-Reply-To: <87lf4594t3.fsf@svictor.net> (Victor A. Stoichita's message of "Thu, 09 Sep 2021 16:55:36 +0200") Message-ID: <87y285vats.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=marcowahlsoft@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631213743; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=m5umDq0bSqF7XHg01Wwg9VWyaCPEbkOax7U25txWUYg=; b=h0Ns7qT8qomyEo9JcxSh9hokE1Aa/sxCMPTqsPcA6heCMw96Gi8/raKWFVeCP1TDC6GF+x 20pDd2nD4qm1BY2ymrVIRiOGIV4g0RGNJQ4/g7+OY0M+pxenS/k2EqYn3wrEh5szo3gZB1 mMwycwspYByx2bGc0/HABZ/bby9sfWdkgemHKMxW0kKADb8YE+V+X5hh0AIkMTuojsMy9Z 9DmbBbNWZDx9UtqfGYCsnt0L/W/LyMKN2G3EQ54naBYowFqA8LEhC/gPBx3zjHhtEGk/lP TsemJjol+ndfzSk03fiDSzUjv67eNZobagKx7mV94SfVCEG2y2EHTDMwCyAvMA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631213743; a=rsa-sha256; cv=none; b=TDk2ica4iwtOD+WJU+6RykPqQBNZbwRnic6dzx8vNC1htvs665bHWlSD2SCsh0vvF0hjn0 qIwSgKv0/xztUaKP8Pd56aMR0RzKYor6HXP59vM9XtXzleAnbizzMvre24rivCqF9wR8mR wrK3WCZzmNWd+TLQ75MXyQVEiUjdGu6zO8TNRoCiqto7odJnZf2lbY6iLFLbQTHcNCJWzM JGAWyPDvWBykRoWSRs5FMn5YIYKVEfOlwgcWQsQ5npW78uqEvoXtXBn272ZGIxnymGVort +5AGS9jDi5Iuza+kTPEcq5PUbEwFtB0ve98L4wItVkmRV6k6iu6sZ2x0TwXJpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="GKP5Z/pz"; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="GKP5Z/pz"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: ED14624D58 X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: xk+K0HJCmKNf Hi! "Victor A. Stoichita" writes: > I see the following behavior which seems erroneous to me=C2=A0: > - When I issue (org-insert-heading-respect-content) in a brand new org > buffer, with point at point-min I get the error "Beginning of buffer" > and no heading is inserted. > - If I write something on the 1st line, say "test", but no newline, and > then issue (org-insert-heading-respect-content), the result is=C2=A0: > "test * " which is not a properly formatted heading > - Only if there is a newline before point does > (org-insert-heading-respect-content) insert a proper heading.=20 > > Am I getting something wrong or is this a bug=C2=A0? I think so. My impression is that org-insert-heading-respect-content should be called only with point in a subtree. The fix would be to signal an error when point is not located in a subtree. Does this sound reasonable?