GNU bug report logs - #62238
30.0.50; Unusual interpretation of "S-expressions" in c-ts-mode

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Fri, 17 Mar 2023 09:53:01 UTC

Severity: normal

Found in version 30.0.50

Full log


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

From: Yuan Fu <casouri <at> gmail.com>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 62238 <at> debbugs.gnu.org, theodor thornhill <theo <at> thornhill.no>
Subject: Re: bug#62238: 30.0.50; Unusual interpretation of "S-expressions" in
 c-ts-mode
Date: Sat, 18 Mar 2023 01:00:16 -0700

> On Mar 17, 2023, at 2:52 AM, Philip Kaludercic <philipk <at> posteo.net> wrote:
> 
> 
> X-Debbugs-CC: Theodor Thornhill <theo <at> thornhill.no>, Yuan Fu <casouri <at> gmail.com>
> 
> Take this code block, where | is the position of the point.
> 
> if (foo)|{
>  bar;
>  baz;
> }
> 
> When I press C-M-SPC to mark a "S-expression" (knowing that C doesn't
> consist of S-Expressions), then I would assume that the region from the
> current point until the closing bracket would be selected.  Instead I
> get the region from the point up until after the first semicolon.
> 
> When I press C-M-SPC again, I get the second one as well, but a third
> press refuses to go on.  So I never get the entire block.
> 
> I do not know if this is intentional, but it also applies to movement
> and killing.  This is also particularly unintuitive when matching pairs
> are highlighted (in this case the brackets), which always (?) matches
> the interpretation of sexp-commands.

I tested this on my Emacs session and vanilla session, and both marked to the closing bracket. I believe forward-sexp should just work by the syntax table. Perhaps it’s your config or something?

Yuan



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

Previous Next


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