From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id SHwYFJ5Oz2aNtwAAqHPOHw:P1 (envelope-from ) for ; Wed, 28 Aug 2024 16:21:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id SHwYFJ5Oz2aNtwAAqHPOHw (envelope-from ) for ; Wed, 28 Aug 2024 18:21:50 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=P01Rowa1; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724862110; 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=EQW00/x2G6wANjU9yqsk18zMSEAovjWdHs6u5a2kHnA=; b=g+TG6qR+UjSrowVu8nFP8p5l2HMqxqpevr6eiMuajY7gX5TQNb30VcAn0r/+FbaelIGwsA MNBDlDCIYxiWoGKizyTGGncKTvBTKfSlXMsgi01N3D0lrx/YY+Onhj9h1rKHKdhnV6PqkP Ix1wKNN7L39M9rs/jPwwKo4Zep7C3o9gvhV9yeJ06pj60N9FEKc/k0vZPYrP2XnHicjLIu dyymhzgHFoCMtYwl9qapfE1zIQIHFYbdc1ykMGRwvjvACD1vr0nl3gfvbTd0ckFgCIKqNL ZkWsnsRSd6xrYGm7wJqutSJyGivCO1c0zJ8ZVk1zXUI+rUXeWCkaVy/auoZJxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=P01Rowa1; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724862110; a=rsa-sha256; cv=none; b=pBmmXzca2WnPJEbrymA/uZqbPIfToQGvLe7dvtD4M9MgXZ7Td+y+1G4RLO44IU9ExG4tOA CgxMagQtRt8UCd4tYS53SOVWWXgELn7EWzr8urlXq1tVVKN2bbMsqhVTFfxoPqaA9sJpGS OaczP4qxvnStOlALKn9jm/dXfjcf7vNfctqIsAJ1y7DTllijMXG9n1kSMGRj6RX8xm8FgA SjXkw1grPw1Z8m43qVy6kgr6kliw4L8b+s+aDGWLT52VdANXJSd7TkPCwyv0SYmsOqduC1 A44IpBQkSOFHg8l3kIDy+WYN2ZQJiNQBlGZAUpY3iu2Z4gWAYbKvE/uGr4k6uA== 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 1960C2099A for ; Wed, 28 Aug 2024 18:21:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjLPl-00037F-RY; Wed, 28 Aug 2024 12:20:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjLPj-00036x-KJ for emacs-orgmode@gnu.org; Wed, 28 Aug 2024 12:20:55 -0400 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sjLPi-0003in-12 for emacs-orgmode@gnu.org; Wed, 28 Aug 2024 12:20:55 -0400 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3df04219e31so181627b6e.3 for ; Wed, 28 Aug 2024 09:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724862052; x=1725466852; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EQW00/x2G6wANjU9yqsk18zMSEAovjWdHs6u5a2kHnA=; b=P01Rowa1azII6CEj2O5a3Hs2SLZyBVvMhez1ikRfHSRdAC/6hvqzJlK00Bdc+9W7Fm OZ9aYQ/QfjfGKylbu8VgfCmMG+NjS1Hf0Wo8KMr4mXC6vrMDO8GUgBiJWKtReaZJFWer AlbbAfHqq8tolonHT8zz3hbdRjPStoHydhr43I2ZveHdPGxFg18Vpnw1h3gjSIwseo6w TWTGIT3xWtWDM6RlyxjbZWw+N+CgEL+vgAYT2fig5CrrHvhtcSvb6oYTDtJP4DC64bPU L+L/SoaWmyCV7pXxFilzCB15IuZ85IfCIhib74Wj5xr/elJqcIvefii+p4/tfXToHv0Z HIxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724862052; x=1725466852; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EQW00/x2G6wANjU9yqsk18zMSEAovjWdHs6u5a2kHnA=; b=R3qvN2+Tz77mkA1EesE4Am2tzyXJIMDWitqV8lCgv4BOAdTSUHntuFsU325a4Mp/53 /cLr36UATLdlVmJDr4b1l8/U+al9Gtt/XdgNVTmP9GNZI+Q78Z9PgzcaDxklPeX5HUV5 CTVg2upeAiIs8VDG0Z0HvK6ck53OPKwrGzvPfpzJPibf+waoVSWEGp42XsncguIobjz5 O0E3TW3d/lOfarbosp/vjTpncE9Bc7vBnh1dqv/59qsBAIT71n++Bv/NTQOIv6dKhftz hUIjckJuhISnnfBiHMSbLPxiWQ9ADkMeGzmCqsU1rHFZDZVWinqK2XIWdai6PFGEbyEh NG3Q== X-Gm-Message-State: AOJu0YzGVLFHiNH4eSEx1Hi0e8xwWrMtfbjCp5TxttS0GRnuQlBjH0UH 4o+juRA1Fds3+/2g0HTCCbHWTdXc1wM8EXms4icBJNkXXo8qP4bXN62CkaHpHwenccUPFJFJnzq AI3axEpyRvhKl0MjuJD4Z8s5Xr79bUuSU X-Google-Smtp-Source: AGHT+IH5FvlTVI2LQ0amxu9YM1/4fQCe0YWxfOEUjqsClcLLFMP2zvTz1NqvjyQqDz+W1HcTzb1fkhaKnoS8TtH/Fxg= X-Received: by 2002:a05:6808:1188:b0:3d9:235b:185a with SMTP id 5614622812f47-3de2a889190mr18745247b6e.18.1724862052295; Wed, 28 Aug 2024 09:20:52 -0700 (PDT) MIME-Version: 1.0 References: <87mskxrqdx.fsf@skimble09.plus.com> In-Reply-To: <87mskxrqdx.fsf@skimble09.plus.com> From: =?UTF-8?Q?Andr=C3=A1s_Simonyi?= Date: Wed, 28 Aug 2024 18:20:41 +0200 Message-ID: Subject: Re: How to auto-renumber chapters To: Sharon Kimble Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::22c; envelope-from=andras.simonyi@gmail.com; helo=mail-oi1-x22c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.80 X-Migadu-Queue-Id: 1960C2099A X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.80 X-TUID: 5sHxK4avXqVl Dear All, On Wed, 28 Aug 2024 at 10:41, Sharon Kimble wrote: > I now have > ** Chapter 2 > blah > ** Chapter 2 > blah de blah > How can I get these new chapters to autorenumber themselves please, so th= at they will show Chapter 2, Chapter 3 one way of doing the required renumbering would be performing a regular expression-based replacement (using the replace-regexp or query-replace-regexp commands) along the following lines: regular expression: ^** Chapter \([0-9]+\) replacement: ** Chapter \,(+ \# 1) This assumes that the headings to be renumbered have the form "** Chapter ##.." and the numbering should start with 1 so might need to be adapted slightly to your use case. best wishes, Andr=C3=A1s > Thanks > Sharon. > - -- > Debian 12.6, Fluxbox 1.3.7, emacs 31.0.50, org 9.7.10 > -----BEGIN PGP SIGNATURE----- > > iQJRBAEBCgA7FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAmbO4qodHGJvdWRpY2Nh > c0Bza2ltYmxlMDkucGx1cy5jb20ACgkQNoGAGQr4g1seWhAAmzZfon0n2x4cJI0L > jjT8fdzNLeDp5vEUA1u3EHEJdtMsufPNIJt3L8kLQaL0+7/WaEboy3N/u/3XyPQz > IioaonnBqO6TAWXoyelpLDof48XI88jEaop/pM5CAaVe7NuPNOI7tkzVcHk53qwE > Kpy1FTVPKx9CyHLC0vOCfwoVKOzUCNfYWIALvK7wWGs5z3BHAqrcYokOdzselPNm > 7eoaJjmHvu+nOFQzUMSJdPgTLE4LfXqBY8Rc7QvodRia4KNe8oHwB1Vr/TqWHIio > ZWfryOyutxAEkCUQD+yYAGD8Fg8h6Gd1GJF6TFea9iJ/cnfnmZjjjY9XwUqHHrOU > jhW+oS8PmTqU1klKDt3PHf5odN0UuD1CEJQ5VvFjfYjmY6OCL36AILxz+WdPnUmg > cT6leq/xZKFLLXVr93irUgFgohzLHBBK4pW6Wv9XsIKSA3n9V1Oyzr2t4DPJjJaL > a5fgSKHGTDpip6mtTG7AS8tkSTamdhaPjDJ9anP1NYV2Lccgx2L4EFUkZcnnqeKq > h+b5zdOqV75z6oHZvWfMyAOi5fd469/pQ7IqYW2u/Gm/uXQ096Pw2q999+9howeA > 3U6PGUgzP1GcynzhMCFSLUsyokBwJeVSfPmQep1+UAWxPuy9YJjeZ9k9S3smTk6Y > aSkmndz1ePMMdQYKS07BPJXhXu4=3D > =3DY4K2 > -----END PGP SIGNATURE----- >