From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kim Storm 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 13:00:29 +0200 Message-ID: <4F82C14D.7000100@cua.dk> References: <87vclapdk6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1333969276 29123 80.91.229.3 (9 Apr 2012 11:01:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2012 11:01:16 +0000 (UTC) Cc: 11191@debbugs.gnu.org, Chong Yidong To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 09 13:01:14 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 1SHCLQ-0007Qk-Gl for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 13:01:12 +0200 Original-Received: from localhost ([::1]:54331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHCLP-0000ho-Vw for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 07:01:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHCLM-0000hj-Sp for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 07:01:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHCLL-0004uO-4S for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 07:01:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHCLL-0004uI-1Y for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 07:01:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SHCMD-0004ZA-Hl for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 07:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kim Storm Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Apr 2012 11:02:01 +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.133396929217507 (code B ref 11191); Mon, 09 Apr 2012 11:02:01 +0000 Original-Received: (at 11191) by debbugs.gnu.org; 9 Apr 2012 11:01:32 +0000 Original-Received: from localhost ([127.0.0.1]:46347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHCLj-0004YJ-QE for submit@debbugs.gnu.org; Mon, 09 Apr 2012 07:01:32 -0400 Original-Received: from ispc3.dotserv.com ([194.126.234.26]:37059) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHCLh-0004Y8-EL for 11191@debbugs.gnu.org; Mon, 09 Apr 2012 07:01:30 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by ispc3.dotserv.com (Postfix) with ESMTP id 1FA32802629EF; Mon, 9 Apr 2012 13:00:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at ispc3.dotserv.com Original-Received: from ispc3.dotserv.com ([127.0.0.1]) by localhost (ispc3.dotserv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DGOwhPGSza4Z; Mon, 9 Apr 2012 13:00:29 +0200 (CEST) Original-Received: from [10.1.82.9] (1405ds6-amb.0.fullrate.dk [95.166.178.253]) (Authenticated sender: storm@cua.dk) by ispc3.dotserv.com (Postfix) with ESMTPSA id B8EF780262A00; Mon, 9 Apr 2012 13:00:29 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16 In-Reply-To: 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:58632 Archived-At: 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" 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. - 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))))