emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Gregor Zattler <telegraph@gmx.net>
To: Sharon Kimble <boudiccas@skimble09.plus.com>, emacs-orgmode@gnu.org
Subject: Re: How to auto-renumber chapters
Date: Wed, 28 Aug 2024 19:55:32 +0200	[thread overview]
Message-ID: <87v7zkbkh7.fsf@no.lan> (raw)
In-Reply-To: <87mskxrqdx.fsf@skimble09.plus.com>

Hi Sharon,
* Sharon Kimble <boudiccas@skimble09.plus.com> [2024-08-28; 09:41 +01]:
> I'm writing a fiction book, and have just added several chapters from a previous draft to it.
>
> As a result I now have
>
> ** Chapter 2
> blah     
>
> ** Chapter 2
> blah de blah
>
> ** Chapter 3
> more blahing
>
> How can I get these new chapters to autorenumber themselves please, so that they will show Chapter 2, Chapter 3 and Chapter 4?        

András' solution shows emacs' greatness.

But it might be easier to get rid of
numbers in the /text/ of headings and
instead do M-x org-num-mode, which
dynamically shows heading numbers like

1. Heading
2. Heading
   1.1 Heading

...

with default settings.  There plenty of
possibilities for configuration, see
(info "(org)Dynamic Headline Numbering")
[evaluate after the last closing parenthesis]
or the commentary section of org-num.el


Ciao; Gregor 


  parent reply	other threads:[~2024-08-28 17:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28  8:41 How to auto-renumber chapters Sharon Kimble
2024-08-28 16:20 ` András Simonyi
2024-08-28 17:55 ` Gregor Zattler [this message]
2024-08-31 18:41 ` Ihor Radchenko

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 \
    --in-reply-to=87v7zkbkh7.fsf@no.lan \
    --to=telegraph@gmx.net \
    --cc=boudiccas@skimble09.plus.com \
    --cc=emacs-orgmode@gnu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).