unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19513: shift-select-mode fails to be fully buffer-local
@ 2015-01-05  1:06 Kelly Dean
  2015-01-05  2:09 ` Stefan Monnier
  2015-01-25  8:50 ` Kelly Dean
  0 siblings, 2 replies; 11+ messages in thread
From: Kelly Dean @ 2015-01-05  1:06 UTC (permalink / raw)
  To: 19513

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. ;-)





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-01-26  6:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05  1:06 bug#19513: shift-select-mode fails to be fully buffer-local Kelly Dean
2015-01-05  2:09 ` Stefan Monnier
2015-01-06  6:59   ` Kelly Dean
2015-01-06 15:24     ` Stefan Monnier
2015-01-06 19:20       ` Kelly Dean
2015-01-06 21:06         ` Stefan Monnier
2015-01-25  8:50 ` Kelly Dean
2015-01-25 15:16   ` Stefan Monnier
2015-01-26  4:16     ` Kelly Dean
2015-01-26  6:15       ` Eli Zaretskii
2015-01-25 15:40   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).