unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kelly Dean <kelly@prtime.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 19513@debbugs.gnu.org
Subject: bug#19513: shift-select-mode fails to be fully buffer-local
Date: Tue, 06 Jan 2015 06:59:39 +0000	[thread overview]
Message-ID: <Ev9ue0eASBSrhmBKtOqgaCUE1LAC99oGkWDazaqjQ5Z@local> (raw)
In-Reply-To: <jwvy4pi7zj7.fsf-monnier+emacsbugs@gnu.org>

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.





  reply	other threads:[~2015-01-06  6:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=Ev9ue0eASBSrhmBKtOqgaCUE1LAC99oGkWDazaqjQ5Z@local \
    --to=kelly@prtime.org \
    --cc=19513@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 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).