From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#65380: [PATCH] Add command to copy contents in a diff-mode buffer Date: Thu, 22 Aug 2024 06:41:22 +0000 Message-ID: <87o75l9i0d.fsf@posteo.net> References: <87wmxrwe6h.fsf@posteo.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> <86ttfdtf0c.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16183"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65380@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 22 08:42:50 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 1sh1X0-000423-AU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Aug 2024 08:42:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sh1WW-0004ss-KI; Thu, 22 Aug 2024 02:42: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 1sh1WU-0004sQ-Kt for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2024 02:42: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 1sh1WU-0004dh-9i for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2024 02:42:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=S5IC4bG3FJojZds00RxCWeYfvoV8ayTH5T1Su7b3N0o=; b=Oe5TWJ6PsBtSQ+2ko81S3yuwY2EDatGtHqpXhTHTlynTVhi4H3fAOImoMfX6Dey4DCKXXVuJxSMg1d+jp+g7sFpdSzGUiPe32ao41jVymUK1sX/yesWKHMQ4SM0TasTvGFjSNPtm9O28Z8GS9lcbILGRrNrKLgGbe8pWMkB5k2jIzaRxma3S2Xc3pkOCvgAar+XZAdZsTsEGk/afWeDvnIiQslakyQMIe1AOAA5SwhgBqsACRTijk58UHuRFDIJLJLUDgvY0un/Q44szbhe1SuDMX5ShGdeG4V2h5jn2P//meEpK4pqbzxQ/4PCIq9H7cobKMv3zh7neErwrG/llNw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sh1XB-0007iP-N0 for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2024 02:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Aug 2024 06:43:01 +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.172430894429604 (code B ref 65380); Thu, 22 Aug 2024 06:43:01 +0000 Original-Received: (at 65380) by debbugs.gnu.org; 22 Aug 2024 06:42:24 +0000 Original-Received: from localhost ([127.0.0.1]:36597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh1WZ-0007hP-K0 for submit@debbugs.gnu.org; Thu, 22 Aug 2024 02:42:23 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:48461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh1WT-0007gr-5g for 65380@debbugs.gnu.org; Thu, 22 Aug 2024 02:42:21 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AD903240103 for <65380@debbugs.gnu.org>; Thu, 22 Aug 2024 08:41:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1724308884; bh=B0zbsU0Adqk9y/sXtCRCE7rgIerRiL/X2scLYFWmA3Y=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=GEO0NfwzWyIwcPxbNPvXSxAObqyJMIjkuuKSD8wFNdUEOWb72vj2YsDwuHn4iYj9t LmlCGhdvCsIP+2YBvb9UKTFDsrNmkmAluqtmj4FZfamlv04Npmi9OnkkvOfKiU69KG n0n8Y0huQf6XfS87CgtMRMFxVP6FPN5JEczzYLxiURZ9knRUwxkrkdB/YMBJQCm4Ds tV3MLQ+e2XBukTpBIhU62hleZuv/fPwKeRQIqM9J/zacbn5bWluG7Qu1NselIYXAIE xHBXcB1aiG2LpulqmU5ezbNadM9KAouoz8tmCIS4pIqhn5p9Y5yqCK4v+IiHbrpiAd baXJvcPABxaPg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WqDBC6Ntqz9rxF; Thu, 22 Aug 2024 08:41:23 +0200 (CEST) In-Reply-To: <86ttfdtf0c.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Aug 2024 06:25:55 +0300") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=philipk@posteo.net; url="https://keys.openpgp.org/vks/v1/by-email/philipk@posteo.net"; preference=signencrypt 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:290514 Archived-At: Eli Zaretskii writes: >> 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. No, your understanding was ring. I'll go ahead and use your suggestion then. Is there anything else left to discuss? > Thanks. -- Philip Kaludercic on peregrine