-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reset transient mark mode to previous value when stopping expansion #225
Conversation
Thanks! |
here is the problem with this change: having Old behavior was that regardless of With the new behavior I have to either hold shift, or I need disable |
Ok I see, I'll have a look at it! |
To me it seems most intuitive for users of If we would ignore |
But transient mark works even with shift-select-mode on. So the question is
whether expand region is simulating a shifted selection or a transient mark
selection and it has always, as far as I can tell, in the past represented
a transient mark based solution.
My ask is simply that if this change is made it should be configurable.
Because one day I upgraded and behavior changed.
Further, it makes more sense to me that the default is a transient mark
based selection because nothing about the expand region binding relates to
the shift key.
…On Sun, Oct 15, 2017 at 3:28 PM Tijs Mallaerts ***@***.***> wrote:
To me it seems most intuitive for users of shift-select-mode to be able
to further extend a region with shift-translated point motion keys after
using expand-region.
If we would ignore shift-select-mode we would expect from the users of
this mode to use the regular point motion keys to modify a region marked
with expand-region. Wouldn't that be counterintuitive?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACUskj8A8G3KmNnQNzlPuX0Rde98uSmks5ssmrcgaJpZM4MQJO2>
.
|
The support for I'm not a |
Respecting shift-select-mode has turned out to break too many things. We're going back to expand-region only using regular mark selection. See comments on #190, #225, #220 and #229 for details.
This PR retains the value of
transient-mark-mode
before expanding, and resetstransient-mark-mode
to this value when stopping expansion.When the value of
transient-mark-mode
contains 'only, theexchange-point-and-mark
function will cons new 'only symbols to thetransient-mark-mode
value. When stopping expansion, this will leave thetransient-mark-mode
variable with several 'only symbols, causing the regular set-mark command (C-SPC) to be broken. When the value oftransient-mark-mode
is reset to the value before expanding, the set-mark command behaves correctly again.This fixes #220 when
shift-select-mode
is active and when stopping the expansion withC-g
or0.
When copying the region after expanding however (with
M-w
f.ex.), the value oftransient-mark-mode
is not reset and the regular set-mark command is broken again. I guess interfering in all these cases would lead too far, but this PR already fixes the basic case of stopping expansion withC-g
or0.
@magnars Please feel tree to post your comments on this PR. I'm not a user of
shift-select-mode
myself, but since it seems to be enabled by default, I think it's importantexpand-region
already handles the basic case.Thanks!