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 #50 received at 62892 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Zachary Kanfer <zkanfer <at> gmail.com>
Cc: ruijie <at> netyu.xyz, monnier <at> iro.umontreal.ca, 62892 <at> debbugs.gnu.org,
 mardani29 <at> yahoo.es
Subject: Re: bug#62892: proposal to extend mark-sexp to go forward and
 backward on command
Date: Wed, 26 Apr 2023 09:28:47 +0300
> Cc: Ruijie Yu <ruijie <at> netyu.xyz>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
>  62892 <at> debbugs.gnu.org
> From: Zachary Kanfer <zkanfer <at> gmail.com>
> Date: Wed, 26 Apr 2023 00:41:45 -0400
> 
> The documentation for mark-sexp says:
> 
> > Set mark ARG sexps from point.
> > The place mark goes is the same place C-M-<right> would
> > move to with the same argument.
> 
> This is correct but misleading.

Please elaborate: how could it mislead?

> Worse still is the next part:
> 
> > Interactively, if this command is repeated
> > or (in Transient Mark mode) if the mark is active,
> > it marks the next ARG sexps after the ones already marked.
> 
> This says it marks sexps *after* the ones already marked. This is incorrect; if point is *after* mark, and
> mark is active, this function marks sexps *before* the ones already marked.

I cannot reproduce this behavior, if I understand your description
correctly.  Please show a recipe, starting from "emacs -Q", to
reproduce.

> > In my opinion, the description of that feature should not be part of the
> > mark-sexp command documentation, because the feature is actually
> > provided by C-x C-x (exchange-point-and-mark).
> 
> One way for this situation to occur is by using C-x C-x, yes, but it's not the only way. You can set point,
> move forward sexps, and then calling mark-sexp will mark sexps backwards.
> 
> There is specific code in mark-sexp to check which direction to move; it should be documented as
> such.

Please also demonstrate this behavior and point to that code, so we
will know what you are alluding to.

Thanks.




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

Previous Next


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