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 CKImLz/lRWFdhAAAgWs5BA (envelope-from ) for ; Sat, 18 Sep 2021 15:10:23 +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 mMa3Kj/lRWHkfQAAbx9fmQ (envelope-from ) for ; Sat, 18 Sep 2021 13:10:23 +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 C98D79C5D for ; Sat, 18 Sep 2021 15:10:22 +0200 (CEST) Received: from localhost ([::1]:33178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRa6n-00084I-Tj for larch@yhetil.org; Sat, 18 Sep 2021 09:10:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRa5r-00082b-DD for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 09:09:23 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:43635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRa5p-00063o-PE for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 09:09:23 -0400 Received: by mail-wr1-x42f.google.com with SMTP id w17so11635234wrv.10 for ; Sat, 18 Sep 2021 06:09:20 -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=wtze96Iv8DbrLYKUEPJaQ3NNLEi4HyRMU/VSfbu2SBw=; b=B32w7dIKZkRrG5qXRnScetyrjaoGkWMiZUJC9gm2KQjJVs44oa/MBA5JQD5sk/9qmN MmqbbSrCx5XO4YII9ksNAWLinQxmIivSF7JIzR0a5U42vD0E5n/aoDy8e3Ujmmd011f7 bhy/VN/xREsKvGW9u1aXBZOlFZPjfTmjzAM6d7+BC/PcwLXCEw5SRQnfzKSbsdCPSrPt J56TJX5LeutH+9QNhJPWa+te9vpwBw1CohK0BL9TglA9DcyQ2UwD/xYoVP+dbmXUtzvX nSq4zfFXJ+q89QIUA55dtLScm8oiYVBbur8d1t4H3d8ws7Zq9vXTNenMgodjWIxJ7vSx aO+A== 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=wtze96Iv8DbrLYKUEPJaQ3NNLEi4HyRMU/VSfbu2SBw=; b=VOQ2qKuAU08pPhejQmqUlIO/W8jwqIbjpXR+WmlH2+LQiv3+xScbLbwLC5UP0NeV3f oPSx1HvZy9YfM5nK2ALupQaidWWSUl1Fo2BNa7pdPQrPCcQxRplFH65mZ70VM05ohA5j zv7zexev8OAb2prNqF8Gabbnut9zvVxEIMcio+2BO8eSlcDbqXwOtnYbK5CMRcq2hV9W qrshfZFnAeGjM+MUbF1ilm3urEYq4IHon4NSfjYFbrZCiJv64Xx0PTj5CdpYZguwWvRQ i5qKJjs2fAP4UtTFX806Mq+tJvhvoKp6ZRNTwv+5XLhQYxKCw9Rjt9iqDP78oBV9LiKc fUoQ== X-Gm-Message-State: AOAM5306SY3Rn0lRMu/CuYus0KUoeyf4XJonwthUgna65rQb1SMNVqeI bQgAjntVpB32YbGUit5WHqg= X-Google-Smtp-Source: ABdhPJxGVniyxKKgn+Z5YglZFfPnAM1yCaQSjPaq7wzNFR1qFwjVodO/mbOrkqHDWR60IWSxLSixvQ== X-Received: by 2002:a5d:63c5:: with SMTP id c5mr17985823wrw.135.1631970559249; Sat, 18 Sep 2021 06:09:19 -0700 (PDT) Received: from aspire-5942 (p200300d86743c800788af538586d34c8.dip0.t-ipconnect.de. [2003:d8:6743:c800:788a:f538:586d:34c8]) by smtp.gmail.com with ESMTPSA id a72sm14069695wme.5.2021.09.18.06.09.17 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Sep 2021 06:09:18 -0700 (PDT) From: Marco Wahl To: "Victor A. Stoichita" Subject: Re: behavior of (org-insert-heading-respect-content) References: <87lf4594t3.fsf@svictor.net> <87y285vats.fsf@gmail.com> <87ilz98s5a.fsf@svictor.net> <875yv4uvqr.fsf@gmail.com> <87czp74455.fsf@svictor.net> Date: Sat, 18 Sep 2021 15:08:58 +0200 In-Reply-To: <87czp74455.fsf@svictor.net> (Victor A. Stoichita's message of "Fri, 17 Sep 2021 17:23:50 +0200") Message-ID: <8735q22fpx.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::42f; envelope-from=marcowahlsoft@gmail.com; helo=mail-wr1-x42f.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=1631970623; 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=wtze96Iv8DbrLYKUEPJaQ3NNLEi4HyRMU/VSfbu2SBw=; b=YnejoZGc2QdMTlGWhrKdE9xQAMKa+sWZHsFWQnKt1pCPUZHBvkyHwtfjfraegc/7NGwT4n DTZPTZLwkQ+77jSaRBtPk0G4EvXRJXqJ17DOW+f48mU3/d4KWsPpdiwkLghBPZwYLL6d3G LszMklrbs/Te6Gcmqe2NIxtOjQrmFuWTWQVs4aJCohZGrelnFL+kG37DeGS/Vb9U/WuASU lCZ1k8+A1n9juGsymz8plGBClwBYpYEp0NNCJtiTDSbovZr8VqOvgIo4d1tm9xl3+EPvnG l4NUyTg6dcLIYtGGynnU4jHo13xEeYaZ5xzebhqimhGYU60JbrNaNW+mIgTTGw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631970623; a=rsa-sha256; cv=none; b=cjiiVFhG8A+dx0qJyAIsb3bqA+W4doGRsfGJVptCuft4M/bEv8lvXgSyrKCjDF6Hg0bjF/ 2XVF9g+R2LMhuvhqCYQGdeC3WZ+VdOg2a3nLByhzKJelf33HrjaYPHfrxInInwFHrm8fv+ D6b4Kymkt4gdcsiE9Lkbp8bDJoxLslO288xJDMbN8/IbwfmFYrXkOGXiOsLO3agjGTXwD6 z1VDo3uEMMSMyvmvd4sktiXa49b3zPpfEaHGTx8HKDBhgriHLc0n+zl8mhnQ3vuk1xBiuH 2LhSPD8QJYoBvplGGUOnCLYxZSHQcLd1H0zOFYCJV8axEMXZuRr/3AvTLsbWoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=B32w7dIK; 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-Spam-Score: -1.59 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=B32w7dIK; 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: C98D79C5D X-Spam-Score: -1.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: PDzkBVUZCpkQ Victor! > Le 13 Sep 2021, Marco Wahl a =C3=A9crit : > >> As far is I see it, the intended behavior of >> org-insert-heading-respect-content with point before the first heading >> is to >> >> - insert the new heading immediately before the first heading. Respect >> the content! > Hi Marco=C2=A0! > > I agree with you. But this does not work. Say I have a buffer with this c= ontent=C2=A0: > > put point HERE and C- > Some more stuff=20 > * Heading > content > > > When point is at HERE and I C-, org inserts a new asterisk on > the after "stuff", but on the same line =E2=86=92 not a proper heading. >> >> - If there is no heading at all in the file the heading shall be >> inserted at the bottom of the file. > > Yes. But I get the same behavior with=20 > > put point HERE and C- > Some more stuff=20 > > The asterisk is inserted right after "stuff", on the same line =E2=86=92 = not > a proper heading. > >> >> Do we agree on the desired behavior of >> org-insert-heading-respect-content? > > Yes, we do! >> >> With your proposition the respect for the content gets lost, >> doesn't it? > > Yes, you=E2=80=99re right. It currently does not respect the content befo= re > first heading. Therefore it=E2=80=99s not a fix for the behavior of > org-insert-heading-respect-content. > It=E2=80=99s just the quickest workaround I=E2=80=99ve come up with to ma= ke my own > function work (in my use-case, when I call that function, either point > is at point-min in a brand new buffer, or point is below the first > heading). Okay, thanks for clarifying. Would be great if you could test the fix. Thank you!