GNU bug report logs - #62892
proposal to extend mark-sexp to go forward and backward on command

Previous Next

Package: emacs;

Reported by: Zachary Kanfer <zkanfer <at> gmail.com>

Date: Mon, 17 Apr 2023 02:26:02 UTC

Severity: normal

Full log


Message #137 received at 62892 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rms <at> gnu.org, Zachary Kanfer <zkanfer <at> gmail.com>, juri <at> linkov.net,
 ruijie <at> netyu.xyz, 62892 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#62892: proposal to extend mark-sexp to go forward and
 backward on command
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





This bug report was last modified 2 years and 18 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.