From unknown Thu Aug 14 12:25:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#65006 <65006@debbugs.gnu.org> To: bug#65006 <65006@debbugs.gnu.org> Subject: Status: 29.1.50; c-ts-mode: else block not indented right on TAB Reply-To: bug#65006 <65006@debbugs.gnu.org> Date: Thu, 14 Aug 2025 19:25:28 +0000 retitle 65006 29.1.50; c-ts-mode: else block not indented right on TAB reassign 65006 emacs submitter 65006 Mohammed Sadiq severity 65006 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 01 22:43:30 2023 Received: (at submit) by debbugs.gnu.org; 2 Aug 2023 02:43:30 +0000 Received: from localhost ([127.0.0.1]:48542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qR1ph-0002Jx-Ov for submit@debbugs.gnu.org; Tue, 01 Aug 2023 22:43:30 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qR1pc-0002Je-7b for submit@debbugs.gnu.org; Tue, 01 Aug 2023 22:43:27 -0400 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 1qR1pV-0002VE-Hq for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 22:43:18 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qR1pR-0001O9-8d for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 22:43:17 -0400 Received: by mail.gandi.net (Postfix) with ESMTPA id 068A6240004 for ; Wed, 2 Aug 2023 02:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sadiqpk.org; s=gm1; t=1690944189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TB1leonrBCvFny8TTIxVwzUsoUyASN/XFnbGuU/+oSg=; b=pYIsIMFt7cOrPEEPvMDflKlMg+fGwBbXHCoCVGohyKxrZglsAE6SZw4zIcur5QJHfASEX0 kqCDrhBXT4sMdNEtlebqLzX/UB5gVMURIFrBp/rlbWRNydpujp42CeLHRMyQsX9KaAgjEJ D73WlaZq9etnOxSOVTDwLAPAoJPbSSFVS67mY1WxAbrl9hD4uHkZHgEPaefZHu7RP2YNDO 4ikHesjS12Tlh9zmSBDH6bLuFOM96Nz7qRPIsRWlHUUrzFZRlAIN4D07YPuq96p3Hn5U/z 9HiqOQM/PtcDVOtVqw3mcOwYr5i+mSukMUk78OZE1+ancKg2uKeSOipcs3vdXA== MIME-Version: 1.0 Date: Wed, 02 Aug 2023 08:13:08 +0530 From: Mohammed Sadiq To: Bug-gnu Emacs Subject: 29.1.50; c-ts-mode: else block not indented right on TAB Message-ID: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> X-Sender: sadiq@sadiqpk.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: sadiq@sadiqpk.org Received-SPF: pass client-ip=217.70.183.193; envelope-from=sadiq@sadiqpk.org; helo=relay1-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) The else block in the following code is not indented on TAB: int main (void) { if (true) do_something (); else do_something_else (); } How to reproduce: 1. Select the complete buffer 2. Press TAB Expected result: do_something_else() should be indented afair, this did seem to work in the past. May be this happened after I updated treesitter-c module, idk. In GNU Emacs 29.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-08-01 built on purism Repository revision: 0c29f53ab8723dd5a9f31ce8a6e913cc08132e56 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --prefix=/usr' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_IN.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: C/* Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils c-ts-mode c-ts-common treesit cl-seq cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 59978 9655) (symbols 48 7209 0) (strings 32 20385 1935) (string-bytes 1 740617) (vectors 16 12951) (vector-slots 8 184640 13476) (floats 8 24 23) (intervals 56 252 0) (buffers 984 11)) From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 02 07:32:54 2023 Received: (at 65006) by debbugs.gnu.org; 2 Aug 2023 11:32:54 +0000 Received: from localhost ([127.0.0.1]:48962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRA62-0002LN-C3 for submit@debbugs.gnu.org; Wed, 02 Aug 2023 07:32:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRA61-0002LA-79 for 65006@debbugs.gnu.org; Wed, 02 Aug 2023 07:32:53 -0400 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 1qRA5v-0007ux-NH; Wed, 02 Aug 2023 07:32:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=x2fX4Qxw4M6HZgJptJOLYsnGC+JzFFDw99IzV2lnrag=; b=DyDTFhQeOYZ5 11yoLFVySnFjxv/RLIOby+rqZ4mQiIGAF3JoD+Qg9KWoT/pUh/J8ExEab55reVIObuFDmtrf8sDwU pgvxjLeq+6CxvwbH965RVyIlnkmfltgwL/O6nmY7rknKMif7YoBkhGGi5hT1Md/rqPPxPW4QNI7pQ 5qAHj8AJNIPGLNuPAD1z7hag0Y9Qwv5c9LTef3XDFVBLtwpAzYfNEm4BSx+MPY4JGZOQujN8ZTJMf 6CCCqzFwe2zvybVE0Oi9M5igl/HsDkq92ZdlXxglkA6PqZNjQyXj6895GkbXA4+2/W/VDs02U4osS rXd43GQz4cgbcZF31UQYmg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRA5t-0004U2-9k; Wed, 02 Aug 2023 07:32:46 -0400 Date: Wed, 02 Aug 2023 14:32:53 +0300 Message-Id: <83zg39znkq.fsf@gnu.org> From: Eli Zaretskii To: Mohammed Sadiq , Yuan Fu In-Reply-To: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> (message from Mohammed Sadiq on Wed, 02 Aug 2023 08:13:08 +0530) Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65006 Cc: 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 02 Aug 2023 08:13:08 +0530 > From: Mohammed Sadiq > > The else block in the following code is not indented on TAB: > > int > main (void) > { > if (true) > do_something (); > else > do_something_else (); > } > > How to reproduce: > 1. Select the complete buffer > 2. Press TAB > > Expected result: > do_something_else() should be indented > > afair, this did seem to work in the past. May be this > happened after I updated treesitter-c module, idk. Thank you for your report. Yuan, can you look into this, please? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 02 12:47:14 2023 Received: (at 65006) by debbugs.gnu.org; 2 Aug 2023 16:47:14 +0000 Received: from localhost ([127.0.0.1]:50069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRF0E-00056q-2m for submit@debbugs.gnu.org; Wed, 02 Aug 2023 12:47:14 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:52491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRF0B-00056Z-M0 for 65006@debbugs.gnu.org; Wed, 02 Aug 2023 12:47:12 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-686e29b058cso5170761b3a.1 for <65006@debbugs.gnu.org>; Wed, 02 Aug 2023 09:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690994826; x=1691599626; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1ZRSKfhOkERj4ANALf5E7tqGuuAFrJ7L3yQWtSJVbcM=; b=bA3MU7+hsuvgYaYEKNC8j6rX34rfttE4EU+pYf9SFP/37tqqVOZ+q0DzrOgyOEkk4U JAZxCNBPAB5GxHOlKcTl7cAGCnOcwwA0c0pWUUqyT6RtvR7XWNdgxdBihdM2Q2EeDHdf NYOoEyo5vvonyEWUKGLqx51Uj84AQZyJ2fcXrxqPfzktQ1/L9f1Ag5cr9Bl90itfPsjF usoWzhBwmVCHl+p9xg0MRsbfXmb4PMBCPGqFIfm0wU1EEA0GN/ebvPm6Eirz/Cp2oSpg 1CLqRzF8S3QxsKK6PtBNVtauwQumyGRZN/sEerXM92UNw54WR2sINfmdBPCNWUQRZdOu 7ZmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690994826; x=1691599626; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1ZRSKfhOkERj4ANALf5E7tqGuuAFrJ7L3yQWtSJVbcM=; b=dBHcrh/kaqq2JmvfDdwiGd57j1Oza4nM75U1+IIOQlFv16wUPpzR86myrXp08MwOZF lQRUE/bu8b5GBex3CBb2iKXqK3joUVDBfkuD1Y8fmo51EGFC4PxLmagQemamUePJX4Zw ztrnrsr89k26RYT5A39Sbg/8Ptqcv7OhYAgdS6Q+zpVCUozJ5uxr307AMeWttbyF8D8k 8gLiPP2nORpk1nek1y1P62/AI1QNLYFyLEolqJlJOp9BiLE8/cKzmtAH0KJVHxJ2fuus Zr9I+M2Qu165wAFGHPRHJ/lOY5Bb3m8Dgw2oTZGD3N83RAsTNFQ/6iaAuhEIEwINsKxg TiNA== X-Gm-Message-State: ABy/qLZ9xmhnx/sG5f7yKSAMy6NWuN9Qw2OAzb5PVlmaLKrMgjgp4Klb ZreWTdz4jAn8os79QDRLl54= X-Google-Smtp-Source: APBJJlG6/VEjVUrFMRnp0mRGa23TbA5SjGcCkI69krJFpCt6hcsZQ8RyXDvDQ/p5VqJ5zHXOwippbQ== X-Received: by 2002:a05:6a00:14cc:b0:680:40b2:5424 with SMTP id w12-20020a056a0014cc00b0068040b25424mr18933772pfu.23.1690994825863; Wed, 02 Aug 2023 09:47:05 -0700 (PDT) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id 6-20020aa79246000000b0068758701717sm2719194pfp.160.2023.08.02.09.47.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2023 09:47:05 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB From: Yuan Fu In-Reply-To: <83zg39znkq.fsf@gnu.org> Date: Wed, 2 Aug 2023 09:46:54 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <3B97B92B-BCBA-49B0-91EE-FD3F0CED268E@gmail.com> References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> <83zg39znkq.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3731.600.7) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65006 Cc: Mohammed Sadiq , 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Aug 2, 2023, at 4:32 AM, Eli Zaretskii wrote: >=20 >> Date: Wed, 02 Aug 2023 08:13:08 +0530 >> From: Mohammed Sadiq >>=20 >> The else block in the following code is not indented on TAB: >>=20 >> int >> main (void) >> { >> if (true) >> do_something (); >> else >> do_something_else (); >> } >>=20 >> How to reproduce: >> 1. Select the complete buffer >> 2. Press TAB >>=20 >> Expected result: >> do_something_else() should be indented >>=20 >> afair, this did seem to work in the past. May be this >> happened after I updated treesitter-c module, idk. Yeah, (sign) I can reproduce this with the latest tree-sitter-c grammar = but not the old one. Someone decides to add an else_clause node into the = grammar [1] two weeks ago. >=20 > Thank you for your report. >=20 > Yuan, can you look into this, please? Should the fix go into emacs-29 or master? We really need some way to mandate a version of grammar. These breaking = changes are far more frequent than I originally thought. Yuan [1] https://github.com/tree-sitter/tree-sitter-c/pull/115= From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 02 13:05:23 2023 Received: (at 65006) by debbugs.gnu.org; 2 Aug 2023 17:05:23 +0000 Received: from localhost ([127.0.0.1]:50090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRFHm-0005dL-ME for submit@debbugs.gnu.org; Wed, 02 Aug 2023 13:05:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRFHk-0005d6-GI for 65006@debbugs.gnu.org; Wed, 02 Aug 2023 13:05:21 -0400 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 1qRFHe-00049U-Pj; Wed, 02 Aug 2023 13:05:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=AKD9k7GXITi4aA4vWvDyUKwyN7la8UITICXKChwhgrM=; b=ZA9kcIErY0lI c5YzW8w23LZUm26Zcjkha85fB3CHE8rEZqUdJfE1h3ri/lsS+hn/lCb4MpoasoDHaebi/koYDAbpQ 1+JZOQ0tAC9UrjWX/jaPYnUNA7T1amXq3fnrGfNdHjuM36rCe6zArwkzOfwN0Z9qsH8UyXSSWJeHq SIJLpwWlnBYy6YCaR7n+kI6AvLnQzbWqAoW5rYODKXkYtlWuzH6E+DF1tvW8QpPyw7hHI4pf1ptPK FcZ9nnEgiZj+nXUPSr1hcUeqQZris8dVr13CoP8JlnwNNGukvjOSuocGVvmXk3kZN3pGgfM2qSv/F d0hieqiB7X7CS8i2DamGOg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRFHe-0006Ir-9G; Wed, 02 Aug 2023 13:05:14 -0400 Date: Wed, 02 Aug 2023 20:05:22 +0300 Message-Id: <83edklz86l.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <3B97B92B-BCBA-49B0-91EE-FD3F0CED268E@gmail.com> (message from Yuan Fu on Wed, 2 Aug 2023 09:46:54 -0700) Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> <83zg39znkq.fsf@gnu.org> <3B97B92B-BCBA-49B0-91EE-FD3F0CED268E@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65006 Cc: sadiq@sadiqpk.org, 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Wed, 2 Aug 2023 09:46:54 -0700 > Cc: Mohammed Sadiq , > 65006@debbugs.gnu.org > > >> afair, this did seem to work in the past. May be this > >> happened after I updated treesitter-c module, idk. > > Yeah, (sign) I can reproduce this with the latest tree-sitter-c grammar but not the old one. Someone decides to add an else_clause node into the grammar [1] two weeks ago. How was the else clause parsed in the previous versions of the grammar? Will the proposed fix work with the older versions of the grammar? > > Yuan, can you look into this, please? > > Should the fix go into emacs-29 or master? To emacs-29, please. > We really need some way to mandate a version of grammar. These breaking changes are far more frequent than I originally thought. Who will track all those versions and record which ones are supported? And many grammar libraries don't have versions at all, so we will have to track commits instead. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 02 13:37:33 2023 Received: (at 65006) by debbugs.gnu.org; 2 Aug 2023 17:37:33 +0000 Received: from localhost ([127.0.0.1]:50105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRFmu-0006PA-IU for submit@debbugs.gnu.org; Wed, 02 Aug 2023 13:37:33 -0400 Received: from out-122.mta0.migadu.com ([91.218.175.122]:60799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qREJc-00040a-0o for 65006@debbugs.gnu.org; Wed, 02 Aug 2023 12:03:14 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1690992190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ywC18CueqDVy4u6TGp+lIIavE83Oq4ygb81NNb116ns=; b=igTHiqV+PLZl42UcKmNB3tkomKWsAhBnYGDd/da2sGXu57klfRDc0LxEd1duLbYRFccF6b ovBBKYoikGNpInVlG7lP7E4UG6K1HeGLCSI6GmL7GZv9XBbxeO+59bbNqf6qYtjohRu+7X dl3y0mM0VSaG7dZhQzY/OWavgaDHC2s= From: john muhl To: Eli Zaretskii Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB In-Reply-To: <83zg39znkq.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 02 Aug 2023 14:32:53 +0300") References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> <83zg39znkq.fsf@gnu.org> Date: Wed, 02 Aug 2023 11:03:04 -0500 Message-ID: <87zg39xwhz.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65006 X-Mailman-Approved-At: Wed, 02 Aug 2023 13:37:31 -0400 Cc: 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Here is a patch that makes it work and fixes a couple of tests that were failing in the BSD style. Hope it helps. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-indentation-after-else.patch Content-Description: c-ts-mode-indent-patch >From 43f63fa9fdb5c6e77fd8928a521686ea0b847b2f Mon Sep 17 00:00:00 2001 From: john muhl Date: Wed, 2 Aug 2023 10:30:22 -0500 Subject: [PATCH] Fix indentation after else * lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Indent statement after else_clause. --- lisp/progmodes/c-ts-mode.el | 2 ++ test/lisp/progmodes/c-ts-mode-resources/indent.erts | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index f16e06942b9..95d3d43c096 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -452,6 +452,7 @@ c-ts-mode--indent-styles ;; These rules are for cases where the body is bracketless. ;; Tested by the "Bracketless Simple Statement" test. ((parent-is "if_statement") standalone-parent c-ts-mode-indent-offset) + ((parent-is "else_clause") standalone-parent c-ts-mode-indent-offset) ((parent-is "for_statement") standalone-parent c-ts-mode-indent-offset) ((parent-is "while_statement") standalone-parent c-ts-mode-indent-offset) ((parent-is "do_statement") standalone-parent c-ts-mode-indent-offset) @@ -478,6 +479,7 @@ c-ts-mode--indent-styles ((parent-is "labeled_statement") parent-bol c-ts-mode-indent-offset) ((parent-is "compound_statement") parent-bol c-ts-mode-indent-offset) ((parent-is "if_statement") parent-bol 0) + ((parent-is "else_clause") parent-bol 0) ((parent-is "for_statement") parent-bol 0) ((parent-is "while_statement") parent-bol 0) ((parent-is "switch_statement") parent-bol 0) diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index 221b3d809af..b6a30b8f969 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts @@ -478,3 +478,16 @@ main (void) { | =-=-= + +Name: Bracketless If/Else Clause + +=-= +int +main (void) +{ + if (true) + do_something (); + else + do_something_else (); +} +=-=-= -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 02 20:45:31 2023 Received: (at 65006) by debbugs.gnu.org; 3 Aug 2023 00:45:31 +0000 Received: from localhost ([127.0.0.1]:50269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRMT4-0000iL-NU for submit@debbugs.gnu.org; Wed, 02 Aug 2023 20:45:31 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:45177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRMT2-0000i6-2Z for 65006@debbugs.gnu.org; Wed, 02 Aug 2023 20:45:28 -0400 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-267f8f36a3cso187258a91.2 for <65006@debbugs.gnu.org>; Wed, 02 Aug 2023 17:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691023522; x=1691628322; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gbhWQvqvjH2czld2FIZW8+zJncPRpQBIhpAR5JxBhg0=; b=iuoexXYUbC5i7giKM+txrALHiwhvolNpTKxZLMN9kg13cZOIOXLmyuZvTq6S0/hDut ImvxeiX/asWdGRjERVQxYivURh8w59XP4MiLBnOiJpmfwcXWbNn8+Bepy7BlbPa7VY3l 4C56nAOXOdFMheAtscz+0sARKMN+ie3CKSKgmaQRDvNjN3kwbFoFOblqkYWLOpx1r7uX 5pV3UH1VpKNc7C7P3aAD9p4tYFUSiUKjfDE4QyslVnM45a6Ovfta5yiyNl7ccYNPwI8T vx1VSxValT2iJU0w8MSaMMmZoKznFKDjz9I1GUKZFBEj7AvccEEJ6x1xZcKnLR765EbZ sD8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691023522; x=1691628322; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gbhWQvqvjH2czld2FIZW8+zJncPRpQBIhpAR5JxBhg0=; b=KkVUN6cfGUdaHPzyvOU0fWILn1E69A0oyAfDltkmE19lm95rMkjLLjnCNiNFb7/Bmu RE27/Fe1gTrdQJ3ojy6GdsWfZ19ciGUKIRk1Et5NN+3dPZWtwqKnfSrqX066634KsSzf 5MJ63kRCuJ1YMnFfSt1So8Ld0PQM7/ubkGb955OEuaZtKiX4bnDPu1qQoiAsIBr9CI9P IE3dnLt3Exxd/nDwB9vAs2JVyeLySyHLyyW5xMUhr0GKnuT7o29I6Wn36wggdrd3WhkZ hpEgg0TpZgfHHkrZK5Vf56EOfVjaCjEgMdfpxpvGoqBouspZ1tKr7JlA+JEtnI6yL2ag PAZQ== X-Gm-Message-State: ABy/qLbZ+4hlGYuglZuldE3SftNVtqGC/NWdmojuxdUEUZTAX0/WSef7 eurjms7/ZlS59aNJ5uyiUJo= X-Google-Smtp-Source: APBJJlEScjGhWyBa+Ca8YTHnjWOYzuP51srksuF/wyRji6bhnqZlZAAWvUsWsgZH+BSjjUrpCekk5g== X-Received: by 2002:a17:90a:7023:b0:262:ff1c:bc33 with SMTP id f32-20020a17090a702300b00262ff1cbc33mr15052254pjk.13.1691023522077; Wed, 02 Aug 2023 17:45:22 -0700 (PDT) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id o22-20020a17090ac09600b002638e5d2986sm1571793pjs.17.2023.08.02.17.45.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2023 17:45:21 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB From: Yuan Fu In-Reply-To: <83edklz86l.fsf@gnu.org> Date: Wed, 2 Aug 2023 17:45:10 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <877E190B-7BFA-45AA-ACC6-2E288DFE2FBB@gmail.com> References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> <83zg39znkq.fsf@gnu.org> <3B97B92B-BCBA-49B0-91EE-FD3F0CED268E@gmail.com> <83edklz86l.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3731.600.7) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65006 Cc: Mohammed Sadiq , 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Aug 2, 2023, at 10:05 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Wed, 2 Aug 2023 09:46:54 -0700 >> Cc: Mohammed Sadiq , >> 65006@debbugs.gnu.org >>=20 >>>> afair, this did seem to work in the past. May be this >>>> happened after I updated treesitter-c module, idk. >>=20 >> Yeah, (sign) I can reproduce this with the latest tree-sitter-c = grammar but not the old one. Someone decides to add an else_clause node = into the grammar [1] two weeks ago. >=20 > How was the else clause parsed in the previous versions of the > grammar? It used to be something like this: (if_statement if condition: (xxx) consequence: (xxx) else alternative: (xxx)) Now it=E2=80=99s like this: (if_statement if condition: (xxx) consequence: (xxx) alternative:=20 (else_clause else (xxx))) For the reason of the change, you can check out the link in my previous = email. The justification is IMO insubstantial, to say the least :-( > Will the proposed fix work with the older versions of the grammar? Yes >>> Yuan, can you look into this, please? >>=20 >> Should the fix go into emacs-29 or master? >=20 > To emacs-29, please. Ok. >> We really need some way to mandate a version of grammar. These = breaking changes are far more frequent than I originally thought. >=20 > Who will track all those versions and record which ones are supported? > And many grammar libraries don't have versions at all, so we will have > to track commits instead. We can request tree-sitter to add versioning to languages, which won=E2=80= =99t happen any time soon; or we can pin the commits (which is what = neovim does), but I know that=E2=80=99s against our policy. I don=E2=80=99= t really have a good solution. But having our packages randomly break = all the time is bad, and keep adapting all these breaking changes is = also a significant burden on Emacs maintainers. And the speed in which = we fix these breakages can never match the speed in which they bring = them. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 03 02:37:49 2023 Received: (at 65006) by debbugs.gnu.org; 3 Aug 2023 06:37:49 +0000 Received: from localhost ([127.0.0.1]:50557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRRy1-00024e-1q for submit@debbugs.gnu.org; Thu, 03 Aug 2023 02:37:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRRxy-00024O-NL for 65006@debbugs.gnu.org; Thu, 03 Aug 2023 02:37:48 -0400 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 1qRRxs-0002RT-IP; Thu, 03 Aug 2023 02:37:40 -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=X7bSIkK6wIaJRn0dCSyv4sOD84YnRi/8lZPTFNxMaeE=; b=a+T3fC2Tb/4CAUlSBoBx OJiYPqJ1qJ1nlOv+m+b4ecwgO2X1wjfT+O8y6SivNmQZGdgYJvkHZWrbzuzSu8Ppwq6s+hx+ZC5RM UqQjW4sv0bDDSU+BE0GEw0EWrGCZaC0/0s01UHvHAzoAYIV+CPxE0XXQh7ILOtmVYx1wy4OAIUVBH 81Mxfc6wlffzayaec9Xn9NWeRfhzREWGaynn1tNTr0dK7oOm2YlLlGBWIJ2LyvVKmouzqcmlbYdmw IDXvJla/Dmt56/q1X0OJYzgWEFV0PWfKGNSQrLvxKlrxyEQ0DWdhRYFzWwqP2OCE+6qMAuG3UOgkk H/SBVFHNTZAUCQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRRxr-0000F7-T8; Thu, 03 Aug 2023 02:37:40 -0400 Date: Thu, 03 Aug 2023 09:37:49 +0300 Message-Id: <835y5wzl4y.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <877E190B-7BFA-45AA-ACC6-2E288DFE2FBB@gmail.com> (message from Yuan Fu on Wed, 2 Aug 2023 17:45:10 -0700) Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> <83zg39znkq.fsf@gnu.org> <3B97B92B-BCBA-49B0-91EE-FD3F0CED268E@gmail.com> <83edklz86l.fsf@gnu.org> <877E190B-7BFA-45AA-ACC6-2E288DFE2FBB@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65006 Cc: sadiq@sadiqpk.org, 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Wed, 2 Aug 2023 17:45:10 -0700 > Cc: Mohammed Sadiq , > 65006@debbugs.gnu.org > > > On Aug 2, 2023, at 10:05 AM, Eli Zaretskii wrote: > > > >> From: Yuan Fu > >> Date: Wed, 2 Aug 2023 09:46:54 -0700 > >> Cc: Mohammed Sadiq , > >> 65006@debbugs.gnu.org > >> > >>>> afair, this did seem to work in the past. May be this > >>>> happened after I updated treesitter-c module, idk. > >> > >> Yeah, (sign) I can reproduce this with the latest tree-sitter-c grammar but not the old one. Someone decides to add an else_clause node into the grammar [1] two weeks ago. > > > > How was the else clause parsed in the previous versions of the > > grammar? > > It used to be something like this: > > (if_statement > if > condition: (xxx) > consequence: (xxx) > else > alternative: (xxx)) > > Now it’s like this: > > (if_statement > if > condition: (xxx) > consequence: (xxx) > alternative: > (else_clause else > (xxx))) > > For the reason of the change, you can check out the link in my previous email. The justification is IMO insubstantial, to say the least :-( Maybe we should track all those discussions, and voice our opinion against changes whose reasons are not strong enough to justify breakage? For example, this particular PR was around since Sep 2022, so we should have had ample time to voice our objections. OTOH, they say that parsers for other languages already have else_clause in their grammars. So maybe this change is somewhat to the better, at least when features common to several languages are considered? And anyway, this again raises the issue of Someone™ volunteering to keep track of these developments. We already have 14 TS-based modes in Emacs (on master), so this is not a trivial job, I think. > > Will the proposed fix work with the older versions of the grammar? > > Yes > > >>> Yuan, can you look into this, please? > >> > >> Should the fix go into emacs-29 or master? > > > > To emacs-29, please. > > Ok. Given that the change doesn't affect old parsers, please install on the emacs-29 branch as soon as you are okay with the changes. > >> We really need some way to mandate a version of grammar. These breaking changes are far more frequent than I originally thought. > > > > Who will track all those versions and record which ones are supported? > > And many grammar libraries don't have versions at all, so we will have > > to track commits instead. > > We can request tree-sitter to add versioning to languages, which won’t happen any time soon; or we can pin the commits (which is what neovim does), but I know that’s against our policy. I don’t really have a good solution. But having our packages randomly break all the time is bad, and keep adapting all these breaking changes is also a significant burden on Emacs maintainers. And the speed in which we fix these breakages can never match the speed in which they bring them. I agree that we have a problem here. The only question is how to solve it in a reasonable way that will hold given our development and release schedules, and given the schedules of users and distros upgrading the Emacs versions. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 07 12:42:29 2023 Received: (at 65006) by debbugs.gnu.org; 7 Aug 2023 16:42:29 +0000 Received: from localhost ([127.0.0.1]:34157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT3JN-0002vW-40 for submit@debbugs.gnu.org; Mon, 07 Aug 2023 12:42:29 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:59418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT3JI-0002vF-Ns for 65006@debbugs.gnu.org; Mon, 07 Aug 2023 12:42:28 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-686f38692b3so4701028b3a.2 for <65006@debbugs.gnu.org>; Mon, 07 Aug 2023 09:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691426539; x=1692031339; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=p7OyDpDIQpCF2KcPWuY1rPJMR5DtFDjp+95sQHkr3U4=; b=JpJ7crFP1a6tn0MbZATLfvOB2Uo+aPUR9ADj5DeSQPmzDz9ODympCgTNHV6SIyjwEQ 7w/6TZO/75hfYYBiFgd3fC8f7iJrg5FfxFx3o+mWIP45D9YnUvORSLNBuYxqpjAE0kZ2 B2FmmcYpMClL6GmsoeTp4tw+ot6XVp7ZiboP/Nmw5w3NxW5geVeEHzoCMU4fnRQJdJb2 eAPo046dpqTYycxBeNUlbEjws/sIlEQt0Je9YAtCTKzvwU9asKIbwa2vN3eUYG4oyfRC WhfBquAhyb4FjUqNJ2Ez0PCFsT+zZLdsfYWY/dpu1haNDzSWRAnMvvjpTUgB3a3Jyjv6 mmIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691426539; x=1692031339; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p7OyDpDIQpCF2KcPWuY1rPJMR5DtFDjp+95sQHkr3U4=; b=I+DelvsRfSxZ7QAdDT9oduA1xOSZwe4kHxiMiOoTgYjFOmY1Mp7pWnHFjO9UZQUbUn cTK8SWNMuse9/MY5kx27bWS1DdfIGP7ga0NICCO+00eM9VetfXhnz5JNwS1uaVoGtOH7 fslaJBWjN86aIEt0cbykctE3PtIUxx6R6CJKH7V/6c7Ehh+e0fyuhIvLR2Jcj1D3PEuC CeHKDxDhboRDvYu54qjrwoaDsgAVnX8K+fQ+U3M0ZKw+9uWUw//mJm3PdWKUWCt9Mv1c H7/mLEE4B0LvuZzxOcU42yK9jCwz71Bt8GslOhumpse6pwo91bTf+haRJzV3m6NC6jGi W5bA== X-Gm-Message-State: AOJu0YyjibDCgbAyxSN4ZbP9QOBx4rIC3D24ezQCvpj3E3HoaDpObdbx f2Wrw0ijV3WZ2rSGEVgBPdc= X-Google-Smtp-Source: AGHT+IFFfS/D8/Z3LinWzzlDSicdWbypJGPyuWf0mSLrXi4cSmMy7xa/Hu/Y83oxnQgxJ0Wyxnl+xw== X-Received: by 2002:a05:6a00:21d5:b0:687:7d09:c0f with SMTP id t21-20020a056a0021d500b006877d090c0fmr11603425pfj.12.1691426538900; Mon, 07 Aug 2023 09:42:18 -0700 (PDT) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id 3-20020aa79203000000b006874a6e74b4sm6338473pfo.151.2023.08.07.09.42.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Aug 2023 09:42:18 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB From: Yuan Fu In-Reply-To: <87zg39xwhz.fsf@pub.pink> Date: Mon, 7 Aug 2023 09:42:07 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <7293D52A-F320-42CC-ADF3-D96F66839F98@gmail.com> References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> <83zg39znkq.fsf@gnu.org> <87zg39xwhz.fsf@pub.pink> To: john muhl X-Mailer: Apple Mail (2.3731.600.7) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65006 Cc: Eli Zaretskii , 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Aug 2, 2023, at 9:03 AM, john muhl via Bug reports for GNU Emacs, = the Swiss army knife of text editors wrote: >=20 > Here is a patch that makes it work and fixes a couple of tests that = were > failing in the BSD style. Hope it helps. >=20 > <0001-Fix-indentation-after-else.patch> Thanks, that=E2=80=99s what I would do and it has a test! John, do you = have FSF assignment/git write access? Yuan= From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 08 00:57:23 2023 Received: (at 65006) by debbugs.gnu.org; 8 Aug 2023 04:57:23 +0000 Received: from localhost ([127.0.0.1]:34756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTEmV-0005d6-OU for submit@debbugs.gnu.org; Tue, 08 Aug 2023 00:57:23 -0400 Received: from out-96.mta0.migadu.com ([2001:41d0:1004:224b::60]:21090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT5BS-0006KI-Pk for 65006@debbugs.gnu.org; Mon, 07 Aug 2023 14:42:29 -0400 References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> <83zg39znkq.fsf@gnu.org> <87zg39xwhz.fsf@pub.pink> <7293D52A-F320-42CC-ADF3-D96F66839F98@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1691433745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H0GWpeVYkRex8G2WvxgQj+wGZnWBH8nEZ1zQdGCmLsc=; b=RCDYJ2NfL8fXT2DGke3utjnH54RImtCCqVrGae6zBXc24BfOlbBk1s+8Iqy933GQawS4Lt MhKJXtnB35zVm0N/AnCKtavoCHvpOKVQDyQcsHgK3WXIIdzEwi5gabIrkFD+txoa3WvWiM tGPLEJBkwubdR/xJqkTVIn0IXOT1Ahw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: john muhl To: Yuan Fu Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB Date: Mon, 07 Aug 2023 13:29:53 -0500 In-reply-to: <7293D52A-F320-42CC-ADF3-D96F66839F98@gmail.com> Message-ID: <87pm3y1ypj.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65006 X-Mailman-Approved-At: Tue, 08 Aug 2023 00:57:17 -0400 Cc: Eli Zaretskii , 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Yuan Fu writes: >> On Aug 2, 2023, at 9:03 AM, john muhl via Bug reports for GNU Emacs, >> the Swiss army knife of text editors wrote: >>=20 >> Here is a patch that makes it work and fixes a couple of tests that were >> failing in the BSD style. Hope it helps. >>=20 >> <0001-Fix-indentation-after-else.patch> > > Thanks, that=E2=80=99s what I would do and it has a test! John, do you ha= ve > FSF assignment/git write access? Yes on the assignment. No on git write access. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 08 00:57:26 2023 Received: (at 65006) by debbugs.gnu.org; 8 Aug 2023 04:57:26 +0000 Received: from localhost ([127.0.0.1]:34758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTEmZ-0005dC-Bv for submit@debbugs.gnu.org; Tue, 08 Aug 2023 00:57:26 -0400 Received: from out-116.mta0.migadu.com ([91.218.175.116]:43975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qT5rr-0007cB-04 for 65006@debbugs.gnu.org; Mon, 07 Aug 2023 15:26:16 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1691436373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YBsEx8uOsYzOTXjEwhm4efDiSABBL2e7D8xMWsxu2fk=; b=xHsT6H9yufXmeGRjWd9mZFMRgaMLCEaj4ev+46NYBUoDnOjF/8VrijHRzbgWgoqHO+vCH3 VKSnej3e++WW9SnQ3y+AKP5yei+TgR0ylOVfF8/pNSmqhHk7DRzqZZeQ9GWeFQFU8RkWwh U2exxfmcnrZ9TuWoQ4fJYVp+drwsSO0= From: john muhl To: Eli Zaretskii Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB In-Reply-To: <835y5wzl4y.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Aug 2023 09:37:49 +0300") References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> <83zg39znkq.fsf@gnu.org> <3B97B92B-BCBA-49B0-91EE-FD3F0CED268E@gmail.com> <83edklz86l.fsf@gnu.org> <877E190B-7BFA-45AA-ACC6-2E288DFE2FBB@gmail.com> <835y5wzl4y.fsf@gnu.org> Date: Mon, 07 Aug 2023 14:26:11 -0500 Message-ID: <87msz21woc.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 65006 X-Mailman-Approved-At: Tue, 08 Aug 2023 00:57:17 -0400 Cc: Yuan Fu , 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Maybe we should track all those discussions, and voice our opinion > against changes whose reasons are not strong enough to justify > breakage? For example, this particular PR was around since Sep 2022, > so we should have had ample time to voice our objections. > > And anyway, this again raises the issue of Someone=E2=84=A2 volunteering = to > keep track of these developments. We already have 14 TS-based modes > in Emacs (on master), so this is not a trivial job, I think. I=E2=80=99m now subscribed to all of the relevant grammar repos and will tr= y to keep up with changes there. I=E2=80=99m probably not the right person to vo= ice an opinion on them without consulting higher authorities but hopefully that part won=E2=80=99t be required very often. > I agree that we have a problem here. The only question is how to > solve it in a reasonable way that will hold given our development and > release schedules, and given the schedules of users and distros > upgrading the Emacs versions. Do you think the benefit of having ts modes be core packages would be enough to justify whatever extra work that entails? It wouldn=E2=80=99t help with syncing up release schedules but =E2=80=9Cinstall the latest version f= rom ELPA=E2=80=9D might be enough better of an answer than =E2=80=9Cwait for th= e next Emacs release or build from master=E2=80=9D for most people. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 08 07:02:06 2023 Received: (at 65006) by debbugs.gnu.org; 8 Aug 2023 11:02:06 +0000 Received: from localhost ([127.0.0.1]:35340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTKTW-0007ix-0a for submit@debbugs.gnu.org; Tue, 08 Aug 2023 07:02:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTKTT-0007iR-I7 for 65006@debbugs.gnu.org; Tue, 08 Aug 2023 07:02:04 -0400 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 1qTKTN-00047b-Va; Tue, 08 Aug 2023 07:01:57 -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=kRTPqZL5urvvFeN0oxaudbyhFyxVd/a6P+R2A2SPcH4=; b=DM3ZC1ZaRXKYqmAPdWRq isdlD2JgPW70mG7hx9ZLHuhP5/CsaDH95SXxs8N85wWEneuG9FkA96FbrHLjgXsU7p4kvBUOXekLw vwptjH7JfTU3uQJwFohe2IoXuod5MDO2w01YMbOfD2hefiQsORe2+z+uIHWQ/9kLq8d7BRacf8WX+ dQByAfllE0i40HohlUS5VRScPlEMaCbfl13sK0VgcqD92ELE21cs7zSTjLjf/lsdcu7Uw7Z/ieysc Vd2MpxRI/vsubupxbu/p4K1YDjqdjAMhvLjo78KQMu4nP745s5xYnLHrn2neHS8tlp/esoJ20QKvQ Szu7fr4YbkJ6PA==; Date: Tue, 08 Aug 2023 14:02:18 +0300 Message-Id: <83bkfhokzp.fsf@gnu.org> From: Eli Zaretskii To: john muhl In-Reply-To: <87msz21woc.fsf@pub.pink> (message from john muhl on Mon, 07 Aug 2023 14:26:11 -0500) Subject: Re: bug#65006: 29.1.50; c-ts-mode: else block not indented right on TAB References: <59aa8ff84460f695fbf94db4849f1596@sadiqpk.org> <83zg39znkq.fsf@gnu.org> <3B97B92B-BCBA-49B0-91EE-FD3F0CED268E@gmail.com> <83edklz86l.fsf@gnu.org> <877E190B-7BFA-45AA-ACC6-2E288DFE2FBB@gmail.com> <835y5wzl4y.fsf@gnu.org> <87msz21woc.fsf@pub.pink> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65006 Cc: casouri@gmail.com, 65006@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: john muhl > Cc: Yuan Fu , 65006@debbugs.gnu.org > Date: Mon, 07 Aug 2023 14:26:11 -0500 > > Eli Zaretskii writes: > > > Maybe we should track all those discussions, and voice our opinion > > against changes whose reasons are not strong enough to justify > > breakage? For example, this particular PR was around since Sep 2022, > > so we should have had ample time to voice our objections. > > > > And anyway, this again raises the issue of Someone™ volunteering to > > keep track of these developments. We already have 14 TS-based modes > > in Emacs (on master), so this is not a trivial job, I think. > > I’m now subscribed to all of the relevant grammar repos and will try to > keep up with changes there. I’m probably not the right person to voice > an opinion on them without consulting higher authorities but hopefully > that part won’t be required very often. Thank you. Please post here whenever you see some changes planned that might affect Emacs, and we will take it from there. > > I agree that we have a problem here. The only question is how to > > solve it in a reasonable way that will hold given our development and > > release schedules, and given the schedules of users and distros > > upgrading the Emacs versions. > > Do you think the benefit of having ts modes be core packages would be > enough to justify whatever extra work that entails? It wouldn’t help > with syncing up release schedules but “install the latest version from > ELPA” might be enough better of an answer than “wait for the next Emacs > release or build from master” for most people. I think it's too early for us to make such conclusions. We need to collect more data points and experience. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 21 07:09:10 2023 Received: (at control) by debbugs.gnu.org; 21 Aug 2023 11:09:10 +0000 Received: from localhost ([127.0.0.1]:55687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qY2mU-0001ZC-EQ for submit@debbugs.gnu.org; Mon, 21 Aug 2023 07:09:10 -0400 Received: from mout.gmx.net ([212.227.17.20]:51797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qY2mS-0001Z0-I6 for control@debbugs.gnu.org; Mon, 21 Aug 2023 07:09:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1692616140; x=1693220940; i=michael.albinus@gmx.de; bh=K+2fO8qJn5sxOlkdLIJPT1FSyl5+wEFi3S+FXN/+hcc=; h=X-UI-Sender-Class:Date:To:From:Subject; b=MQUFfjf+2GWSbJQTDNfGqNERMGDAT+snd5hUnTVPtPD6Et9l4GNiUwZP5D3h5QdQGDKdAGv EJ8BfO/Klj/2TEakUt5P7ZJsupuOJRJImriwdP8ma2HOZVZb8k7iNFiEkESxNXkpOX2L7K33x IhTUppX0Ot/KJzrSqFlRsjB+0tCIMurORVOswMW9BInaCkrZPTUAaOo8OZpzKjK9Gm56PTmeD ccL1bD2zrRB2jDxvHheSQvHq9HQDFGq+DYv+C1jhi1gd6NQ8LZqWFM9XLuQqAphYIbK6K8ap0 JE6ZREt7AGIdiQe+PXdASvjW+TNZLtIdfF0OQTGtt6lkSIsFFxUg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.16]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mr9Bu-1pvBOs0yW6-00oFYY for ; Mon, 21 Aug 2023 13:09:00 +0200 Date: Mon, 21 Aug 2023 13:08:59 +0200 Message-Id: <87350c4ppw.fsf@gmx.de> To: control@debbugs.gnu.org From: Michael Albinus Subject: control message for bug #65026 X-Provags-ID: V03:K1:mUb0+wzB9GnluhX6CBd+qrLADnciJqY9L3Yd8Q+V3z+MrrUkWid ousK955I+MXNIpMXBVKnQxwOCTculb3OdAvxC4Lrf9ykOKNGI80RGcqvqj7w5CVqKCcEaCB oV3pJ0+H14p2DQBI3BCkkzZDsiTexbkOqAbZEDW9/O/PuGN3NOkmpuWfUxFPW/SD1T8gsdy fBR4uBFHRy4zJhmoatCjg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:2gA8N4QxsMc=;aR5LOoT9Hmr93uvuYh7D/a2s1Za l3sJ7SfG1/E4+LmuFcncsh2++NjPwlLuDtkK7agSA5lZlRNAEPYt9ouxaBtOk3I4pIc2EU7Ad 8tbpvXVh85EuZ6XB88Rx0IxQb2n+WNInNAGdFza8tHRMmCLbDaLXVaXLau+w8dVdCVXVpUunv 8MlwFRbUe5EGTm7zhZ8SXT8I35lLJZw51tjn3H+xPelWMRg2VTTRleqB6QHKoTuepGk3e/btE s2I2Tbpgjo29KeQIECE4Rxu5yXjlmdnI/qEcynM+L6EFOPFp8maVGd+WUYLGP1M0ErSc0OKsH 6Crmpi+BL3v1NA0zUJUShbVBFl/FQV0HjEZe3dusyFbMMpBj/J+ywo4nouzdu2SFNoDMqS3TN Bj9symD2UxtlThk2HhV995wC6tE4VuwaFHw4l7usDxBzQ5t4vzuQ4I7FJg4lay+nn9XZQIjUz gArBWis83dVsGOa1ncbce6Lr72dibETdx/apwzGQX2/nPXQwV3j60a4qBgVSQ6tdAyeiCJTg3 CiY/fMCbGrb0Fpc0uBRL3+p4uwdllLdOcjrA87ni32lhuGIup19mla7VF9VCzGjYjcsup9A/W T1nMxyZRoKTYPJRUwqeDUFRe+63qM4Pc+ZuYUNTwCscXv/Ywi9h4+qZrNBuzGQ5E5VibCQw/e 8HRwOxU/cyqNkZseEVCVy7XBxIQCrpMd8rrL3mU8VBUvO6/p/L7zqX2vC8Q4QG4PiX64gndqf k5I09j5WDIOOIoQKE4a9PyJxpfa0TH+aEVRUZAfpismSEW632gsKuI3RCPyGXK+LfcOxFE0VL cZ5rF+bpJeSwIrZ5eRJFBaxFBKe35+cZOvbgOozIxMDZfWueIDCiv+uxvYsjFanKuS6FrLZP1 OvDARBumLGRKzHu9zMeFm3k+8uq0euwv2UM36oxKAYtHlDcT2LHhlwMRNkhFhmftmaRCgUIgn zQsHIA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) merge 65026 65006 quit From unknown Thu Aug 14 12:25:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 16 Oct 2023 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator