[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62892: proposal to extend mark-sexp to go forward and backward on co
From: |
Eli Zaretskii |
Subject: |
bug#62892: proposal to extend mark-sexp to go forward and backward on command |
Date: |
Wed, 31 May 2023 15:01:39 +0300 |
> From: Zachary Kanfer <zkanfer@gmail.com>
> Date: Tue, 30 May 2023 23:23:13 -0400
> Cc: rms@gnu.org, ruijie@netyu.xyz, 62892@debbugs.gnu.org,
> monnier@iro.umontreal.ca, drew.adams@oracle.com, juri@linkov.net
>
> This is interesting. Let me see if I'm understanding properly. In this, I'll
> talk only about sexps, but I
> believe this argument should apply to all the forms we've talked about (word,
> sexp, paragraph, defun,
> page). These commands should:
>
> 1. Always move forward/back by ARG sexps (defaulting to 1), setting the
> region on all sexps it moves
> across.
>
> I'm in agreement with #1, for sure. That is the basis for what I wanted
> initially.
>
> 2. Ignore whether transient-mark-mode is enabled.
> 3. Don't change behavior if the region is active or not.
>
> #2 and #3 I believe can be considered together. There are a few things that
> could do this, but I think
> what you're saying is that this function should *only* move mark.That is,
> point should stay the same no
> matter what is called here. Additionally, it should activate mark. Is that
> what you meant?
No, it should only move point, not the mark. The mark should stay
where point was before invoking the command.
Whether it should activate the mark is open to discussion. One
possibility is that the command will work like shift-select commands.
Another possibility is that it should activate the mark only if
transient-mark-mode is turned ON, like other commands that push the
mark.
> My understanding was that #'use-region-p (which checks transient-mark-mode,
> and whether the region
> is active) is a standard way for determining whether to act on the region or
> not, and should generally
> be looked at before acting on the region. Is that not accurate?
This is correct, but only for commands that do something with the text
in the region: limit search/replace to it, or spell-check the text in
it, etc. mark-sexp doesn't do anything like that, it actually
_modifies_ the region. So the fact that it changes its effect
depending on whether the region is active is IMO pretty confusing and
unexpected.
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, (continued)
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, Eshel Yaron, 2023/05/21
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, Eli Zaretskii, 2023/05/21
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, Eshel Yaron, 2023/05/21
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, Richard Stallman, 2023/05/22
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, Zachary Kanfer, 2023/05/23
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, Richard Stallman, 2023/05/25
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, Eli Zaretskii, 2023/05/26
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, Zachary Kanfer, 2023/05/30
- bug#62892: proposal to extend mark-sexp to go forward and backward on command,
Eli Zaretskii <=
- bug#62892: proposal to extend mark-sexp to go forward and backward on command, Stefan Monnier, 2023/05/31
bug#62892: proposal to extend mark-sexp to go forward and backward on command, Eli Zaretskii, 2023/05/06