all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kelly Dean <kelly@prtime.org>
To: 19513@debbugs.gnu.org
Subject: bug#19513: shift-select-mode fails to be fully buffer-local
Date: Mon, 05 Jan 2015 01:06:04 +0000	[thread overview]
Message-ID: <U8z6hQIc2IE0cbBYLA7BLfg1BDVOfcYWbvmtNGX6CfD@local> (raw)

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





             reply	other threads:[~2015-01-05  1:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-05  1:06 Kelly Dean [this message]
2015-01-05  2:09 ` bug#19513: shift-select-mode fails to be fully buffer-local 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=U8z6hQIc2IE0cbBYLA7BLfg1BDVOfcYWbvmtNGX6CfD@local \
    --to=kelly@prtime.org \
    --cc=19513@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.