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 10:37:42 -0700 Message-ID: <434a4b40-900a-6e24-8e8a-9c67a618fb11@gmail.com> References: <87seytlhcq.fsf@gmail.com> <86pltxa40q.fsf@gnu.org> <87jzk5kmwk.fsf@gmail.com> <86ikzoa51h.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="33775"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70820@debbugs.gnu.org To: Eli Zaretskii , Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 08 19:39:10 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 1s4lG2-0008iI-5F for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 May 2024 19:39:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4lFc-0007lX-Bc; Wed, 08 May 2024 13:38:44 -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 1s4lFX-0007lD-7y for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 13:38:41 -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 1s4lFU-0005Lm-Vq for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 13:38:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4lFu-0006Sz-3S for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 13:39: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 17:39:02 +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.171518989724826 (code B ref 70820); Wed, 08 May 2024 17:39:02 +0000 Original-Received: (at 70820) by debbugs.gnu.org; 8 May 2024 17:38:17 +0000 Original-Received: from localhost ([127.0.0.1]:49959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4lFB-0006SL-Db for submit@debbugs.gnu.org; Wed, 08 May 2024 13:38:17 -0400 Original-Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:59416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4lF7-0006S6-G0 for 70820@debbugs.gnu.org; Wed, 08 May 2024 13:38:16 -0400 Original-Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-5d8b887bb0cso6959a12.2 for <70820@debbugs.gnu.org>; Wed, 08 May 2024 10:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715189862; x=1715794662; 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=oNuWEmm839/sWWiUCvy6WLJqsJdXAjdFb9DbmsZhAwU=; b=CzyWn+F567T4V5JA4jI41f1EKhjM025s7Qo2P1K74Mmp182T+uRm3nmMmJQu41hrgs O8ssaH+WhG5HmPvMSjh+6wjrGf+9xatTcszODnxfxLhklP1GeSXsI1Y5DO63FVgme9kZ lI2di/LzE8WQES+Pw1CJnP2jZG2dfkLm0iMIwUGkuNntYf5j+HJDV3zQMdMlYZLoY7oE faKsHu8+vhboNCVuSqbYAOjICXEkpPJgQFRiooDnVPV4pbcDuXYpVDIWlV3iN93+IliU bRuyhFFNGG+HtXf6JjBOkLdQAPjQ9zaLd8o6HkqvZ2F4zYB4uqScJSeiCkTlg//Ui9tM 97qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715189862; x=1715794662; 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=oNuWEmm839/sWWiUCvy6WLJqsJdXAjdFb9DbmsZhAwU=; b=mR8FFJzwkcEzP/LDxa/PhvlipYA4uUeNFdwolpxnhr8xQEMAtgSIcgYRNKUxcR+xrV tFIdmGcFOD/SnG2d3LYPn+A8D70yjEVC6ZXmmkNLniw5lCnP5zJpO/S1jV04BYi4yEEt vHYwgL15TD6lQOI3SoRKGanAgQSsfycBWr5nBgop1mjplKi3Iu2mWqVKYi0rGYQhhCmH e2nbeNRgLKxwE7D3+DuZ99gYoFGzGFDBIqAMyXWsKscxgJJllgWPwzNRDkmMvJpOpjui XOJZtuSbPnENIWonBnh5g7iEKTHeImKIayAsB7Ihzocj4JviNKdrPiRnlFSPdVrDXW+U D2sg== X-Gm-Message-State: AOJu0Yyzp5OiHf3ZKcWOUnT1EnIVN0BX/XFkYoiDGCXJaujlzbvA380U fGONwBdoMzOCvEvJ3Ns/HqVh6YUu1q/6+A7X92gYB4GHUcKQRqXn X-Google-Smtp-Source: AGHT+IG7/sK+9s8kgXodFT9MuAjygUoIvKbLFdrggwWZ3VwDG81MBTQ27Cuy/+HzklVT/n8r6S0KRg== X-Received: by 2002:a17:90a:bb0f:b0:2ab:d82e:1afb with SMTP id 98e67ed59e1d1-2b6165a6785mr3516950a91.16.1715189861838; Wed, 08 May 2024 10:37:41 -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 60-20020a17090a09c200b002b624b0161fsm1873027pjo.19.2024.05.08.10.37.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 May 2024 10:37:41 -0700 (PDT) Content-Language: en-US In-Reply-To: <86ikzoa51h.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:284685 Archived-At: On 5/8/2024 4:58 AM, Eli Zaretskii wrote: >> From: Visuwesh >> Cc: 70820@debbugs.gnu.org >> Date: Wed, 08 May 2024 08:52:51 +0530 >> >> Basing it on occur-edit-mode would be a lot more work I think, but I >> understand your concern wrt it being already established and bug-free, >> etc. This was my original plan but I bailed since the occur buffer's >> text-properties has marker objects (IIRC) but I want to avoid using >> markers since having many buffers open was a personal pet peeve of mine, >> along with the slow-typing experience due to occur's >> after-change-function immediately reflecting the changes in the original >> buffer. The latter is avoided in my patch since we commit the changes >> only at the end so the typing during the edit is smooth. > > I think having similar features that work very differently is not a > good thing for Emacs. So I urge you to reconsider your decisions and > make this more like occur-edit-mode. In particular, I don't > understand the difficulty with using the markers and what does it have > to do with the ability of having many Grep buffers. I agree that using markers would probably be a good idea, assuming I'm imagining things correctly. (In particular, this needs to be robust about what happens if you have a file open with some changes already, run grep to find matches in that file, and then modify those matches.) 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. By waiting until the end to commit the changes, you don't have to worry about what happen to these files. (The only other options I can think of would be to visit those files, which could require opening hundreds or thousands of files at once; or to immediately change the files on disk, which could ruin those files.)