Subject: Re: bug#62892: proposal to extend mark-sexp to go forward and backward on command

From: Stefan Monnier <[email-masked]>
Date: Wed, 31 May 2023 23:54:48 -0400

>> #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.

Hmm?  Really?
That would make it equivalent to `forward-sexp`, no?

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

Agreed, tho for `mark-sexp` when `transient-mark-mode` is enabled, it
makes sense to treat "region not active" differently from "region
active", since `mark-sexp` mostly moves the mark but when the region is
not active, it means the mark is "an old obsolete mark" that the user
may not remember any more.

        Stefan