From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 06 19:16:00 2012 Received: (at submit) by debbugs.gnu.org; 7 Nov 2012 00:16:00 +0000 Received: from localhost ([127.0.0.1]:52989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVtJI-0003sc-8p for submit@debbugs.gnu.org; Tue, 06 Nov 2012 19:16:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40554) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVtHL-0003pI-Cu for submit@debbugs.gnu.org; Tue, 06 Nov 2012 19:14:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVtEC-0003mm-C9 for submit@debbugs.gnu.org; Tue, 06 Nov 2012 19:10:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:50876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVtEC-0003mM-4e for submit@debbugs.gnu.org; Tue, 06 Nov 2012 19:10:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVtEA-0000E7-MI for bug-gnu-emacs@gnu.org; Tue, 06 Nov 2012 19:10:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVtE8-0003m3-SI for bug-gnu-emacs@gnu.org; Tue, 06 Nov 2012 19:10:42 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:55836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVtE8-0003lv-K1 for bug-gnu-emacs@gnu.org; Tue, 06 Nov 2012 19:10:40 -0500 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id E4F1520BA2 for ; Tue, 6 Nov 2012 18:34:51 -0500 (EST) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute5.internal (MEProxy); Tue, 06 Nov 2012 18:34:51 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= from:to:subject:date:message-id:mime-version:content-type; s= mesmtp; bh=tdexPztk1ZARGj4c5Bhw0UW13nY=; b=c8UPu5GZVPso0floGC+/F QJPG0MEaZtPXjlgz+Njr+fkMamzpE8LGRlL2JCud+ZUDv1ymQeEsSXS/vAN2qqWS /HSM2RtgmOVhhdYmEy/nhL4BivJU6d7xpI2LM16WWPvY9xQU9ZheJju2U5l8Vc7o /TO7Il3uczsZnTBPXjmxrQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :mime-version:content-type; s=smtpout; bh=tdexPztk1ZARGj4c5Bhw0U W13nY=; b=WeohZUCRBdQnFPveue2dtoKnBxnrPnVvyBWPdPoGkSoSEIHFnTg7sT JLmXUu20zJwTKrf8eHFiBINSiWtCTy3byO51XlhNT6rcPUGKNO1qnRyzZ2I7f9Qw /Df0Cd6dtodRuQDkIzTSN2sqRF/M3EuCW97rSi72adFgW/Uqiz1bc= X-Sasl-enc: Q9eazwy/pXsOd3qBBCwTqMlTRZlseEp+u3vThugAye2U 1352244891 Received: from fatty (unknown [204.154.109.20]) by mail.messagingengine.com (Postfix) with ESMTPA id A3DBF482647 for ; Tue, 6 Nov 2012 18:34:51 -0500 (EST) Received: from dima by fatty with local (Exim 4.76) (envelope-from ) id 1TVseJ-00089m-3p for bug-gnu-emacs@gnu.org; Tue, 06 Nov 2012 15:33:39 -0800 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 24.2.50; [PATCH] Fix inconsistent behavior of (append-next-kill) Date: Tue, 06 Nov 2012 15:33:39 -0800 Message-ID: <87txt2b92k.fsf@oblong.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 06 Nov 2012 19:15:58 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --=-=-= Content-Type: text/plain The behavior of appended kills is described in http://www.gnu.org/software/emacs/manual/html_node/emacs/Appending-Kills.html The idea is that when consecutive kills happen, the new text is either appended or prepended to the kill ring entry, depending on the ordering of the mark/point. This works as described for commands such as C-k, M-d, etc. However, the behavior for C-w and M-w is surprising. Suppose my buffer contains 123 with the point at the '1'. I then use point navigation commands, C-M-w and C-w to kill 1 then 2 then 3: C-SPC C-f C-w C-SPC C-f C-M-w C-w C-SPC C-f C-M-w C-w I would expect the kill-ring to then contain "123". Instead, it contains "321". Similarly I get "321" if I do this backwards, i.e. starting with the point at the '3': C-SPC C-f C-w C-SPC C-b C-M-w C-w C-SPC C-b C-M-w C-w C-y If I perform similar actions, but with M-w instead of C-w, I get "123" for the forward case and "321" for the backward case. I would expect "123" in all cases. The current behavior for commands after C-M-w is: C-w: prepend if point>mark; append otherwise M-w: always append new kill I think the behavior should either 1. Match what commands like M-d do; "123" would then result in all 4 of the cases described above or 2. Always append. This is what the manual node at the top of this report says. The 4 cases described above would then produce "123", "321", "123", "321" respectively. I'm attaching a patch that implements behavior 1 and another that implements behavior 2. I have a mild preference for behavior 1, but both are better than what emacs does currently, I think. Historically, the behavior has been "always-append". The current behavior was established in 2006 by http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=b7690594 I think the intent of that commit was to implement behavior 1, but I'm not sure. dima --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-C-w-M-w-after-C-M-w-now-pre-ap-pend-intelligently-to.patch Content-Description: Behavior 1 >From bba4cda29284e84b3266b68c46d0dd4e06afa45f Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 6 Nov 2012 15:17:38 -0800 Subject: [PATCH] C-w/M-w after C-M-w now pre/ap-pend intelligently to preserve input ordering --- lisp/simple.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index aed945d..67577e0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3358,7 +3358,7 @@ the text killed this time appends to the text killed last time to make one entry in the kill ring." ;; Pass point first, then mark, because the order matters ;; when calling kill-append. - (interactive (list (point) (mark))) + (interactive (list (mark) (point))) (unless (and beg end) (error "The mark is not set now, so there is no region")) (condition-case nil @@ -3399,7 +3399,7 @@ If `interprogram-cut-function' is non-nil, also save the text for a window system cut and paste. This command's old key binding has been given to `kill-ring-save'." - (interactive "r") + (interactive (list (mark) (point))) (if (eq last-command 'kill-region) (kill-append (filter-buffer-substring beg end) (< end beg)) (kill-new (filter-buffer-substring beg end))) @@ -3417,7 +3417,7 @@ use \\[append-next-kill] before \\[kill-ring-save]. This command is similar to `copy-region-as-kill', except that it gives visual feedback indicating the extent of the region being copied." - (interactive "r") + (interactive (list (mark) (point))) (copy-region-as-kill beg end) ;; This use of called-interactively-p is correct because the code it ;; controls just gives the user visual feedback. -- 1.7.10.4 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-C-w-M-w-after-C-M-w-now-always-append-to-the-prior-k.patch Content-Description: Behavior 2 >From 489081f8e53d39aa4f27584882ed5afa8cc53538 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 6 Nov 2012 15:27:20 -0800 Subject: [PATCH] C-w/M-w after C-M-w now always append to the prior kill-ring element --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index aed945d..94a9991 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3358,7 +3358,7 @@ the text killed this time appends to the text killed last time to make one entry in the kill ring." ;; Pass point first, then mark, because the order matters ;; when calling kill-append. - (interactive (list (point) (mark))) + (interactive "r") (unless (and beg end) (error "The mark is not set now, so there is no region")) (condition-case nil -- 1.7.10.4 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 21 00:30:12 2013 Received: (at control) by debbugs.gnu.org; 21 Feb 2013 05:30:12 +0000 Received: from localhost ([127.0.0.1]:41113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8OjU-0004dI-C2 for submit@debbugs.gnu.org; Thu, 21 Feb 2013 00:30:12 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39924) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8OjR-0004dA-V3 for control@debbugs.gnu.org; Thu, 21 Feb 2013 00:30:10 -0500 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id D2B0920AEA for ; Thu, 21 Feb 2013 00:28:54 -0500 (EST) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 21 Feb 2013 00:28:54 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=to:subject:message-id:from:date; s=mesmtp; bh=1+NpuZv4JmTfd2p j5XmuHhLS7Mk=; b=OxB+1Ammcy/NctDKai73aug49ton93yIIrQ7stxnRmy5zRB uVtGbf4shT6IOCrR8E6or2GFg7/7hlu2gVzWNoqewlmSpNKL77NndOLOtPu1KJ6f RfHyZU1Lva6nHx+oBikvJ+AROvU2+UfzFgLMuufnuQRocYQ4KagaNkAc37jA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=to:subject:message-id:from:date; s= smtpout; bh=1+NpuZv4JmTfd2pj5XmuHhLS7Mk=; b=JzXSjUdYWAg6FvKOJIQs LctxRPR6UsS5B9yGIIpMkEIxgU539PSKJ+KGXXuUsfkjeD5uXlcCvolHM6xi4tp5 GCE0XHhUujg6C8RC20u/XCg0VaOgw2oAekqxHC8MiYSTixqz492HZAWEgC2+CN9q jwsmmy3j05npTlQhWMgPuUM= X-Sasl-enc: 8btA7jp6PBFCCrdUCBjdUJsddCY8qjANyl461CiZ3RWl 1361424534 Received: from shorty.local (unknown [76.169.247.77]) by mail.messagingengine.com (Postfix) with ESMTPA id 7EB194824AF for ; Thu, 21 Feb 2013 00:28:54 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.80) (envelope-from ) id 1U8OiD-0005r4-2h for control@debbugs.gnu.org; Wed, 20 Feb 2013 21:28:53 -0800 To: control@debbugs.gnu.org Subject: Message-Id: From: Dima Kogan Date: Wed, 20 Feb 2013 21:28:53 -0800 X-Spam-Score: 2.1 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: submitter 12819 dima@secretsauce.net [...] Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [66.111.4.25 listed in list.dnswl.org] 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4997] 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 0.0 TVD_SPACE_RATIO TVD_SPACE_RATIO X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: submitter 12819 dima@secretsauce.net [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [66.111.4.25 listed in list.dnswl.org] -0.0 BAYES_40 BODY: Bayes spam probability is 20 to 40% [score: 0.3322] 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 0.0 TVD_SPACE_RATIO TVD_SPACE_RATIO submitter 12819 dima@secretsauce.net From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 17 10:50:54 2013 Received: (at 12819-done) by debbugs.gnu.org; 17 Dec 2013 15:50:54 +0000 Received: from localhost ([127.0.0.1]:55937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vswv7-0005mj-T4 for submit@debbugs.gnu.org; Tue, 17 Dec 2013 10:50:54 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:56200) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vswv5-0005mb-VH for 12819-done@debbugs.gnu.org; Tue, 17 Dec 2013 10:50:52 -0500 Received: by mail-pa0-f53.google.com with SMTP id hz1so4619016pad.40 for <12819-done@debbugs.gnu.org>; Tue, 17 Dec 2013 07:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=iroEATkpnrdoIa+nlKuApDuOgWTUkgSvH8z1X21ylic=; b=J7Od+QBZrhx/20znZy+S1fdZZvtv6aMHb+XtmhIpUwmBdZTIzwdOyzjJbLOcGEp0tk uShOzKBH1aWul87D1Je4msFQa7uQnpLqX08Ko+0IUB+tDIyAwL0ZrAcCCwVgHEGyQUbr igykyg8I9c2aVZbY93NnqnNQV6mMByDQalxZ+dxyjXJUzfYXpV5zgtqPJPsn7JhkSLJR tuiqr83NoCoUbbFl/lHOxSb7D5ra3ZaGrJcseNtUqlkoUGJmfglcRYV0cEoN2z01UWFi Dj6xF4toiDjPrmPzbQ3MFcCHwNWZmy4eOUa5O7RtCO/gNdvErIDAbOqqYptpoV4C+O5E 1soA== X-Received: by 10.68.232.132 with SMTP id to4mr27736351pbc.141.1387295450951; Tue, 17 Dec 2013 07:50:50 -0800 (PST) Received: from tsparkle ([155.69.2.31]) by mx.google.com with ESMTPSA id ic7sm14480969pbc.29.2013.12.17.07.50.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Dec 2013 07:50:49 -0800 (PST) From: Chong Yidong To: Dima Kogan Subject: Re: bug#12819: 24.2.50; [PATCH] Fix inconsistent behavior of (append-next-kill) References: <87txt2b92k.fsf@oblong.com> Date: Tue, 17 Dec 2013 23:50:47 +0800 In-Reply-To: <87txt2b92k.fsf@oblong.com> (Dima Kogan's message of "Tue, 06 Nov 2012 15:33:39 -0800") Message-ID: <87haa74gtk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 12819-done Cc: 12819-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Dima Kogan writes: > I'm attaching a patch that implements behavior 1 and another that > implements behavior 2. I have a mild preference for behavior 1, but both > are better than what emacs does currently, I think. Thanks. Patch 1 looks OK, and a bit of testing did not turn up any problems, so I've committed it to trunk. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 17 11:36:53 2013 Received: (at 12819-done) by debbugs.gnu.org; 17 Dec 2013 16:36:53 +0000 Received: from localhost ([127.0.0.1]:55968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vsxdc-000768-9L for submit@debbugs.gnu.org; Tue, 17 Dec 2013 11:36:52 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:38592) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VsxdZ-00075y-SM for 12819-done@debbugs.gnu.org; Tue, 17 Dec 2013 11:36:50 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rBHGalw0009048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 17 Dec 2013 16:36:48 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBHGakEZ020010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Dec 2013 16:36:47 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBHGajV6005855; Tue, 17 Dec 2013 16:36:45 GMT MIME-Version: 1.0 Message-ID: <08c4f536-3142-4f3b-b599-06b48d489461@default> Date: Tue, 17 Dec 2013 08:36:45 -0800 (PST) From: Drew Adams To: Chong Yidong , Dima Kogan Subject: RE: bug#12819: 24.2.50; [PATCH] Fix inconsistent behavior of (append-next-kill) References: <87txt2b92k.fsf@oblong.com> <87haa74gtk.fsf@gnu.org> In-Reply-To: <87haa74gtk.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 12819-done Cc: 12819-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) > > I'm attaching a patch that implements behavior 1 and another that > > implements behavior 2. I have a mild preference for behavior 1, but bot= h > > are better than what emacs does currently, I think. >=20 > Thanks. Patch 1 looks OK, and a bit of testing did not turn up any > problems, so I've committed it to trunk. It is, however, quite a (good) change from longstanding previous behavior. This should be mentioned in NEWS. From unknown Tue Aug 19 02:50:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 15 Jan 2014 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator