From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65380: [PATCH] Add command to copy contents in a diff-mode buffer Date: Thu, 22 Aug 2024 06:25:55 +0300 Message-ID: <86ttfdtf0c.fsf@gnu.org> References: <87wmxrwe6h.fsf@posteo.net> <83r0nyyhlz.fsf@gnu.org> <86o7j2qgmc.fsf@mail.linkov.net> <83cyzhwpcj.fsf@gnu.org> <87a5ultvuy.fsf@posteo.net> <83a5ulwos6.fsf@gnu.org> <87fs4bgwuj.fsf@posteo.net> <83fs4btiw1.fsf@gnu.org> <871q2n152u.fsf@posteo.net> <87frr1zw6i.fsf@posteo.net> <864j7hzviv.fsf@gnu.org> <87bk1pztsr.fsf@posteo.net> <861q2lzp70.fsf@gnu.org> <87ed6kxq5j.fsf@posteo.net> <86le0rwhlx.fsf@gnu.org> <87y14rv1ie.fsf@posteo.net> <86bk1nwdcj.fsf@gnu.org> <87ttffupsi.fsf@posteo.net> <86v7zvujbf.fsf@gnu.org> <87plq2vpx1.fsf@posteo.net> <86bk1muh4f.fsf@gnu.org> <87wmk9acmm.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23067"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65380@debbugs.gnu.org, juri@linkov.net To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 22 05:29:36 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 1sgyW0-0005rR-62 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Aug 2024 05:29:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgyVk-0003SZ-NO; Wed, 21 Aug 2024 23:29:20 -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 1sgyVi-0003Ry-Ad for bug-gnu-emacs@gnu.org; Wed, 21 Aug 2024 23:29:18 -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 1sgyVi-00046n-1h for bug-gnu-emacs@gnu.org; Wed, 21 Aug 2024 23:29:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=S06Buu5jt3k5tGI3i8Ea04GIhZ8Wl4702scEEttnM+M=; b=n7wC2R/yEPZ47hweFLdEK8doqWPeV72on+HMv7tQn6lI9kdf7KvqZw5zhcberZV5dPkAuimsD0IStXeoYG6JaVZrDkZQ3j2gTWhBoy59d/bZUL/ktDFIzdy3hL3h2ay7n8AxsjC6y9C+JkLrFZofckAuz6TVI9kwkK/sEo6/vc/SoTdPh9EgCS7j28eB1mDvdIq0/i/2bjAL6v2wgPqny2j8jyJEn4oZOEHKmLIQUEzAuLA55eYsGLHmV1aXW5ZSZGQrU4Iq2wlFBANRjz6jdr7RH6zZB9+54zOJcpgp1WQ4e8w8nBEuS9IKTG/3t64HrAj34U+CALkC/X5nACETrw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sgyWQ-0002Ct-Rm for bug-gnu-emacs@gnu.org; Wed, 21 Aug 2024 23:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Aug 2024 03:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65380 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65380-submit@debbugs.gnu.org id=B65380.17242973608407 (code B ref 65380); Thu, 22 Aug 2024 03:30:02 +0000 Original-Received: (at 65380) by debbugs.gnu.org; 22 Aug 2024 03:29:20 +0000 Original-Received: from localhost ([127.0.0.1]:36537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgyVj-0002BX-OY for submit@debbugs.gnu.org; Wed, 21 Aug 2024 23:29:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgyVf-0002BE-VH for 65380@debbugs.gnu.org; Wed, 21 Aug 2024 23:29:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sgySe-0003uD-L0; Wed, 21 Aug 2024 23:26:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=S06Buu5jt3k5tGI3i8Ea04GIhZ8Wl4702scEEttnM+M=; b=AHk69EWoNov2 scV1fNIrnpckbqTxuDalJtmztXXHOK4YDnUu6GyE1VUtrUBpiTRj9qh3tbKS3mw8FFKpDGzKHsSwW GHXyXetPkmyawgWGa8sDFvVVMzcSwKK16SJXK8bwdiyBSnlb7zlbQoVmCKRbwGe3I/ISP6iiG684B Ug5vSrID7rfF0CInO2S7++hIXzw93M0hvPeCoazVqPnpUhzxV0IzWq9wdnWpVyhc+HL6im8kN1DwR Zpqsj8ZrSAcbg2viQCkJlZjWqb2NVwZ89KA0QOhmZ2sOTibRNWtDQiYEAvX1+LqEBqhYr210DGwIN 6/vZulAyybfU6jEoeedJGw==; In-Reply-To: <87wmk9acmm.fsf@posteo.net> (message from Philip Kaludercic on Wed, 21 Aug 2024 19:40:01 +0000) 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:290511 Archived-At: > From: Philip Kaludercic > Cc: juri@linkov.net, 65380@debbugs.gnu.org > Date: Wed, 21 Aug 2024 19:40:01 +0000 > > Ugh, I forgot to amend by last patch, this is the current version: > > This command copies to the 'kill-ring' a region of text modified > according to diffs in the current buffer, but without applying the > diffs to the original text. If the selected range extends a hunk, the > commands attempts to look up and copy the text in-between the > hunks. > > I am thinking about splitting the first sentence up into > > This command copies text out of a diff to the 'kill-ring'. By default > it will use the text the diff would modify, without having to apply a > hunk. If the selected range extends a hunk, the commands attempts to > look up and copy the text in-between the hunks. > > WDYT? Two comments: . "copies text out of a diff" is hard to understand. My understanding is that it takes the original text, modifies it using the diff hunks in the region, and copies the result to kill-ring. That's what I tried to describe in the first sentence that you now want to split. If that interpretation is correct, then "copies text out of a diff" makes it much less clear. . The split version says "by default", but doesn't clearly say what will happen "not by default". If the next sentence is that "non-default" case, then it is better to join these two sentences: "By default, ..., but if the selected text extends a hunk, ...". And in that latter case, I'm not sure I understand the significance of "by default", to tell the truth. Or maybe I simply misunderstand what the patch does, as I'm not an expert on diff-mode and don't know well enough what the various functions you call do. But then neither will the prospective reader of this NEWS entry. Thanks.