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: Tue, 06 Jan 2015 06:59:39 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1420527719 19874 80.91.229.3 (6 Jan 2015 07:01:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Jan 2015 07:01:59 +0000 (UTC) Cc: 19513@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 06 08:01:53 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 1Y8O8c-0005x1-9u for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Jan 2015 08:01:10 +0100 Original-Received: from localhost ([::1]:35147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8O8b-0000pF-HP for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Jan 2015 02:01:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8O8Y-0000p8-0u for bug-gnu-emacs@gnu.org; Tue, 06 Jan 2015 02:01:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8O8U-0000MV-RD for bug-gnu-emacs@gnu.org; Tue, 06 Jan 2015 02:01:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8O8U-0000MQ-OW for bug-gnu-emacs@gnu.org; Tue, 06 Jan 2015 02:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y8O8U-0000aj-Bj for bug-gnu-emacs@gnu.org; Tue, 06 Jan 2015 02:01: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: Tue, 06 Jan 2015 07:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19513 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19513-submit@debbugs.gnu.org id=B19513.14205276332232 (code B ref 19513); Tue, 06 Jan 2015 07:01:02 +0000 Original-Received: (at 19513) by debbugs.gnu.org; 6 Jan 2015 07:00:33 +0000 Original-Received: from localhost ([127.0.0.1]:37944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8O80-0000Zw-4V for submit@debbugs.gnu.org; Tue, 06 Jan 2015 02:00:32 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:59036) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8O7x-0000Zn-GY for 19513@debbugs.gnu.org; Tue, 06 Jan 2015 02:00:30 -0500 Original-Received: from mfilter23-d.gandi.net (mfilter23-d.gandi.net [217.70.178.151]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id AFD55A80B8; Tue, 6 Jan 2015 08:00:28 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter23-d.gandi.net Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter23-d.gandi.net (mfilter23-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id cWU9S1Dl5aK5; Tue, 6 Jan 2015 08:00:26 +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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 76189A80BE; Tue, 6 Jan 2015 08:00:25 +0100 (CET) In-Reply-To: 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:98063 Archived-At: Stefan Monnier wrote: >> The reason I want to do that is I have a minor mode that depends on >> shift-select-mode being disabled. > > Can you explain how/why? See line-select-minor-mode in the section beginning on line 339 at http://prtime.org/emacs/vimizer.el (currently version 0.2.2) Comment out lines 384-385 to enable it to work with shift-select-mode, to see how the latter interferes. Enable the mode, then press S-down. Then press down, and since you're doing a non-shifted motion command following a shifted motion command, shift-select-mode deactivates the region. The region is supposed to stay active while line-select mode is on, and line-select is supposed to remain on until you actually do something that's supposed to deactivate the region, e.g. C-g, C-w, etc. Motion commands specifically are _not_ supposed to deactivate it, which is why I need shift-select-mode disabled while the line-select mode is on. The reason it's a problem for motion commands to deactivate it is that I have a lot of keys bound to different motion commands depending on whether shift is pressed. E.g. I have a key bound to right-word, and the same key shifted is bound to forward-sexp. So I frequently press a combination of both shifted and non-shifted keys to move, including even when line-select is on. Normally, shift-select-mode doesn't deactivate the region, since it ignores my rebound keys, but when I happen to press a shifted key that I _don't_ have rebound (e.g. S-left, which Emacs translates to left, bound to the default of left-char), shift-select-mode notices it, and then deactivates the region upon the following non-shifted motion command. You could say, just avoid pressing S-left, but that's not user-friendly. If I'm doing a sequence of motion commands that happen to be bound to shifted keys, and I need to do left-char in the middle of the sequence, I shouldn't have to un-press shift just to prevent shift-select-mode from biting me the next time I use a non-shifted key. > Could you explain why you want to disable-it buffer-locally? So that if line-select is active (which requires shift-select inactive) in one buffer, it doesn't interfere with the user's ability to use shift-select in another buffer.