From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kelly Dean Newsgroups: gmane.emacs.bugs Subject: bug#19513: shift-select-mode fails to be fully buffer-local Date: Mon, 05 Jan 2015 01:06:04 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1420420100 30436 80.91.229.3 (5 Jan 2015 01:08:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2015 01:08:20 +0000 (UTC) To: 19513@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 05 02:08:12 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 1Y7w9U-0008FX-9x for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2015 02:08:12 +0100 Original-Received: from localhost ([::1]:58653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7w9T-0002FJ-Mm for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Jan 2015 20:08:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7w9Q-0002EL-08 for bug-gnu-emacs@gnu.org; Sun, 04 Jan 2015 20:08:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7w9K-0008F8-WA for bug-gnu-emacs@gnu.org; Sun, 04 Jan 2015 20:08:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7w9K-0008F4-T2 for bug-gnu-emacs@gnu.org; Sun, 04 Jan 2015 20:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y7w9K-00065b-Dn for bug-gnu-emacs@gnu.org; Sun, 04 Jan 2015 20:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kelly Dean Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jan 2015 01:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19513 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.142042003623349 (code B ref -1); Mon, 05 Jan 2015 01:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Jan 2015 01:07:16 +0000 Original-Received: from localhost ([127.0.0.1]:36787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7w8Z-00064V-Ku for submit@debbugs.gnu.org; Sun, 04 Jan 2015 20:07:15 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40254) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7w8X-00064L-0v for submit@debbugs.gnu.org; Sun, 04 Jan 2015 20:07:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7w8V-00085X-Q6 for submit@debbugs.gnu.org; Sun, 04 Jan 2015 20:07:12 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7w8V-00085T-NN for submit@debbugs.gnu.org; Sun, 04 Jan 2015 20:07:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7w8U-00029A-AI for bug-gnu-emacs@gnu.org; Sun, 04 Jan 2015 20:07:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7w8P-00084p-Ap for bug-gnu-emacs@gnu.org; Sun, 04 Jan 2015 20:07:10 -0500 Original-Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:44415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7w8P-00084D-4y for bug-gnu-emacs@gnu.org; Sun, 04 Jan 2015 20:07:05 -0500 Original-Received: from mfilter35-d.gandi.net (mfilter35-d.gandi.net [217.70.178.166]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id E716FFB87E for ; Mon, 5 Jan 2015 02:07:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter35-d.gandi.net Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by mfilter35-d.gandi.net (mfilter35-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id LUHqLpVKnBZW for ; Mon, 5 Jan 2015 02:06:59 +0100 (CET) X-Originating-IP: 162.248.99.114 Original-Received: from localhost (114-99-248-162-static.reverse.queryfoundry.net [162.248.99.114]) (Authenticated sender: kelly@prtime.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 75437FB86F for ; Mon, 5 Jan 2015 02:06:56 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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: 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:98014 Archived-At: With Emacs 24.4, do emacs -Q, get two windows in your frame, and different buffers in the windows, and some text in each buffer. In one of them, (setq-local shift-select-mode nil). In each of them, try shifted motion followed by non-shifted motion, and you get the expected result. That indicates that shift-select-mode is buffer-local. You trigger the bug like this: Switch to the window with the buffer with shift-select-mode on. Do shifted motion, but not non-shifted, so the selection remains. C-x o Do any motion (shifted or non-shifted), and you get the expected result (no selection). C-x o Do non-shifted motion, which is supposed to turn off the selection. However, the selection remains. I know you'll consider it weird to want to buffer-locally disable shift-select-mode. But the mode is enabled and disabled by setting a variable, Emacs supports buffer-local variables (which aren't supposed to affect other buffers), and I don't see anything in the docs that says the shift-select-mode variable is an exception to buffer-locality. So the above behavior is a bug. The reason I want to do that is I have a minor mode that depends on shift-select-mode being disabled. I never use shift-select-mode myself, so I always have it disabled, but I'm trying to enhance my mode so it will work for everybody else. I could simply disable shift-select-mode globally while my mode is enabled (and restore the former setting when my mode is disabled), but that would affect all buffers, not just the buffer in which my mode is enabled. The right way to do it is to buffer-locally disable shift-select-mode, but the bug above prevents that. The easy solution is to remove shift-select-mode from Emacs. That's what I vote for, but I guess I'm in the minority. ;-)