From: Marco Wahl <firstname.lastname@example.org> To: "Victor A. Stoichita" <email@example.com> Cc: emacs-orgmode <firstname.lastname@example.org> Subject: Re: behavior of (org-insert-heading-respect-content) Date: Sat, 18 Sep 2021 15:08:58 +0200 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <firstname.lastname@example.org> (Victor A. Stoichita's message of "Fri, 17 Sep 2021 17:23:50 +0200") Victor! > Le 13 Sep 2021, Marco Wahl <email@example.com> a écrit : > >> 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 ! > > I agree with you. But this does not work. Say I have a buffer with this content : > > put point HERE and C-<return> > Some more stuff > * Heading > content > > > When point is at HERE and I C-<return>, org inserts a new asterisk on > the after "stuff", but on the same line → 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 > > put point HERE and C-<return> > Some more stuff > > The asterisk is inserted right after "stuff", on the same line → 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’re right. It currently does not respect the content before > first heading. Therefore it’s not a fix for the behavior of > org-insert-heading-respect-content. > It’s just the quickest workaround I’ve come up with to make 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!
next prev parent reply other threads:[~2021-09-18 13:10 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 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 [this message] 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: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: behavior of (org-insert-heading-respect-content)' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * 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: https://git.savannah.gnu.org/cgit/emacs/org-mode.git 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).