emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marco Wahl <marcowahlsoft@gmail.com>
To: "Victor A. Stoichita" <victor@svictor.net>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: behavior of (org-insert-heading-respect-content)
Date: Thu, 09 Sep 2021 20:54:39 +0200	[thread overview]
Message-ID: <87y285vats.fsf@gmail.com> (raw)
In-Reply-To: <87lf4594t3.fsf@svictor.net> (Victor A. Stoichita's message of "Thu, 09 Sep 2021 16:55:36 +0200")


"Victor A. Stoichita" <victor@svictor.net> writes:

> I see the following behavior which seems erroneous to me :
> - 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 :
>   "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. 
> Am I getting something wrong or is this a bug ?

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

Does this sound reasonable?

  reply	other threads:[~2021-09-09 18:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 14:55 Victor A. Stoichita
2021-09-09 18:54 ` Marco Wahl [this message]
2021-09-09 19:29   ` Victor A. Stoichita
2021-09-13 19:21     ` Marco Wahl
2021-09-17 15:23       ` Victor A. Stoichita
2021-09-18 13:08         ` Marco Wahl
2021-09-26 11:13           ` Bastien
2021-09-26 12:13             ` Marco Wahl
2021-09-26 12:31               ` Bastien
2021-09-26 19:57           ` Victor A. Stoichita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y285vats.fsf@gmail.com \
    --to=marcowahlsoft@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=victor@svictor.net \
    --subject='Re: behavior of (org-insert-heading-respect-content)' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).