From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#70820: [PATCH] Editable grep buffers Date: Wed, 08 May 2024 08:52:51 +0530 Message-ID: <87jzk5kmwk.fsf@gmail.com> References: <87seytlhcq.fsf@gmail.com> <86pltxa40q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5904"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70820@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 08 05:23:57 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 1s4XuP-0001Qw-Mt for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 May 2024 05:23:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4Xu9-0007wA-NV; Tue, 07 May 2024 23:23:42 -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 1s4Xu5-0007vi-Ex for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 23:23:38 -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 1s4Xu5-0004mP-6u for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 23:23:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4XuT-0008Ep-TA for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 23:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 May 2024 03:24: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.171513860731594 (code B ref 70820); Wed, 08 May 2024 03:24:01 +0000 Original-Received: (at 70820) by debbugs.gnu.org; 8 May 2024 03:23:27 +0000 Original-Received: from localhost ([127.0.0.1]:46351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4Xtv-0008DW-4A for submit@debbugs.gnu.org; Tue, 07 May 2024 23:23:27 -0400 Original-Received: from mail-oa1-x44.google.com ([2001:4860:4864:20::44]:49250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4Xts-0008DA-S8 for 70820@debbugs.gnu.org; Tue, 07 May 2024 23:23:26 -0400 Original-Received: by mail-oa1-x44.google.com with SMTP id 586e51a60fabf-23e94f0788aso2045726fac.2 for <70820@debbugs.gnu.org>; Tue, 07 May 2024 20:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715138574; x=1715743374; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8fFHZUUDIWyFatsN/E7uXxfuYJMj2SJD4OQomr5vmJo=; b=XB1mtAFriLJmynB6FvVUnpQPAz2YCC6UxEhtTB0SiOCKy4edNEdSQBckBp5T+ZCYFr kNddebidsRKblgufnYzKTIF7dpGQkmD7o8/ndgtUfAnT+IlLjxZt+nZrDaHbt6jQRPPp JaPi5dPLhfxZh5zVWWXiIB/TMa88qlNII3K+axWIJLS6EOepZNV2MMs3di75ChZB4UUU rENrq418E+Llrj5EDPR1kgZo5+Ari/nL4fzFNIrJ/QJGvVHkGd95etIwoF9IoH/WSYi+ alm9lRRm2xdhYIn89sflANZc/qQ1MCuyGtEGHvDTdLGXWVS4bclBFbEpQCrPmBsfIa0M UG5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715138574; x=1715743374; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8fFHZUUDIWyFatsN/E7uXxfuYJMj2SJD4OQomr5vmJo=; b=IYqjF7kZHlGz0QqcHPwfzKIoC+uVs1X5t8JEB0Aub46UDJAoxEKSiYYqnCqfRe+7mJ be33tFw+9gOyLb/vtgXSk3XpFgZg+Z3VHm4pOTu1JKX/+hOTJZxwqIH7CTW9mNyvkf7+ RUkQUtQGzNL9Rdd7UR6JVLJNChnysI1oBj7fH9mHIl5kZLBkVLG4tOxVF8N2lqbGxQHc 8r4CgNlkhPDWy0DvJ+OqJU0d+7dzkqhnr/c7p1USRz17P9D+sS2mql+26Hs4iWSuwZ9S Faoe5pnYodBQh49pNm4Ycqqy2ICYmGCjN5la7+doP2zVZnfcimHJpQzBlMQGXiMg/Jap wDjg== X-Gm-Message-State: AOJu0YxzkdqxL68VB3QaQL9cFy8cLrrBRX2uLmOCClRbatj61pPsdTRR grFKnxPHW4X/LFXOh4WAlHvk/ARIDhgO0nwpHYZKc2oJGAzR6FscYJ6jlrS6 X-Google-Smtp-Source: AGHT+IGGwXG2bhdybmCKC6UJ2gibKOEJJWkz6rhPdBZqDe+xRqlMdgDWbV8600ZgjSJS2lULnzkQmQ== X-Received: by 2002:a05:6870:9619:b0:229:ce58:477a with SMTP id 586e51a60fabf-2409891f318mr1579723fac.19.1715138573702; Tue, 07 May 2024 20:22:53 -0700 (PDT) Original-Received: from localhost ([49.204.130.239]) by smtp.gmail.com with ESMTPSA id f17-20020aa78b11000000b006f45e7121a2sm6450282pfd.41.2024.05.07.20.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 20:22:53 -0700 (PDT) In-Reply-To: <86pltxa40q.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 07 May 2024 21:08:37 +0300") 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:284667 Archived-At: [=E0=AE=9A=E0=AF=86=E0=AE=B5=E0=AF=8D=E0=AE=B5=E0=AE=BE=E0=AE=AF=E0=AF=8D = =E0=AE=AE=E0=AF=87 07, 2024] Eli Zaretskii wrote: > [...] > Thanks for working on this. > > I wonder if this could be somehow either based on=20 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. > or at least have the > same look-and-feel as occur-edit-mode, which provides a very similar > feature in *occur* buffers. This is what I am aiming for ideally since I am a fan of its interface myself (preferring it over xref). The major difference between occur-edit-mode and my patch's grep-edit-minor-mode is that it is implemented as a minor mode: I chose a minor-mode because all the buffer local variables that are required to make the commands from the *grep* buffer functional are killed when switching major-modes (so even g doesn't work!). We could work around this by marking the relevant variables permanent-local but this feels unclean? The other difference that I can see now: the filename and the line number parts aren't marked read-only so it can be edited when grep-edit-minor-mode is active. I will mark them read-only to have the experience closer to occur-edit-mode.