From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: bug#21731: 24.5; Bug with `transient-mark-mode' wrt `cua-mode' Date: Thu, 22 Oct 2015 01:22:04 -0400 Message-ID: <22056.29308.347026.83990@lambda.ccs.neu.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1445491500 27937 80.91.229.3 (22 Oct 2015 05:25:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Oct 2015 05:25:00 +0000 (UTC) To: 21731@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 22 07:24:46 2015 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 1Zp8Mn-0002C8-7k for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Oct 2015 07:24:45 +0200 Original-Received: from localhost ([::1]:56233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp8Mm-0006hE-PT for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Oct 2015 01:24:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp8MV-0006Xv-6k for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:24:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zp8M6-0003UW-OT for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:24:27 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp8M6-0003UF-Jk for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zp8M6-0000fh-8f for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Barzilay Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Oct 2015 05:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21731 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14454914222534 (code B ref -1); Thu, 22 Oct 2015 05:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Oct 2015 05:23:42 +0000 Original-Received: from localhost ([127.0.0.1]:60103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zp8Ll-0000el-Qn for submit@debbugs.gnu.org; Thu, 22 Oct 2015 01:23:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46884) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zp8Lk-0000ee-GG for submit@debbugs.gnu.org; Thu, 22 Oct 2015 01:23:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zp8LG-0002Y8-3O for submit@debbugs.gnu.org; Thu, 22 Oct 2015 01:23:40 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp8LF-0002Xw-Rj for submit@debbugs.gnu.org; Thu, 22 Oct 2015 01:23:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp8Kg-0004su-L4 for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:23:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zp8KF-0001mW-0G for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:22:34 -0400 Original-Received: from mail-qg0-f48.google.com ([209.85.192.48]:34412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp8KE-0001lr-Ou for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:22:06 -0400 Original-Received: by qgem9 with SMTP id m9so47384432qge.1 for ; Wed, 21 Oct 2015 22:22:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:subject; bh=DB+XoelKxaKz+gBd4fFvlQ63Gkhgs2qOwCqfSed4ze8=; b=km3JYysfSXEdeRioWqdGJCgrGaX0u+3/JM8biqmI81du0qfJUQfT4Kp8UAcnMLW1Rb hafN6ymc92j+n7XoxHjq9V75gbNP2l/R3zlvaMGl/WpfvzNsfembXYL/DA7D+Rp5Albg eYA8PNqXYs/DIh5z5wY7Q19fKDANDIzVahudqMK2o7BoT15IEVu5WfrIWFKFOZHNi64d pzs42zd9+MCWfqGZT4W4Puhq33T6RMGxPFROxRKzMsExPrQZxTHgzUKAK3vG9qgSqZlY bUj3ONlbR+ILlRvtu7/nmHtXQtfUB0ZDjVT1GyeLx27lAeA7ofvmli09kGbvPD2VksNv XPtA== X-Gm-Message-State: ALoCoQkq613mFId0VV6ad2BnyH6kqoAicImJTi9x4exV4aCvBUnBa7pC0ATx3YtR4Yf5sznOGxvv X-Received: by 10.140.147.69 with SMTP id 66mr501972qht.12.1445491326109; Wed, 21 Oct 2015 22:22:06 -0700 (PDT) Original-Received: from lambda.ccs.neu.edu (lambda.ccs.neu.edu. [129.10.115.115]) by smtp.gmail.com with ESMTPSA id k64sm4745037qkh.10.2015.10.21.22.22.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 22:22:05 -0700 (PDT) X-Mailer: VM 8.2.0a under 24.5.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.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:107823 Archived-At: This is a bug that I ran into with 24.5.1: * Run emacs -Q * Use shifted arrow keys to make some transient selection (on by default, so no need to do any customizations). * Use C-x b to switch to another buffer * Use unshifted arrows to move in this buffer * C-x b back into the first buffer * Now unshifted arrow movements continue to change the selection, as if it was made with C-SPC FWIW#1, it looks like this bug existed for a while -- I see it with 24.3.1 too. The reason I didn't see it then is that (IIUC) `cua-mode' did its own thing (correctly), and it looks like this was dropped and the functionality from simple.el is used instead. This is why I qualified this as "wrt cua-mode": the buggy behavior might be considered correct for people who have used it before and expect it to happen. (I doubt this, but that's subjective.) The reason for this was easy to track: `transient-mark-mode' is a *global* variable. After shifted movement, it gets a value of (only . t), and shifted movements turn it back to t even if they happen in a different buffer. (I don't see off-hand any quick way to fix it, but if anyone has an idea, I'd be happy to know about it.) The fix should involve some buffer-local version of `transient-mark-mode', but since it's also used globally as a mode, this might require a new variable. If the current behavior is intentional, then this becomes harder to fix, since it would require having both behaviors available. It would still be a bug since it changes functionality for people who use cua-mode -- which would enable this imaginary extension. -- ((x=>x(x))(x=>x(x))) Eli Barzilay: http://barzilay.org/ Maze is Life!