GNU bug report logs -
#62892
proposal to extend mark-sexp to go forward and backward on command
Previous Next
Full log
Message #47 received at 62892 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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. 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.
> 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.
On Tue, Apr 25, 2023 at 6:26 PM Daniel Martín <mardani29 <at> yahoo.es> wrote:
> Zachary Kanfer <zkanfer <at> gmail.com> writes:
>
> >
> > Also, whatever the outcome of this patch, I think it would be advisable
> to
> > explain somewhere how mark-sexp extends region by the end of region
> > opposite point; this is not in the docstring or any other documentation
> > I've seen.
> >
>
> 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). The Emacs manual in
> section 12.1 Setting the Mark describes this use case well, I think:
>
> ‘C-x C-x’ is useful when you are
> satisfied with the position of point but want to move the other end of
> the region (where the mark is).
>
[Message part 2 (text/html, inline)]
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.