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: Wed, 8 May 2024 12:19:41 -0700 Message-ID: References: <87seytlhcq.fsf@gmail.com> <86pltxa40q.fsf@gnu.org> <87jzk5kmwk.fsf@gmail.com> <86ikzoa51h.fsf@gnu.org> <434a4b40-900a-6e24-8e8a-9c67a618fb11@gmail.com> <86ttj887rp.fsf@gnu.org> 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="3489"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70820@debbugs.gnu.org, visuweshm@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 08 21:21:03 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 1s4mqc-0000nt-V8 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 May 2024 21:21:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4mqG-00012Z-2R; Wed, 08 May 2024 15:20:40 -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 1s4mqD-000127-EC for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 15:20: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 1s4mqC-0003fi-K0 for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 15:20:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4mqb-0001xT-R4 for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 15:21:01 -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 19:21: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.17151960187501 (code B ref 70820); Wed, 08 May 2024 19:21:01 +0000 Original-Received: (at 70820) by debbugs.gnu.org; 8 May 2024 19:20:18 +0000 Original-Received: from localhost ([127.0.0.1]:50424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4mpt-0001wv-Lr for submit@debbugs.gnu.org; Wed, 08 May 2024 15:20:18 -0400 Original-Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:55450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4mpq-0001wn-Sn for 70820@debbugs.gnu.org; Wed, 08 May 2024 15:20:16 -0400 Original-Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6edc61d0ff6so137309b3a.2 for <70820@debbugs.gnu.org>; Wed, 08 May 2024 12:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715195983; x=1715800783; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=1trAe2O73xJOD/6WfBvTE2XoOG6/rFFgg/flbKMKqCk=; b=c4JOMqjnRZFaZRJlTj6zjNymG3rYLpB4/a/ySyAT6O+oz29YGVAaLK7YA5znO4AWN4 jGTQj/cdotsWZgzDhFmas8Sy7Gwk6OgQu/QpcKoqm2AnoOjP8qIELGgSFN34DcEuRcw+ Z0DztYdtxja66ScFE3STOWbg53SFh8qwvKn0MRL4UXNSL7mEfTHbvFXyLR9RF2N/SG5Q wHEV61VgTTN0bqCKMsfipda3DlPZEhYLE0gEiZvjUb4GvRuByrWs8H1bil/Q5q2MKqMn eC1Q1q61WeYllL3/1tlPOC8UK8gJCy3O9bSTfZXKO6/J3wyJ9G39n6B6pOIMyPBGUkqA X0sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715195983; x=1715800783; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1trAe2O73xJOD/6WfBvTE2XoOG6/rFFgg/flbKMKqCk=; b=H0Pt8kV+b2aDPFsxoVH6KyhZUGONifVNo8Rz7SY5oVw624aHJT2LZvaeJhs38kD0Hu 8Bhzyx5RSLMDJl/UtR8dlZPZQuddq6TDwVflLanja3rmHhq+ATWYU+U1Jn2FjkSaPf3R Sqa7+6hnWexW8NN8D7+gJoBq/5mU5GfkQWwT0J6rSpb8Ya70o+cKf6oF3sWPrgXZ0c1C /JABIjpV2elIzEGHv6csdgyTCIjGr+YiMLvxJ6oKR1N+oYuFqLRJWoBA2woyOXX01VT4 /D95dj+1NvKS8A2gJoaCVblr5Ee0jomNGVzAgC6ePOg48lR/Wra/SaCKg1HZgXIFB3l0 qzxw== X-Gm-Message-State: AOJu0YyoH+s1hWzUvdYFs5mPHqYF4mPeFeojtMTDllL/boYKyEuoovfF /BlgFsvb/dD0lo1YHUYKO3cAkbKDxpRwsVuzcm/Zkw4LX7JKN00R X-Google-Smtp-Source: AGHT+IE2xu/CMvF4Y/teUWtdZAbRbrmQniJuKxl279ixZT7cuTlZlCGscYhbzKAm5HXOpVtk4FdKsA== X-Received: by 2002:a05:6a00:6309:b0:6ed:e1c:102e with SMTP id d2e1a72fcca58-6f49c2a38d4mr3429686b3a.24.1715195983099; Wed, 08 May 2024 12:19:43 -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 u10-20020aa7838a000000b006f456b23f90sm8343399pfm.31.2024.05.08.12.19.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 May 2024 12:19:42 -0700 (PDT) Content-Language: en-US In-Reply-To: <86ttj887rp.fsf@gnu.org> 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:284692 Archived-At: On 5/8/2024 11:42 AM, Eli Zaretskii wrote: >> Date: Wed, 8 May 2024 10:37:42 -0700 >> Cc: 70820@debbugs.gnu.org >> From: Jim Porter >> >> However, I agree with Visuwesh about not committing changes until the >> end. For the grep case, you could have results in many, many files, >> including (especially?) ones not open in Emacs yet. > > I don't see why. Grep shows all the matches in one file before it > goes to the next. So each time you edit the matches, you have just > one file to care about, right? Or what am I missing? One of the ways I use wgrep is that I first search across my entire repo for some matching lines. Then, I activate wgrep and use query-replace to mass-change all those lines. (I use the "!" key with query-replace to tell it to change everything without prompting once I'm happy with my command.) This frequently involves me changing dozens of files at once even for relatively small projects. Maybe there are better ways to perform this sort of action, but I find this method very useful because it shows me the steps along the way so that I can check my work before I commit to changing all those lines. I also don't have to manually step through each change once I'm happy with what I see.