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#65380: [PATCH] Add command to copy contents in a diff-mode buffer Date: Sun, 20 Aug 2023 17:34:43 -0700 Message-ID: <2c3c9bbf-8c1f-fcb8-3bf9-95b0f776fb6d@gmail.com> 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> <3bee8689-f8b7-117e-0165-34df01366901@gmail.com> <22de08b62b5abe7309b8@heytings.org> <7896ab38-c938-2f08-806b-3543e8b64173@gmail.com> <22de08b62b886f50c32f@heytings.org> <22de08b62b10f30b4d4c@heytings.org> <22de08b62bdcabe4be0b@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30901"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65380@debbugs.gnu.org, Eli Zaretskii , Philip Kaludercic To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 21 02:35:14 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 1qXst0-0007ou-BP for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Aug 2023 02:35:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXsso-0002PH-Du; Sun, 20 Aug 2023 20:35:02 -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 1qXssm-0002P5-Rd for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 20:35:00 -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 1qXssm-0000Jn-Jz for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 20:35:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXsso-0006u2-3y for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 20:35: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: Mon, 21 Aug 2023 00:35: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.169257809426514 (code B ref 65380); Mon, 21 Aug 2023 00:35:02 +0000 Original-Received: (at 65380) by debbugs.gnu.org; 21 Aug 2023 00:34:54 +0000 Original-Received: from localhost ([127.0.0.1]:55074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXssf-0006ta-PO for submit@debbugs.gnu.org; Sun, 20 Aug 2023 20:34:54 -0400 Original-Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]:53599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXsse-0006tO-Ds for 65380@debbugs.gnu.org; Sun, 20 Aug 2023 20:34:52 -0400 Original-Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6bcaa6d5e2cso2412482a34.3 for <65380@debbugs.gnu.org>; Sun, 20 Aug 2023 17:34:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692578085; x=1693182885; 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=bmm0dxvIxkyshZvVxRAETmJ4c90CDHBJG5YSD44A19Y=; b=qNADYIxO9OpwDKFLWRqk/pp5ynxx+KBlyMgA115HFb0N9ix2/LEzKA/wJGjxcCYPES AWOHnMXqX2Iai7XVjHm1ml9ZRYY1bQIqruIjTsOx/IZnsqCDgo7uvqJCclGS5iDqDLlh xlmaNFgLPO+cVOfeUYDJxNXuu/E1+pobE0q/qh7vL5qB86n9v4VmNy6PoBXy4m2evUt3 i6Ic1W4i6PjGc0cDFx8x3+QbFVbwt6J7yS4gp/SsbywazyTwMwnEBBCDvgvZ90+DViyd uT8eobW/RHHXC4duQUAlOUHjYn284D/cEY3YlOL9AGlRDU6DvIYqjF+PBbMXu+0iAkK2 t9gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692578085; x=1693182885; 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=bmm0dxvIxkyshZvVxRAETmJ4c90CDHBJG5YSD44A19Y=; b=Q9GqsfDoydQEwrY84DqnoOYsW0j5kINtiqEybNbfhcw61gKB6yrsazXQ0VHHVnq06a MMAe1yIGLLqMiEsSikce8kViST9DhAES4CiXbwfeyDlLbtGtlFn/oIEVHSK8Pm2jdmDo RBTypkBD33q4oyie+o3FRx9fNZVFegoLXZxZzx6H26CG0RUzdpPuelb/UHZSy5O+ziRN SDF6XFrLOR5itm5zLcGPXXM+agCBEIL5ArwY0p+iEmIYiRMZhoo0dkk/D4vzvePDjMt/ P2ahgdFJ2R51iwmpQfAhRTT6kHuCuHi5Z/iMdi9+mI+OR8FkHULolATcnBNcWK+vYjzm ZVZw== X-Gm-Message-State: AOJu0Ywf7zmIdO3ChN/zSaBUCJimm7I6Bh8IzWK4o+0jOMFEe8NPo82R akk4NkOBSHAHk7V71pvvrsM= X-Google-Smtp-Source: AGHT+IGG3xmakr9+zxI0OhWEGXtQvxWrE2gz0Yfqti58JPt64B0eraFRfwTFbkgIub3SI95G8BSqDA== X-Received: by 2002:a9d:7c93:0:b0:6bc:f20a:3b65 with SMTP id q19-20020a9d7c93000000b006bcf20a3b65mr6772638otn.23.1692578084730; Sun, 20 Aug 2023 17:34:44 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id z19-20020a63e113000000b005646e6634dcsm5266537pgh.83.2023.08.20.17.34.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Aug 2023 17:34:44 -0700 (PDT) Content-Language: en-US In-Reply-To: <22de08b62bdcabe4be0b@heytings.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:268047 Archived-At: On 8/20/2023 4:39 PM, Gregory Heytings wrote: >> I would do something else: a command to move the killed rectangle to >> the kill-ring.  And perhaps a command to do the opposite: transform >> the last item of the kill-ring into a killed rectangle. >> > > And here are the two commands I had in mind: [snip]> WDYT? Hm, it could work. I'm not sure we *need* to be able to go from the kill ring to 'killed-rectangle', but if people are happy with the implementation, I don't see a problem. I wonder how this would interact with 'rectangle-mark-mode' though. That puts the killed rectangle on the "regular" kill ring, but applies a 'yank-handler' text property to the killed rect. 'rectangle-mark-mode' might need its own implementation for this. (Either not setting 'yank-handler' when killing or having a way of ignoring the 'yank-handler' when yanking?) (I also wonder if it would make sense for the "normal" rect commands like "C-x r k" / 'kill-rectangle' to integrate with the kill ring like 'rectangle-mark-mode', but that's another can of worms...)