From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel =?UTF-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65380: [PATCH] Add command to copy contents in a diff-mode buffer Date: Sun, 20 Aug 2023 02:41:04 +0200 Message-ID: References: <87wmxrwe6h.fsf@posteo.net> <83o7j3z4wm.fsf@gnu.org> <87pm3jwboc.fsf@posteo.net> <83lee7z3xs.fsf@gnu.org> <87jztrvxx2.fsf@posteo.net> <83r0nyyhlz.fsf@gnu.org> Reply-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32228"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65380@debbugs.gnu.org, Philip Kaludercic To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 20 02:42:20 2023 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 1qXWWJ-0008Dl-L9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Aug 2023 02:42:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXWW9-00052i-0P; Sat, 19 Aug 2023 20:42:09 -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 1qXWW1-00052L-IB for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 20:42:03 -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 1qXWW1-0002VK-AF for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 20:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXWW2-00081E-I1 for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2023 20:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Aug 2023 00:42: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.169249207730770 (code B ref 65380); Sun, 20 Aug 2023 00:42:02 +0000 Original-Received: (at 65380) by debbugs.gnu.org; 20 Aug 2023 00:41:17 +0000 Original-Received: from localhost ([127.0.0.1]:52509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXWVI-00080E-LW for submit@debbugs.gnu.org; Sat, 19 Aug 2023 20:41:17 -0400 Original-Received: from sonic301-20.consmr.mail.ir2.yahoo.com ([77.238.176.97]:37028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXWVG-000800-2e for 65380@debbugs.gnu.org; Sat, 19 Aug 2023 20:41:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1692492066; bh=aOovPnEmbXLVEMURlWY5ivTS9/B+znPIfk+LyOmfEB4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=OBijYddfc2M/yvZeiELASHFOsaYTA2WAp3OQGMtoV4zc9gpii2yQJdwpmsRvXE2K59gXSaQhsSljfruP97BfY8AWdOYJSiZHinmDBm6IoyhlBXbUDWqfaAfYauZC+reIWeGeARlFaKZLPCH0OkP5baTwDKx/M1RxIGnK/rnPUbVPl8GP819LG7JXCXMeb40qkJeW92A2ED4BtYFNncZ7EXWLlJrz6FUjWBR7KMd/Uy5bNed5vDWlm6yZ5d8LfyE2Dp41dJHAsaiVXw6h8ls8Tf3TzMaIadU9HOJI1x7NZISrTKMQh3yI7OouXcZH4L65rBjJb+/TzKtIZIQEy97r8Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692492066; bh=F9WuCc8wyDGNe+UFfUmk6IRQ9LVioR6wRwdIJ9lx5YP=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=t6MM4fX43fO2fr93kQalM0crppu9FlURnLWqD1i4qXiSWDjZv+HBel2dWzchhQDOm/BMLnY363rM3te2o4Xfjrg1KVGxKzd1/rYyRE55kI8J+5IrtVklqNDK7/aALquQgV82SLQof44OWP3lf133e/qC0WqEmCGRuagGu+VurIgn5NtkIQNx4E5cGAr1K5p0IYQfCK9TBfbvvByVefTLKHicg3RJQRjCGSzaXlI4jL3yHbat6JcYVd9z8UQQCNfaR0mJlWU1Ge485If7W4Ovrj3uNwjAqLnCdaxHNdTSdYj/cgLxshIi5TOYDFSC5+Nyt8RXL/RzjTMzsSj0phMqnA== X-YMail-OSG: U1.bXawVM1nX4F3g3DOOyMe9yvKjGQFpDO3Am5Vzh1oSlJmkOcg9Oq4V5qKN4Sb 92H4BaeurMekvssqVOwPw027F1RFvUXoTyDhnGEJd13dZM8Y94czkizr4McwMiQSDBYPq_k1t9qa aiHSLwA.8OYvHbLsW.jzXB1kFi2c2BBHjy8vjGSG1j1Ts.eUIMSjhrdE14FPJDU5Ap8sECPYoMWH aPlyyTP6Ql7KeREJDJjQN7DruktUA9AErEhQBZCw9Hvic093FiChUs55eQiFy6YyPHeUCzp1Da3B l5CloAnjtktvYFGnig7wapBmfjmYhoYKy4QlRBLIRPySf3Mg5a7VxW2OtFPRNlmGMgwo0gU9iEiE l1O8gspSPA8vANceHdXv54bSS52tIsFj7wiWQhPYx3ifBdtwILbc8Y0zXpprTU6.JOtlO4uoS2Lc GENVZx4g82xuxJULIVOIRFbsOYcWoJZJ.1_VxJMukIlzS..upw52HAiQKIlsHobv5u2ZruUDsr0N skynPv2duhOs6aL0qVB0.kRdeFGxnlxJPECu8y8326rArrgiOE2b2SSLQ4Bn60akyh5iWfyUbi3u PQajC0hzpl5.jY3QX7oqjtFSEGREW4BYqAwavnEtG5Cu7TlszgNn6vYbox59Oa9lXdOSYoFboYIY hzKs2Gm_koLnI8NqJN8CLdM25GwkhDFqtVHDcSI7xIlzB5XyXEYjJtoQbQUdmryy4uBDpZGjIBf2 i4SXU9vKCYhrVGkBBVm9nljppJVwIVN87PFLIvHXQzqHFiLbuhhj3mnCaA1H.R4ovBHvmvvUFXZ0 UyLicTZ0LFQYnNeQ6E8LZAcOhkEmHGy_p6TBTZeCYE X-Sonic-MF: X-Sonic-ID: 5afd7344-6c74-495e-95a8-9a50c2008414 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ir2.yahoo.com with HTTP; Sun, 20 Aug 2023 00:41:06 +0000 Original-Received: by hermes--production-ir2-5cc57b9c45-mk5d2 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1aceae9d232e5d2e57eeb4fe0cae2681; Sun, 20 Aug 2023 00:41:05 +0000 (UTC) In-Reply-To: <83r0nyyhlz.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Aug 2023 22:09:12 +0300") X-Mailer: WebService/1.1.21732 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:267931 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: 65380@debbugs.gnu.org >> Date: Sat, 19 Aug 2023 15:45:13 +0000 >> >> Eli Zaretskii writes: >> >> > But diffs don't necessarily show the entire body/ies of function(s), >> > they show just part of them. So this seems to be useful only in a >> > very small subset of cases? >> >> In theory yes, but as I mentioned in my first message, it comes up >> surprisingly often, at least to the degree that I think it would be >> something nice to have in general. If you think the current >> implementation is too primitive, one could extend it to check if the >> region is a subregion of a hunk, and handle that appropriately. > > I'd like to hear from more people who will find this useful enough to > have in Emacs. My first thought was that this is something you should > keep as your local extension, but maybe I'm mistaken. I'd find this command useful. When I copy parts of a diff for other purposes, I usually have to remove the diff markers manually.