bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Thu, 01 Jun 2023 09:32:39 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Zachary Kanfer <zkanfer@gmail.com>,  rms@gnu.org,  ruijie@netyu.xyz,
>   62892@debbugs.gnu.org,  drew.adams@oracle.com,  juri@linkov.net
> Date: Wed, 31 May 2023 23:54:48 -0400
> 
> > 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?

That's exactly the idea: move like forward-sexp and mark the sexps
moved across.

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

I'm not lobbying for changing the behavior of mark-sexp.  It's too
late for that, no matter what my opinion about that is.  I'm saying
that it could make sense to have much simpler commands whose effect is
always predictable in advance, even if you don't use them frequently,
and even if you sometimes have transient-mark-mode on and sometimes
off.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]