GNU bug report logs -
#19513
shift-select-mode fails to be fully buffer-local
Previous Next
Reported by: Kelly Dean <kelly <at> prtime.org>
Date: Mon, 5 Jan 2015 01:08:02 UTC
Severity: minor
Fixed in version 25.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 19513 <at> debbugs.gnu.org (full text, mbox):
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.
This bug report was last modified 8 years and 97 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.