From d6cd1e4a889e5cdf64813a43b7facb77d1d395d1 Mon Sep 17 00:00:00 2001 Message-Id: From: Arnaud Lechevallier Date: Thu, 25 May 2023 15:01:33 +0200 Subject: [PATCH 1/1] gnu: Add emacs-substitute. * gnu/packages/emacs-xyz.scm (emacs-substitute): New variable. --- gnu/packages/emacs-xyz.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 0ea9732bfa..da16f46e8b 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -130,6 +130,7 @@ ;;; Copyright © 2023 Gabriel Wicki ;;; Copyright © 2022-2023 Simon Josefsson ;;; Copyright © 2023 Fabio Natali +;;; Copyright © 2023 Arnaud Lechevallier ;;; ;;; This file is part of GNU Guix. ;;; @@ -9010,6 +9011,34 @@ (define-public emacs-mc-extras comparing characters, removing cursors, and more.") (license license:bsd-2)))) +(define-public emacs-substitute + (package + (name "emacs-substitute") + (version "0.1.8") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~protesilaos/substitute") + (commit "b81bb7789847f3d1645a60422fa080c48b93dd47"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0s1lgpwmdjz17rd4r6qp41agmpqwa9976v1pb55p648zjh0p2vlz")))) + (build-system emacs-build-system) + (home-page "https://git.sr.ht/~protesilaos/substitute") + (synopsis "Efficiently replace targets in the buffer or context") + (description + "Substitute is a set of commands that perform text replacement (i) throughout + the buffer, (ii) limited to the current definition (per narrow-to-defun), + (iii) from point to the end of the buffer, and (iv) from point to the beginning + of the buffer. + + These substitutions are meant to be as quick as possible and, as such, differ + from the standard query-replace (which I still use). The provided commands + prompt for substitute text and perform the substitution outright.") + + (license license:gpl1+))) + (define-public emacs-typo (package (name "emacs-typo") base-commit: 1be6baed2b58a75868cdcc9f51b78624c2fefc4f -- 2.38.1