From patchwork Wed Oct 30 03:14:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suhail Singh X-Patchwork-Id: 69629 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0077327BBE2; Wed, 30 Oct 2024 03:15:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6BEA727BBE2 for ; Wed, 30 Oct 2024 03:15:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5zAm-0000JG-6d; Tue, 29 Oct 2024 23:15:04 -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 1t5zAl-0000IQ-4z for guix-patches@gnu.org; Tue, 29 Oct 2024 23:15:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5zAk-0001NT-SD for guix-patches@gnu.org; Tue, 29 Oct 2024 23:15:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=BmfSTjmCC5Oh0CZFOWj2CVKBdbyT4X3I37EVINADI4Y=; b=uASXuGEMkn3ab/oNjhdr2LuhC5FL/LnHAGVsXUuY6PdZmRdLXFQkJqDqX92sKhMdnCWHY5U1UryQGWete+DU3Q9YBw6MPBZoJue1dlgV/4gQiusdQaO+nIqKpJHCj2DNy5obHPhe+PPh1+O0NZkikF9uWdOBoJ5JrrjV9wqct/7i7tbcpjoDIsL69+O7LdFQEFJS8lFY4R7t4i+9YvqAy8UDC0qpZDJcSsmvB7YEiF4whLXn9vXI0Jamrd9ZyE2NjL73nT6lr8LlmRFmM7XeZttoqkalVS70ePNuN7el9sCuyBXfIxqGgeVHOfrYHfrR5UG9WF01D5a4lZUdNODMkw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5zAk-0006OQ-KW; Tue, 29 Oct 2024 23:15:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#74100] [PATCH] gnu: Add emacs-visual-replace. Resent-From: "Suhail Singh" Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 30 Oct 2024 03:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74100 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74100@debbugs.gnu.org Cc: Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler X-Debbugs-Original-To: Guix-patches mailing list X-Debbugs-Original-Xcc: Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler Received: via spool by submit@debbugs.gnu.org id=B.173025808324547 (code B ref -1); Wed, 30 Oct 2024 03:15:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Oct 2024 03:14:43 +0000 Received: from localhost ([127.0.0.1]:60682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5zAQ-0006Nr-F2 for submit@debbugs.gnu.org; Tue, 29 Oct 2024 23:14:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:57408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5zAO-0006Nf-Fa for submit@debbugs.gnu.org; Tue, 29 Oct 2024 23:14:41 -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 1t5zAG-0000GB-Up for guix-patches@gnu.org; Tue, 29 Oct 2024 23:14:33 -0400 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5zAF-0001MZ-7A for guix-patches@gnu.org; Tue, 29 Oct 2024 23:14:32 -0400 Received: by mail-qk1-x741.google.com with SMTP id af79cd13be357-7b1474b1377so481833085a.2 for ; Tue, 29 Oct 2024 20:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730258070; x=1730862870; darn=gnu.org; h=mime-version:date:message-id:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=BmfSTjmCC5Oh0CZFOWj2CVKBdbyT4X3I37EVINADI4Y=; b=KyMwGE6yfN9AbZdYRiXrcDzURCtt+1KdlpfeCt8fdagYgwnftQAYLTu4LyRpF4HLK1 3/InB2s2pUv+c0OKWxOT43pomnNXkU4KSJ12GcVDvPqDb+vLSonjf792AZCokX6dqcZ3 VFgu/QmlC9UssUZU997k+Wz03JGFOTStn/sLe+5OaXsn9n3Dj+7VOtdWwvrY/TKXc9nl wziQ3F2dW3ZfgrjWpXWRYgvQtLyLSkd+R8qaB2dNX6pzNvD78Fjp2DWIuCktfEbkXyNa TAE7wrfyFMvC24R4bOAJ6nRyjU/NXy3yxE7ZahNhj7guLhVOjDWZEA1Gbwbpwq6vxuwd 1OMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730258070; x=1730862870; h=mime-version:date:message-id:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BmfSTjmCC5Oh0CZFOWj2CVKBdbyT4X3I37EVINADI4Y=; b=DWqkxUIpt92LIGU6JpThTJCCCXROTnUg7EFmX1yCQcxCV5+c1AaVx8xctyx9Oe9A50 nqhd/eGVcl9eUW5QsWr4/LwYaQEb0hnnAcCnrA4T3SbKk9Boim9scPbbFERWj34IxlpW 1uJDUUrQHQiJ9Py0mqwTPqMkNb8FcJsYjqUGi+GpcRcujEDgp2qODl1oVQVvuvBInmyE ZcVXR3Kgw5DYWDL9hwEDuEeGTLrhOCfAK7cW6VVYwDV53MWR+98sJZITJmsHzdUX2Mbp 7JyTc5r1du0nZcf0ssVSqLlaOlN1uKZqLCx72YskdR6SLw/zlfocx2rPZu0AcDcMGXWL vvmg== X-Gm-Message-State: AOJu0Yywk/4ykavlywIZ93MHMMSVKGpGPH13n4QcDbE0cJ3oiNU0BPU4 1bFdryvE3hTC+SKk0HjWN4ffg8WosKPROJfDhhvBlNXcqAXXNvke+xSC6A+q X-Google-Smtp-Source: AGHT+IEG3T+UofTP6WfjbZ1NG7FW54mhXjVUgq2eMmKkzEB7ftCnabbShWVpfApv4ZcyILrL/TR6jA== X-Received: by 2002:a05:620a:4481:b0:7b1:4b2e:3c0 with SMTP id af79cd13be357-7b193ee4edfmr2278705285a.14.1730258069866; Tue, 29 Oct 2024 20:14:29 -0700 (PDT) Received: from gnus ([174.92.178.190]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b18d331a1dsm477635485a.79.2024.10.29.20.14.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 20:14:29 -0700 (PDT) From: "Suhail Singh" Message-ID: <16e50046314ebabd8ef0993065342b5afda4c114.1730255311.git.suhail@bayesians.ca> Date: Tue, 29 Oct 2024 23:14:18 -0400 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::741; envelope-from=suhailsingh247@gmail.com; helo=mail-qk1-x741.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/emacs-xyz.scm (emacs-visual-replace): New variable. Change-Id: I7c579785ed6b0e2989d16fb0b100e9860e8f38b9 --- gnu/packages/emacs-xyz.scm | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) base-commit: a9c33e9f688fce88aed610ab04c650efb71b4ce6 diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 488b4cb5d7..367cafdd85 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -16175,6 +16175,68 @@ (define-public emacs-visual-fill-column window edge.") (license license:gpl3+))) +(define-public emacs-visual-replace + (package + (name "emacs-visual-replace") + ;; XXX: when updating version, please ensure substitution in install-info + ;; phase is still accurate. + (version "1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/szermatt/visual-replace") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "085dg77wpa371i8lvsl9ckm09yfjvqwym6wrs8lxfvih5jd7mm1b")))) + (build-system emacs-build-system) + (arguments + (list + #:tests? #t + #:phases #~(modify-phases %standard-phases + (add-before 'check 'add-test-dir-to-emacs-load-path + (lambda _ + (setenv "EMACSLOADPATH" + (string-append (getcwd) "/test:" + (getenv "EMACSLOADPATH"))))) + (add-after 'install 'install-info + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (info-dir (string-append out "/share/info"))) + (invoke "eldev" "build" "--force" + "visual-replace.texi") + (with-directory-excursion "docs/build/texinfo" + (substitute* "visual-replace.texi" + ;; XXX: Undo damage caused by sphinx-build + (("visual-replace ([^,]+), Jan 01, 1970" _ ver) + (string-append "visual-replace " ver)) + (("@copyright\\{\\} 2020-1970") + "@copyright{} 2020-2024")) + (invoke "make" "info") + (install-file "./visual-replace.info" info-dir) + (copy-recursively "./visual-replace-figures" + (string-append info-dir + "/visual-replace-figures"))))))) + #:test-command #~(list "eldev" "--use-emacsloadpath" "-dtTC" "test"))) + (native-inputs (list emacs-eldev python-sphinx texinfo)) + (home-page "https://github.com/szermatt/visual-replace") + (synopsis + "Alternate interface for @code{replace-string} and @code{query-replace}") + (description + "@code{visual-replace} provides an alternate interface for search and +replacement commands that supports previews. The interface also allows one to +edit both the query-text and its replacement in the same minibuffer prompt. +The interface covers the following commands: + +@enumerate +@item @code{replace-string} +@item @code{replace-regexp} +@item @code{query-replace} +@item @code{query-replace-regexp} +@end enumerate") + (license license:gpl3+))) + (define-public emacs-writeroom (package (name "emacs-writeroom")