From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#11191: C-x C-x does not activate the selection anymore with cua-selection-mode Date: Mon, 09 Apr 2012 10:16:42 -0400 Message-ID: References: <87vclapdk6.fsf@gnu.org> <4F82C14D.7000100@cua.dk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1333981033 5759 80.91.229.3 (9 Apr 2012 14:17:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2012 14:17:13 +0000 (UTC) Cc: 11191@debbugs.gnu.org, Chong Yidong To: Kim Storm Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 09 16:17:12 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SHFP6-0008Mt-7i for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 16:17:12 +0200 Original-Received: from localhost ([::1]:43713 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHFP5-0002D6-H9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 10:17:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHFP3-0002D1-2l for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 10:17:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHFP1-0004pA-8o for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 10:17:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHFP1-0004p6-57 for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 10:17:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SHFPu-0001Xp-HU for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 10:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Apr 2012 14:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11191 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11191-submit@debbugs.gnu.org id=B11191.13339810635911 (code B ref 11191); Mon, 09 Apr 2012 14:18:02 +0000 Original-Received: (at 11191) by debbugs.gnu.org; 9 Apr 2012 14:17:43 +0000 Original-Received: from localhost ([127.0.0.1]:46961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHFPb-0001XI-9d for submit@debbugs.gnu.org; Mon, 09 Apr 2012 10:17:43 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:41357) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHFPY-0001X9-3S for 11191@debbugs.gnu.org; Mon, 09 Apr 2012 10:17:41 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SHFOc-000757-BO; Mon, 09 Apr 2012 10:16:42 -0400 In-Reply-To: <4F82C14D.7000100@cua.dk> (Kim Storm's message of "Mon, 09 Apr 2012 13:00:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:58642 Archived-At: Kim Storm writes: > On 04/09/2012 07:50 AM, Dan Nicolaescu wrote: >> Chong Yidong writes: >> >>> Dan Nicolaescu writes: >>> >>> [recipe edited] >>> >>>> emacs -Q >>>> M-x cua-selection-mode RET >>>> M-< >>>> C-SPC C-f C-f C-f C-g >>>> C-x C-x >>>> >>>> now the selection should be active, but it is not. >>>> This worked in emacs-23.3, so this is a regression. >>> Looks like this change was made deliberately: >>> >>> revno: 102844 >>> committer: Kim F. Storm >>> branch nick: trunk >>> timestamp: Fri 2011-01-14 16:06:17 +0100 >>> message: >>> * emulation/cua-base.el (cua--init-keymaps): >>> Remap exchange-point-and-mark in cua-global-keymap. >>> >>> The docstring of `cua-exchange-point-and-mark' says it does not activate >>> the mark. >>> Kim, could you confirm that this was the intention? >> >> In emacs-22.3 and 23.3 it does activate the mark. >> C-x C-x also activates the mark in the trunk without >> cua-selection-mode. >> >> Wouldn't it be better that instead of changing something that has been >> present in two major releases and is consistent with the default behavior, >> to change the docstring? >> > > The current behaviour is "by design" It might be, but the behavior before your changes has been available in two major releases (22.x and 23.x), with no complaints from users (that I could find). Changing behavior on a highly visible feature is not something that we should take lightly. > Personally, I find it very annoying if C-x C-x activates the mark with > cua-mode - as it becomes very > hard to enter another C-x C-x to cancel it (it actually requires three > C-x typed rapidly -- otherwise > it will delete the region. That is why cua-exchange-point-and-mark > doesn't activate the mark > by default. You might want to do something different for cua-mode vs cua-selection-mode (where C-x C-x has no other problems). > - but with reference to bug #6199 on the same subject, I have already > approved to change the behaviour > --- if anyone feels it is necessary. > > I think the following version should do the trick > > (defun cua-exchange-point-and-mark (arg) > "Exchanges point and mark. > Don't activate the mark if a prefix argument is given." > (interactive "P") > (let ((ma mark-active)) > (exchange-point-and-mark) > (if cua--rectangle > (cua--rectangle-corner 0)) > (if arg > (setq mark-active ma))))