From unknown Thu Jun 19 14:06:30 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#76908 <76908@debbugs.gnu.org> To: bug#76908 <76908@debbugs.gnu.org> Subject: Status: 31.0.50; Extending c-ts-common-baseline-indent-rule Reply-To: bug#76908 <76908@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:06:30 +0000 retitle 76908 31.0.50; Extending c-ts-common-baseline-indent-rule reassign 76908 emacs submitter 76908 jm@pub.pink severity 76908 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 09 22:55:58 2025 Received: (at submit) by debbugs.gnu.org; 10 Mar 2025 02:55:58 +0000 Received: from localhost ([127.0.0.1]:35583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1trTJ7-0003CQ-WF for submit@debbugs.gnu.org; Sun, 09 Mar 2025 22:55:58 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49476) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1trTJ2-0003Bv-0e for submit@debbugs.gnu.org; Sun, 09 Mar 2025 22:55:55 -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 1trTIt-0001ZD-Jn for bug-gnu-emacs@gnu.org; Sun, 09 Mar 2025 22:55:43 -0400 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1trTIq-0007oo-Rg for bug-gnu-emacs@gnu.org; Sun, 09 Mar 2025 22:55:42 -0400 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.stl.internal (Postfix) with ESMTP id 9E3FC254017A for ; Sun, 9 Mar 2025 22:55:36 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Sun, 09 Mar 2025 22:55:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm1; t=1741575336; x=1741661736; bh=Gsl70GQC7n DZs7M82TLmuPGMzwMrwXU6Hh1l0uIyhmg=; b=xJHF3WvFy9eQB2OiqTa5tld91O J/mJ4abtkotkd6w6AdktAEr3gtPdbdGaS+hOgC80ULZ4usxdNnJXNwJ2juuIN2rF ew+AIt4byWv8O8GMJvPw35XeEq/T6ig74i6pvwWorGqdMGk33AAuQBMZbwt7Xh1n QVEXIgqmMNRPdIMlDYI35rhx2eSDJdNYnHkzHxjP1b5bI/52p1RDUKZ4Xhfl0Ktm HXr/vdsRovNPhS9qahIWdRaspY26vfqooQw0x9LuG+MmSYtvsb9saSUmnBOMEqnQ +UUGhsJ8zG8ftNCXHZHETNFAKDoh5sSGi8vgo+bt3fa96k5o9Ly6Mg7oRkiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1741575336; x=1741661736; bh=Gsl70GQC7nDZs7M82TLmuPGMzwMrwXU6Hh1 l0uIyhmg=; b=oEJaVGAuZpEjVnQ+ge0kzJgdXXGL/rlFnG9brYrS72wkxkfdgwK XlMfWghe1XF4Uvn11HQNgUW0cSZHdwpsVCAbt7G92delwkyEOS+yIWGh6dC3rqVD gnxN4fE3iIx14ln82K/jtHNI9w9k6FEdn5ZR4BdjJRSLl3siIR0Tx6Wjf5d3BNeu SWC4ED7Wo4f2Fnt8ZQwySTopBSFtQjm9sHu2qix/Mc9FGrxOq7oPl02sUx5Xkvxj kdpDgD8G88iv0Qf4AMAQAA4SDMj7vbnwOmXzHeDox+1V5gPF1B1TQrIIAuvpS+yF SMqyh505QXX35oNZ0s9nOmundS+cj3orCpQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduudekudelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf fufffkgggtgfesthhqredttddtjeenucfhrhhomhepjhhmsehpuhgsrdhpihhnkhenucgg tffrrghtthgvrhhnpeejfffhfedtudelgedtjeejleejlefgteevhfeuhfetvdelgfdvff fhvdekvefhieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehjmhesphhusgdrphhinhhkpdhnsggprhgtphhtthhopedupdhmohguvgepshhmth hpohhuthdprhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i74194916:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 9 Mar 2025 22:55:35 -0400 (EDT) From: jm@pub.pink To: bug-gnu-emacs@gnu.org Subject: 31.0.50; Extending c-ts-common-baseline-indent-rule X-Debbugs-Cc: Yuan Fu Date: Sun, 09 Mar 2025 21:55:24 -0500 Message-ID: <87r0357fxf.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=202.12.124.158; envelope-from=jm@pub.pink; helo=fhigh-b7-smtp.messagingengine.com 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_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) 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.3 (/) Hi Yuan. I=E2=80=99ve been working on replacing some of the bespoke indentation rules in lua-ts-mode with c-ts-common-baseline-indent-rule and ran into one spot it didn=E2=80=99t handle. If the parent (table, args, params) starts with a comment all the siblings follow that indentation instead of ignoring the comment and falling back to the default indent-offset; e.g. -- currently lua-ts-mode indents like: local my_table =3D { -- there is a comment here x_offset =3D 12, y_offset =3D 30, } -- using c-ts-common-baseline-indent-rule we get: local my_table =3D { -- there is a comment here x_offset =3D 12, y_offset =3D 30, } And similarly for arguments & parameters: -- current: very_fun(-- do the very fun stuff "This is a string", 3.1415926535897932, { x =3D 1, y =3D 2 }, ) -- c-t-c-b-i-r: very_fun(-- do the very fun stuff "This is a string", 3.1415926535897932, { x =3D 123, y =3D 99 }, ) Is this something it could be extended to do or should I just stick with custom rules for this kind of thing? Other than that it=E2=80=99s pretty much eliminated the need for all the other rules I was using to get this stuff working. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 10 17:05:48 2025 Received: (at control) by debbugs.gnu.org; 10 Mar 2025 21:05:48 +0000 Received: from localhost ([127.0.0.1]:40080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1trkJn-0003kr-VC for submit@debbugs.gnu.org; Mon, 10 Mar 2025 17:05:48 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:61793) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1trkJl-0003kN-Ox for control@debbugs.gnu.org; Mon, 10 Mar 2025 17:05:46 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5e5c9662131so7261423a12.3 for ; Mon, 10 Mar 2025 14:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741640739; x=1742245539; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=NOK2XvKU+l9OSyyWHI9yQMdepQhi8+VQfjtFkgOgHOE=; b=ZvaQ2itT78qZT1zwFRllRexiufKvzPy0XAEsoMh2TkPkKA9mGoO/gRBbJLpYBQ7mZq mncVuLnKzTvVDGz8KBmuLG2yI0Pd2IawAMKzg1pvvH+dw0Rdmc7CrTzrpMFP8VzdAJtD +PVmGvEW1iDiAAEVVDsKPc54MykCZSQg0y1pWpwQixUrEUnJJ10UHOxmAAlYZ0Std5J6 OVnxux+e/p6/M8f6DPVJYFgDsiuc1Fx1Rbs86G+bFsR+h585OBSfbgmHTDmGvJnzHMJ5 rnD1uaUYl5N4rnOYH8IBPPZrBF9YtfKBZ6Z+NlfsYo0lR0oBr6NzQK9L6aWdF6CKe2YJ QWmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741640739; x=1742245539; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=NOK2XvKU+l9OSyyWHI9yQMdepQhi8+VQfjtFkgOgHOE=; b=SkWtECXLWHS4HV0r/lkVStePqrLtlzmA0hxfe3/JCQeIwa7iHGbU5fjFkHADU92eEV w3stQTzOQ7Jts/pS9CyUaRIx41VzQrqxS4UXUQ71glCr1fCjT5vHJmb4MQ/JgpVfjjdg 1rUsX0SG8V+RGENPtj73mrK3NTQ7wDs+ay/IkBJxo6yQP/djNk9tudlrxC1IUwflwFbU YuKop1DUUszRe+G2zmAYB04O5bLBVuV+9KFiJGD752Zpt6PfRFmUKECHENn1p7rfGBQJ 28EFGmp4jgWZ3k/5S9lNXUELaZzVvvfS0+3wjL3nRvPFsMUSc4yh8J9TkSAjywOrjLSJ cZmg== X-Gm-Message-State: AOJu0YxuAZ77GkU8Cd+dqfyO5wcEcd7IbY7qhY/sAGbZR80bfx3fn+BZ DaBrdhdOnWMmWmAdRc+I5zCVf8/yN2RM4tgDmtAo2UqMcXu1W6/zjanvH6mKSBq+vtT9jjeNPZN sRsEsH9lRjcF0pPu+p5WIwIU7Oxr1/x0L X-Gm-Gg: ASbGncvp+SZ0Z8+/XhYE2XRQASdEQUfVLzUe8L9NnN1YhgJqnK1CElDjqYnLzIPjU7L xuIrvSR5OH0gTer/ycE6DRwFAgppc4ehEE2Y8TO0+YtS49J51AozlEm5LvfqpaZ6e7R5cP/+Zrc mYnoYKoauYyYqrnnHA9zcMqDSm0oQ= X-Google-Smtp-Source: AGHT+IFefJfuCXCyO2YkixUbP+eDjq17Qc7S2ojUSfCleFU8jNiZPs9Coorbz9F3jZ1EAUqk3UeEd8M5IUvxmPAVdeg= X-Received: by 2002:a05:6402:42d4:b0:5e5:437c:1daf with SMTP id 4fb4d7f45d1cf-5e5e22e66e3mr19810990a12.16.1741640739543; Mon, 10 Mar 2025 14:05:39 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 10 Mar 2025 21:05:38 +0000 From: Stefan Kangas MIME-Version: 1.0 Date: Mon, 10 Mar 2025 21:05:38 +0000 X-Gm-Features: AQ5f1Jp6DwUv_kY6ACD1pUEspAx2ZvHKVuvAL_3CXk8IEftUjrRysPOkObfgy3M Message-ID: Subject: control message for bug #76908 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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.0 (-) severity 76908 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 11 05:53:18 2025 Received: (at 76908) by debbugs.gnu.org; 11 Mar 2025 09:53:18 +0000 Received: from localhost ([127.0.0.1]:41650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1trwIY-00052m-19 for submit@debbugs.gnu.org; Tue, 11 Mar 2025 05:53:18 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:55493) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1trwIT-00052U-W8 for 76908@debbugs.gnu.org; Tue, 11 Mar 2025 05:53:15 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2240b4de12bso1409875ad.2 for <76908@debbugs.gnu.org>; Tue, 11 Mar 2025 02:53:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741686788; x=1742291588; darn=debbugs.gnu.org; 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=9MAbYd2ETc8ssvyXqO5PIpxVTpcK8LxJm37cvzshFuM=; b=Q5jMRbJg3WkxCrxzfTfMDIt5Dy46Y4USZdArj6nzAPQPf0mbUrb85jkoqzip/25i+V 3wixo06LrNTT+SaHEjbk2kQJ3Dg5dCMiXl2FwDj9YUjx8rh/DFBaDbXBp1nZTf24Nf09 KGJE2J0uoaG/RRhluCTRQF1TYo0xsNIU/2iezwCDSu8i/63Po+aOeM1UvJOQJowvB1FS ZuLjfkPg09D8YlXFJ8vj2X92BA9ROP16tkWy1rJY7EYTYlIqYuMfEZz5z3eDtKYC3Tcs f6DhY8Jiqn/NW5rD/whxrhVoQzLDvIaOqA4ehqs3bbu5KZN68720J3Ldqx7Dbjkwt9iM IXQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741686788; x=1742291588; 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=9MAbYd2ETc8ssvyXqO5PIpxVTpcK8LxJm37cvzshFuM=; b=oKpq0GCzbmDKwa4NJ1A5tebl3DVQH3Ve1IMQuduP8Z0b6/33Sbrq3jmXlEJo2mw2PS mBXr08zV2Tx4Oqi7vW0WShx9EUNqPFawGpL++1w0AP+LZvs074cmUbZrOO4z0trD6egY 6lKWMyyFMmaSN+2zUYL3SzojckTwYCyR8DtQdIFajqKfYdWOLJ9lhGHMLNeASDVBnERx qU4YRKCF/KqIVLizmwrVzRI/VZBKZF6LukKJOEoSpdRSW+hcNqSVhDpVbS2NYkyxWxc8 SPluW8a3OPGl75wJey2o7EgdfR125zRjBrjXGwZ/2TFowJLNehIzUVUJu1WsQHTD7Gat sw7w== X-Gm-Message-State: AOJu0YzwT35nkrU0QjXyBj6Z5uc2ZUwbXkYRErt2CbgzautnQ0wRXITX GXGKoe09lr71WpbTWw+KMR2VWefydrPf8v0H2Pv67HTNlFtY3Rio X-Gm-Gg: ASbGncu2vR8YQvXrXcPb94NGzk93Fblp8P2Y9lz+lThc/Pa67O0qnLqPSAMe5+DDT+t 2oe66IO4gl9ODdulTngwticBD366lOPim9rQMm0j9+wGDWzO32d6nQ8exrWs1m60f45RyvnYJoW /xbqRSkHG90opfq055fv1b71zrIwsqNqmDDD7mrAPGtS8kNHmb/mhNyiNo0MO5/72N94ueboQ24 8G7TRxGE4tdWzR1lyYtVJQ1Ue7vUSZWhVABOAmHwTZryiQuNiInrnDRVM13hdRUjCprjj/B7YmO EfZ/yv5dJKVFSjYZ2PjIaqrJFYfXlvkUfEAnDvxDp1JDoy4p0GwoZPiFqxHZHmTiI77UeJMY+dF f/F4= X-Google-Smtp-Source: AGHT+IGelo32GYmphM38FuksdnXFrnot1w1pFcw6NxR6eeNtt54NgveEn4INI+E+xEY1mpw5xxRnCg== X-Received: by 2002:a05:6a21:7a8b:b0:1f5:72eb:8b62 with SMTP id adf61e73a8af0-1f572eb8df1mr13626508637.20.1741686787470; Tue, 11 Mar 2025 02:53:07 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:8118:a115:23f5:f03e]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af54cfed6b9sm582491a12.52.2025.03.11.02.53.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Mar 2025 02:53:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#76908: 31.0.50; Extending c-ts-common-baseline-indent-rule From: Yuan Fu In-Reply-To: <87r0357fxf.fsf@pub.pink> Date: Tue, 11 Mar 2025 02:52:54 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <23B11D2C-2C30-423C-B747-B5C801DD91E2@gmail.com> References: <87r0357fxf.fsf@pub.pink> To: jm@pub.pink X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76908 Cc: 76908@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 Mar 9, 2025, at 7:55=E2=80=AFPM, jm@pub.pink wrote: >=20 > Hi Yuan. >=20 > I=E2=80=99ve been working on replacing some of the bespoke indentation > rules in lua-ts-mode with c-ts-common-baseline-indent-rule and ran > into one spot it didn=E2=80=99t handle. Glad to hear it=E2=80=99s getting used! >=20 > If the parent (table, args, params) starts with a comment all the > siblings follow that indentation instead of ignoring the comment > and falling back to the default indent-offset; e.g. >=20 > -- currently lua-ts-mode indents like: > local my_table =3D { -- there is a comment here > x_offset =3D 12, > y_offset =3D 30, > } >=20 > -- using c-ts-common-baseline-indent-rule we get: > local my_table =3D { -- there is a comment here > x_offset =3D 12, > y_offset =3D 30, > } >=20 > And similarly for arguments & parameters: >=20 > -- current: > very_fun(-- do the very fun stuff > "This is a string", > 3.1415926535897932, > { x =3D 1, y =3D 2 }, > ) >=20 > -- c-t-c-b-i-r: > very_fun(-- do the very fun stuff > "This is a string", > 3.1415926535897932, > { x =3D 123, y =3D 99 }, > ) >=20 > Is this something it could be extended to do or should I just > stick with custom rules for this kind of thing? The first example seems to work fine for me. The second example is = indeed a bug, I fixed it. I tried=20 (defvar lua-ts--simple-indent-rules `((lua c-ts-common-baseline-indent-rule))) with (setq-local c-ts-common-indent-offset 'lua-ts-indent-offset) (setq-local c-ts-common-list-indent-style 'simple) (BTW you don=E2=80=99t need to set c-ts-common-indent-type-regexp-alist = to use the baseline-indent-rule. I forgot to update the comment in = Commentary.) Yuan= From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 11 13:17:22 2025 Received: (at 76908-done) by debbugs.gnu.org; 11 Mar 2025 17:17:22 +0000 Received: from localhost ([127.0.0.1]:45364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ts3EH-0008RX-HG for submit@debbugs.gnu.org; Tue, 11 Mar 2025 13:17:22 -0400 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]:47749) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ts3Cu-0008OR-LM for 76908-done@debbugs.gnu.org; Tue, 11 Mar 2025 13:15:57 -0400 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id 801411140117; Tue, 11 Mar 2025 13:15:50 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Tue, 11 Mar 2025 13:15:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1741713350; x=1741799750; bh=6hK0DD1XsyrWF4keE4qIF5BOiN22aYLWJ+48yOstT9s=; b= aFl29mCGbMzgI6HJbrC2bFQ5Ymv/+OBDsTxFOkLDaCY1ZZG676muXyOdmpHl3vHc Y/k5t165jwXG1irVmCxG5LpMw/RYwuODF1/FO/MUXGkEFZ166j0VTSGtxGgJqjba /yhXVDDZtxCOGbRn22AYplGYw4ObKHH3pCdeTku7MD8VvREuvjN1S2fbP3dsksjx W+wvcUagEkqLALqz2BHYBt7HibmDX1CgDHWQI+nUVYSDXwBn2lJ59s4E++UW/j4v +eAoO/d8G7Ou81ZyPx7mZ6iuR3+XtDR5ESoOlWh29WtL+mae3lI2kgl52CVYImnt 47vF9jBCW5NRBmDmCNI4Ig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1741713350; x= 1741799750; bh=6hK0DD1XsyrWF4keE4qIF5BOiN22aYLWJ+48yOstT9s=; b=k 1ZzW6ODnV7mzePqxXMTrGBDwvt8iqPBdsWWbHYeeL57quA51htwMFfI3Ct+I+IhD HAE4Aw0c41yt5DAagwBvz0xDsACSspDFTUI4UTxIeJmZ0b59SGlF1OUtj3ohJ3i/ /KFlFn/uFvlSPPv7oKVnWa+E7ydm6hcFhOIuCl4i3M0NDuwlYSSEmq7xder+IvnR /jV9lOODINOf31BA3J/yPs7aKQPKGD/BYzjb1aqcadH5ZsH1dULMs1wxmreiqLXw a0pvznvZl0XfKq6vtFIMP/Ypk/KLc99fFphoJ/WsmsF+t4zGdRHDQmYI1M3nwMG8 a7aXiJkgbNirJa28WqMPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvddvkedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpehffg fhvfevufffjgfkgggtgfesthhqredttderjeenucfhrhhomhepjhhohhhnuchmuhhhlhcu oehjmhesphhusgdrphhinhhkqeenucggtffrrghtthgvrhhnpeeiuedugedtveehjeehud euieduudekffekvdekkeefhfevgeetvddugeffueelheenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjmhesphhusgdrphhinhhkpdhnsggprh gtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeejieeltdekqdgu ohhnvgesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegtrghsohhurhhise hgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i74194916:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Mar 2025 13:15:49 -0400 (EDT) References: <87r0357fxf.fsf@pub.pink> <23B11D2C-2C30-423C-B747-B5C801DD91E2@gmail.com> User-agent: mu4e 1.10.8; emacs 31.0.50 From: john muhl To: Yuan Fu Subject: Re: bug#76908: 31.0.50; Extending c-ts-common-baseline-indent-rule Date: Tue, 11 Mar 2025 12:09:24 -0500 In-reply-to: <23B11D2C-2C30-423C-B747-B5C801DD91E2@gmail.com> Message-ID: <87ikof4hfk.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 76908-done Cc: 76908-done@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.7 (-) Yuan Fu writes: >> On Mar 9, 2025, at 7:55=E2=80=AFPM, jm@pub.pink wrote: >>=20 >> Hi Yuan. >>=20 >> I=E2=80=99ve been working on replacing some of the bespoke indentation >> rules in lua-ts-mode with c-ts-common-baseline-indent-rule and ran >> into one spot it didn=E2=80=99t handle. > > Glad to hear it=E2=80=99s getting used! > >>=20 >> If the parent (table, args, params) starts with a comment all the >> siblings follow that indentation instead of ignoring the comment >> and falling back to the default indent-offset; e.g. >>=20 >> -- currently lua-ts-mode indents like: >> local my_table =3D { -- there is a comment here >> x_offset =3D 12, >> y_offset =3D 30, >> } >>=20 >> -- using c-ts-common-baseline-indent-rule we get: >> local my_table =3D { -- there is a comment here >> x_offset =3D 12, >> y_offset =3D 30, >> } >>=20 >> And similarly for arguments & parameters: >>=20 >> -- current: >> very_fun(-- do the very fun stuff >> "This is a string", >> 3.1415926535897932, >> { x =3D 1, y =3D 2 }, >> ) >>=20 >> -- c-t-c-b-i-r: >> very_fun(-- do the very fun stuff >> "This is a string", >> 3.1415926535897932, >> { x =3D 123, y =3D 99 }, >> ) >>=20 >> Is this something it could be extended to do or should I just >> stick with custom rules for this kind of thing? > > The first example seems to work fine for me. You=E2=80=99re right. I must of got Emacs into a funky state or had the wrong file loaded or something. > The second example is indeed a bug, I fixed it. Works perfect now. Thanks. > I tried=20 > > (defvar lua-ts--simple-indent-rules > `((lua > c-ts-common-baseline-indent-rule))) > > with > > (setq-local c-ts-common-indent-offset 'lua-ts-indent-offset) > (setq-local c-ts-common-list-indent-style 'simple) > > (BTW you don=E2=80=99t need to set c-ts-common-indent-type-regexp-alist t= o use the baseline-indent-rule. I forgot to update the comment in Commentar= y.) > > Yuan From unknown Thu Jun 19 14:06:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 09 Apr 2025 11:24:06 +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