[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delete-selection-mode as default
From: |
hw |
Subject: |
Re: delete-selection-mode as default |
Date: |
Mon, 17 Sep 2018 23:00:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Alan Mackenzie <address@hidden> writes:
> Hello, hw.
>
> On Sun, Sep 16, 2018 at 15:48:10 +0200, hw wrote:
>
>> Oh, I see what you mean!
>
>> Emacs has point and (the end of) the region (selection) always entangled
>> with no way to separate them or to disable the region.
>
> You want to disable a portion of your buffer? That doesn't make any
> sense.
Portions of a buffer I don't want to do anything with do not need to be
selected, active or part of a region.
A region is not a portion of a buffer, it's a concept. The contents of
a region reside within a buffer. Disabling the region would disable the
concept, not its contents.
Take a picture of a tree and delete the picture. Does that delete the
tree? Should I take pictures of trees I don't care about only to do
nothing with them?
>> That is what I dislike so much, and it causes all kinds of issues.
>
> I do wish you could come to understand what the region is. It would save
> all sorts of problems for you. The region is not active,
When you have transient-mark-mode enabled, the region can be "active".
The problem with transient-mark-mode is that even when the region
should be disabled because nothing is selected and nothing is
highlighted, it remains enabled unless you set mark to nil.
> never being any sort of agent,
A region can be evaluated. In that way, it as always an agent.
If you mean that it doesn't tend to do anything all by itself, well, it
doesn't do that, yet if the region didn't exist, it wouldn't be possible
for it to do anything in the first place, and it couldn't be evaluated.
However, I could argue that the region does something all by itself when
transient-mark-mode is enabled, the region is not active and an
operation like downcase-region happens because the region kinda
activates itself for this unless mark-even-if-inactive is nil.
So yes, it certainly has a life of its own, always.
> and its existence is determined only by commands which operate on it.
It doesn't matter which commands operate on it. It even exists when no
commands operate on it, i. e. when it doesn't need to exist.
> Point exists and mark exists. When you run a command
> with "-region" in its name, it operates on the buffer between point and
> mark. When you're not running such a command, the region has no
> significance. That's all.
The region has always significance while it exists. It can always be
operated on. It is a fundamental concept of Emacs.
This is important because I don't want to (accidentally) do something
with a region only because it always exists. That's why I make a
selection. I have transient-mark-mode enabled because I want my
selection highlighted. That what I'm doing becomes limited to the
region is merely a side-effect, no more.
It is somewhat ironic that transient-mark-mode is required to be able to
fortify the region against accidental use with mark-even-if-inactive.
> You are attributing problems to the region which really aren't there. A
> section of your buffer is not "always entangled with no way to separate
> [it]". If you don't want to do anything to the region, don't do it. And
> if you do something to it by mistake, which won't happen often, use undo.
I didn't say that a section of the buffer is entangled. Point and mark
are entangled with making selections, with regions and with navigation.
>> The secondary selection doesn't have all these problems, so it's a good
>> example.
>
>> Can we have a mode or something in which there is no association between
>> point and the end of the region? Or can I just configure that
>> association away?
>
> Please learn what the region is. It is just a portion of your buffer.
> You cannot have point dissociated from some part of your buffer. That
> doesn't make any sense.
Please try out joe. You can see how these things work much easier
there.
- Re: delete-selection-mode as default, (continued)
- Re: delete-selection-mode as default, Eli Zaretskii, 2018/09/15
- Re: delete-selection-mode as default, Richard Stallman, 2018/09/15
- RE: delete-selection-mode as default, Drew Adams, 2018/09/16
- Re: delete-selection-mode as default, hw, 2018/09/15
- Re: delete-selection-mode as default, hw, 2018/09/15
- RE: delete-selection-mode as default, Drew Adams, 2018/09/15
- Re: delete-selection-mode as default, hw, 2018/09/15
- RE: delete-selection-mode as default, Drew Adams, 2018/09/15
- Re: delete-selection-mode as default, hw, 2018/09/16
- Re: delete-selection-mode as default, Alan Mackenzie, 2018/09/16
- Re: delete-selection-mode as default,
hw <=
- Re: delete-selection-mode as default, Yuri Khan, 2018/09/16
- RE: delete-selection-mode as default, Drew Adams, 2018/09/16
- Re: delete-selection-mode as default, Eli Zaretskii, 2018/09/16
- RE: delete-selection-mode as default, Drew Adams, 2018/09/16
- Re: delete-selection-mode as default, Eli Zaretskii, 2018/09/16
- RE: delete-selection-mode as default, Drew Adams, 2018/09/16
- Re: delete-selection-mode as default, Yuri Khan, 2018/09/16
- Re: delete-selection-mode as default, Eli Zaretskii, 2018/09/16
- RE: delete-selection-mode as default, Drew Adams, 2018/09/16
- Re: delete-selection-mode as default, Yuri Khan, 2018/09/17