branch: externals/substitute
commit 63818140b432212ea2d5314a27469c53535b61f8
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Update to substitute version 0.4.0
This version iterates on an already stable package. It introduces a
few new commands while making minor internal refinements.
The new commands work exactly like those already on offer, except for
their scope of application. Remember that Substitute targets either
the symbol/word at point or any occurrences of the currently marked
characters/text within the given scope and replaces them with the
user's input. The scope is something like "current function
definition", "current paragraph", "from here to the end of the
buffer", et cetera. The substitution does not move the cursor.
The new commands:
- 'substitute-target-in-outline': Substitute the target across the
current outline level. The outline is determined by the buffer-local
value of the variable 'outline-regexp'. For example, in Org mode the
current outline level includes the heading and any text below it but
not any subheadings.
- 'substitute-target-in-page': Like the above for the boundaries of
the current page. A page is determined by the buffer-local value of
the variable 'page-delimiter'.
- 'substitute-target-in-paragraph': As above for the current
paragraph. Note that in programming modes a "paragraph" is not
necessarily the same as with prose (where, in their simplest form,
paragraphs are delimited by empty lines). Substitute highlights all
matches by default, so users should notice the difference right away.
- 'substitute-target-in-defun-and-below': This works in the scope of
the current definition (per 'narrow-to-defun') but only from point
onwards. It is the counterpart to the commands we always had in
'substitute-target-in-defun'.
---
README.org | 17 +++++++----------
substitute.el | 2 +-
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/README.org b/README.org
index 2ca0d3b8ce..506242ddfe 100644
--- a/README.org
+++ b/README.org
@@ -4,9 +4,9 @@
#+language: en
#+options: ':t toc:nil author:t email:t num:t
#+startup: content
-#+macro: stable-version 0.3.0
-#+macro: release-date 2024-05-20
-#+macro: development-version 0.4.0-dev
+#+macro: stable-version 0.4.0
+#+macro: release-date 2025-11-29
+#+macro: development-version 0.5.0-dev
#+export_file_name: substitute.texi
#+texinfo_filename: substitute.info
#+texinfo_dir_category: Emacs misc features
@@ -134,7 +134,6 @@ symbol at point (i) throughout the buffer, (ii) limited to
the current
definition or outline, (iii) from point to the end of the buffer, and
(iv) from point to the beginning of the buffer. Variations of these
are also available ([[#h:577fa565-b43a-4e8a-939a-5b08837c1cb1][Substitutions
by their scope of application]]).
-[ Variations are available as part of {{{development-version}}}. ]
These substitutions are meant to be as quick as possible and, as such,
differ from the standard ~query-replace~ (which I still use). The
@@ -184,23 +183,21 @@ active region. The differences in scope are as follows:
the subheadings and their text. In programming modes the outline
might be the same as the current definition, or could be a longer
stretch of text. It depends on the buffer-local value of the
- variable ~outline-regexp~. [ The ~substitute-target-in-outline~ is
- part of {{{development-version}}}. ]
+ variable ~outline-regexp~.
#+findex: substitute-target-in-page
6. ~substitute-target-in-page~: Substitute the target within the
boundaries of the current page. A page is demarcated by the
- buffer-local value of the variable ~page-delimiter~. [ The command
- ~substitute-target-in-page~ is part of {{{development-version}}}. ]
+ buffer-local value of the variable ~page-delimiter~.
#+findex: substitute-target-in-defun-and-below
7. ~substitute-target-in-defun-and-below~: Substitute the target
within the boundaries of the current definition only from point
- onwards. [ This is part of {{{development-version}}}. ]
+ onwards.
#+findex: substitute-target-in-paragraph
8. ~substitute-target-in-paragraph~: Substitute the target within the
- boundaries of the current paragraph. [ Part of {{{development-version}}}. ]
+ boundaries of the current paragraph.
** User options for the substitution commands
:PROPERTIES:
diff --git a/substitute.el b/substitute.el
index fb810cbbba..4609dcdca4 100644
--- a/substitute.el
+++ b/substitute.el
@@ -5,7 +5,7 @@
;; Author: Protesilaos Stavrou <[email protected]>
;; Maintainer: Protesilaos Stavrou <[email protected]>
;; URL: https://github.com/protesilaos/substitute
-;; Version: 0.3.1
+;; Version: 0.4.0
;; Package-Requires: ((emacs "27.1"))
;; This file is NOT part of GNU Emacs.