From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#70820: [PATCH] Editable grep buffers Date: Tue, 7 May 2024 21:11:42 -0700 Message-ID: References: <87seytlhcq.fsf@gmail.com> <87o79hkndt.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2485"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70820@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 08 06:13:01 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4Yft-0000TI-OE for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 May 2024 06:13:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4YfX-0007Dr-1v; Wed, 08 May 2024 00:12:39 -0400 Original-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 1s4YfV-0007De-Ng for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 00:12:37 -0400 Original-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 1s4YfV-0006gQ-5z for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 00:12:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4Yfu-0000Le-1f for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 00:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 May 2024 04:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70820 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70820-submit@debbugs.gnu.org id=B70820.17151415421327 (code B ref 70820); Wed, 08 May 2024 04:13:01 +0000 Original-Received: (at 70820) by debbugs.gnu.org; 8 May 2024 04:12:22 +0000 Original-Received: from localhost ([127.0.0.1]:46537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4YfF-0000LL-Tr for submit@debbugs.gnu.org; Wed, 08 May 2024 00:12:22 -0400 Original-Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:49297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4Yf8-0000L9-78 for 70820@debbugs.gnu.org; Wed, 08 May 2024 00:12:18 -0400 Original-Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1ed0abbf706so27264485ad.2 for <70820@debbugs.gnu.org>; Tue, 07 May 2024 21:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715141503; x=1715746303; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=TUflPv154ye+GVhSCgzK+7uydJ8K28j2sD1y08FMTdA=; b=WQtwJ84VSuKSzsv6iXryXcANy5YD8KdOMFMbAHOYB0sM011DftBhTVENaDHQ/M5Vcm hIVmRvf4iM0FY4VDdUE7oDx/PtTfcaVMgDdHe7c/6g3W0M8DY3gu85t1LDcCJhpPJwdD Y/sxDdwDYsSG2e0YTCCl4jJjBfN7Npb+wlBRnlNo56hEc+Jz9pLXABEU9YlRiEg1pM54 mjdUDQSJEBqCS8Kfz+dHMpLhMAo9BEq4ZwxvcuLvUzZ86wnmDTUugbyWvwOnOjUNvBaz p6batZV1jvI/ISWjd0ZP0h+p0c2yUiKJaYq/FLyZTiSNhXH4xvtT6UyRA09h8COxMkii UCtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715141503; x=1715746303; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TUflPv154ye+GVhSCgzK+7uydJ8K28j2sD1y08FMTdA=; b=YrpNO9PLYglg8PSM8h8o6rKqmLfAzKh45PTpvzkWwAfCW4R9fr1sAo9xAUZs+ro2Jh ldwlL2Ap9b9+OG4zM8g1/+zZhp5/eRTMQwW27yDl02jFxn84K89h4020X6vdbuBGEOhT rJ/Lj0J66Teuf779x88a+AhKTreYCU+/SAuBBYJ4jz+zTLBzZPeB5FRkPOlt8Wd0SDgM Pd3OfoGcpiovw8ywDLE9uiztBRBuKz+N1wsJLatGw9utsmO8bXVF7mnSQpxy3RMTKPln li4LZWlIr5Seqffh6skh4EdBIKTQ65LFISCe+G/rVzbs/oro1+PkLJ9YBn2sQqQUWbfp wjUw== X-Gm-Message-State: AOJu0YxaN/TyLWXOMkC/aLJYH+CdsQBACUFCyN4D45kdE5saBUdnfc6y w7IMNUc8eNqkdq0abPlkQZxoVSLXldsIXpXoC7srhpt+5Cq3gFNl X-Google-Smtp-Source: AGHT+IGiEp1s0iGegMTaZelSsRNpkdI2I4xRE8riKRlPSdSw5F6ghpO2gwo6kyrysbsz/KHdoRJlvw== X-Received: by 2002:a17:902:e852:b0:1e5:9391:1d44 with SMTP id d9443c01a7336-1eeb078f212mr18855925ad.47.1715141502720; Tue, 07 May 2024 21:11:42 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id n10-20020a170902e54a00b001e29c4b7bd2sm10871908plf.240.2024.05.07.21.11.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 21:11:42 -0700 (PDT) Content-Language: en-US In-Reply-To: <87o79hkndt.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284668 Archived-At: On 5/7/2024 8:12 PM, Visuwesh wrote: > Thanks for your input. If I missed something from wgrep that you use, > please let me known. I will play around with wgrep in some time to > learn more about what it offers myself. In addition to the things you mentioned, here are the most important features from wgrep for me: * Mark all non-result parts of the buffer (the command string, file names, line numbers, etc) as read-only. This is especially valuable if you want to use 'query-replace' or similar to modify the results. Then you can't inadvertently edit those bits. * Fontify any results with changes (both in the grep-mode buffer and the original files). This is really useful for being able to see what I've changed. * Adding all the necessary hooks/functions so other grep-like modes can use this. For example, see this file from wgrep, which lets you use wgrep with ag.el: . (This matters to me partly because I'm the author of Urgrep - a "universal recursive grep" mode that can use any grep-like program to do searches. I've added my own support in Urgrep for wgrep.)