From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65182: 29.1.50; c-ts-mode wants to outdent brace Date: Wed, 09 Aug 2023 19:34:12 +0300 Message-ID: <835y5okwe3.fsf@gnu.org> References: <878rak8chv.fsf@gmail.com> <83a5v0kwrh.fsf@gnu.org> <87zg306uvf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32327"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65182@debbugs.gnu.org, casouri@gmail.com To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 09 18:34:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qTm8c-0008B4-TU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Aug 2023 18:34:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTm8J-0004DK-Nr; Wed, 09 Aug 2023 12:34:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTm8I-0004BG-53 for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2023 12:34:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTm8H-00072s-Td for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2023 12:34:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qTm8H-0004yW-PI for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2023 12:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 16:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65182 X-GNU-PR-Package: emacs Original-Received: via spool by 65182-submit@debbugs.gnu.org id=B65182.169159883519110 (code B ref 65182); Wed, 09 Aug 2023 16:34:01 +0000 Original-Received: (at 65182) by debbugs.gnu.org; 9 Aug 2023 16:33:55 +0000 Original-Received: from localhost ([127.0.0.1]:40412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTm8A-0004yA-Ob for submit@debbugs.gnu.org; Wed, 09 Aug 2023 12:33:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTm88-0004xx-Q5 for 65182@debbugs.gnu.org; Wed, 09 Aug 2023 12:33:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTm83-00070u-FH; Wed, 09 Aug 2023 12:33:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=cTF8xvCewUTLtg6UKdQ9JzGX36eQDfSaW8f8+iVfOhU=; b=pzgpNOHjXARXRtMHPBuA WzmUQN8X97F2AG/bFxd2Jvr1cruqbNZx7t5LnTYGEzro1Q6wgBNa3FJJwIov/GEY243OX7+oRZ62y IaJBWSAOt6TUu6W1tLozQu7FQEWMVWUWYDVrQCK3/U6yG8gCzItnV1IVFO9FG/3jOyRITZjm+l4fH 5IEUgxPm9PYy4yC/79KXTdMkqX3DtesF5lYtLb71Irt7yTGwvzEjcq59fnBXQ6DQ86ta7jWhIHvE0 bUvf/bvWJqo3SpVvlxbD7IeUYdsqlcTgQ44qocZpoTW/02Qnaw8cucVfJJ3oh+mNq0AU/GeLuNyYy dxuFP6zc9Q/ZCw==; In-Reply-To: <87zg306uvf.fsf@gmail.com> (message from Robert Pluim on Wed, 09 Aug 2023 18:30:44 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267052 Archived-At: > From: Robert Pluim > Cc: Yuan Fu , 65182@debbugs.gnu.org > Date: Wed, 09 Aug 2023 18:30:44 +0200 > > >>>>> On Wed, 09 Aug 2023 19:26:10 +0300, Eli Zaretskii said: > > >> From: Robert Pluim > >> Date: Wed, 09 Aug 2023 17:24:44 +0200 > >> > >> > >> >From an emacs-29 checkout: > >> > >> src/emacs -Q src/process.c > >> M-g g 6025 RET > >> TAB ; nothing happens > >> M-x c-ts-mode > >> TAB ; the '{' moves left two spaces > >> > >> The code around there looks like this: > >> > >> #ifdef HAVE_GNUTLS > >> /* If we have an incompletely set up TLS connection, > >> then defer the sentinel signaling until > >> later. */ > >> if (NILP (p->gnutls_boot_parameters) > >> && !p->gnutls_p) > >> #endif > >> { <= line 6025 > >> pset_status (p, Qrun); > >> /* Execute the sentinel here. If we had relied on > >> status_notify to do it later, it will read input > >> from the process before calling the sentinel. */ > >> exec_sentinel (proc, build_string ("open\n")); > >> } > >> > >> Iʼd tell you what my libtree-sitter-c version was if I knew how to get > >> that information. I installed it on July 28th > >> > >> (I donʼt think this is a duplicate of bug#65006, the patch there does > >> not affect this behaviour) > > Eli> It's most probably because of the preprocessor mess around the line. > > Maybe, but c-mode works fine. Sure. The problem with c-ts-mode is because the tree-sitter C parser doesn't really grok cpp directives, since they are not part of the C language grammar. We have some workarounds in some cases, but I'll let Yuan chime in about this particular one.