From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61502: 29.0.60; c-ts-mode auto-indent not working Date: Wed, 15 Feb 2023 20:18:47 +0200 Message-ID: <6611cbbe-d602-f70b-f7e9-cf31756efddf@yandex.ru> References: <87v8k4g8xu.fsf@codeisgreat.org> <83a61ge69s.fsf@gnu.org> <87edqs11db.fsf@thornhill.no> <83a61gc8xx.fsf@gnu.org> <875yc40zhu.fsf@thornhill.no> <838rgzce0c.fsf@gnu.org> <873577qewk.fsf@thornhill.no> <83lekzauvz.fsf@gnu.org> <87ttzn2enc.fsf@thornhill.no> <83bklvatrj.fsf@gnu.org> <87r0ur6kv1.fsf@thornhill.no> <83a61fas5w.fsf@gnu.org> <6AAA6F2C-605C-4C90-9B3B-9223A9707A43@thornhill.no> <10bea2f6-6439-87fa-6523-1f992e396822@yandex.ru> <833576c0r3.fsf@gnu.org> <00df07a1-4c58-95ec-81ae-fb43cd1626a8@yandex.ru> <83r0uqajds.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26035"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: 61502@debbugs.gnu.org, casouri@gmail.com, theo@thornhill.no, pankaj@codeisgreat.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 15 19:19:29 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 1pSMNM-0006dA-VO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Feb 2023 19:19:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSMN0-0005nF-NJ; Wed, 15 Feb 2023 13:19:06 -0500 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 1pSMMx-0005lt-EA for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 13:19:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSMMx-0003cl-5O for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 13:19:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSMMx-00047B-1P for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 13:19:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Feb 2023 18:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61502 X-GNU-PR-Package: emacs Original-Received: via spool by 61502-submit@debbugs.gnu.org id=B61502.167648513915793 (code B ref 61502); Wed, 15 Feb 2023 18:19:03 +0000 Original-Received: (at 61502) by debbugs.gnu.org; 15 Feb 2023 18:18:59 +0000 Original-Received: from localhost ([127.0.0.1]:33938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSMMt-00046f-A4 for submit@debbugs.gnu.org; Wed, 15 Feb 2023 13:18:59 -0500 Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:50967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSMMp-00046Q-Vk for 61502@debbugs.gnu.org; Wed, 15 Feb 2023 13:18:57 -0500 Original-Received: by mail-wm1-f47.google.com with SMTP id n33so7973029wms.0 for <61502@debbugs.gnu.org>; Wed, 15 Feb 2023 10:18:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=NBHRNyKDAhqu6gpCC1dC23s0ZYXqNRguIgslxiRPJeU=; b=cjXbNHoVjRMN6Tpo4rWZx3rmZlrZhr3MNoMGFLSuOgNUf8KqR/YGXsmmZYZPl+oU34 2EJVIxhV8uEzlSeVUzWkPAQ8+hBO7CsytYzmhCA+erxT1C3XYfC0xvuSrASYADvPrc2w 4nMPE2L8xxp6Ubs030W9uIJVd3t6Lv2lCOH4BxL+LT8UV0W5Auuq5GB0yIIeHTMSAWFY P1iCZr4jBFY15pN82UwzVkxKf68T+9Bbsrfh3JUZpW5UfADdlQpsCcqYdE8i0Lc1TCgp r3zVmszaPoo31h7Q8FghkGY06lmqN5RRQVNDGA5rMuC7o/KgojjlnmzSgDJ/9RJjIg+g Ph5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NBHRNyKDAhqu6gpCC1dC23s0ZYXqNRguIgslxiRPJeU=; b=6jfxvnuHOqHB8h9+xrTAWLrR/8z+DH2AZnrSdZCrcJD6g+PxVezZc/4cUEmVke0oxi XoqQarxB8bAQcTVul8cptdeZEDaD2fwG+H5/tz1j3NG2YcM5HcGQgtZ26PfFsp8LZ8lb a+DMxTUtNPqTZjDAB1/VuPb3wxK82vcVAUDU5Zr2AollTsMhe0VOq2NdNUIgQVWEy2ak ldvRXJNmCe7No/YwXeg5Ho3Gabbupt0pIB/jKR6weFg28Rm29owP82G/m74tCzphBlFL Wuy03nfSMVlpM41IaFEvY7n4tziIyh0VUh50gy7qXSaISJkcxNqyQsWmj9KQj3OOXalw fIUA== X-Gm-Message-State: AO0yUKWfsXKfg+gDkQqrQJWVcfSXGVHuT2fV8/S3UYQGwZ1etvro0YLA idI5RWu0DpWuFnEXQBn9IO4= X-Google-Smtp-Source: AK7set+MhDzD60OqtEcatwA5U6OUuV9He1naQIkPfAwMVIA9jg3f1Cxjp0uJ4HYj0+pFMtCWRObCLg== X-Received: by 2002:a05:600c:4d93:b0:3df:e549:bd00 with SMTP id v19-20020a05600c4d9300b003dfe549bd00mr3056860wmp.1.1676485130039; Wed, 15 Feb 2023 10:18:50 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id t39-20020a05600c32a700b003e1e8d794e1sm2664412wmp.13.2023.02.15.10.18.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Feb 2023 10:18:49 -0800 (PST) Content-Language: en-US In-Reply-To: <83r0uqajds.fsf@gnu.org> 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:255759 Archived-At: On 15/02/2023 20:11, Eli Zaretskii wrote: > Sure, but I thought the problem was we were using the wrong nodes. I > presumed that, once the "right" node is found, we can thereafter use > the information of that node (which is grammar-specific) to take it > from there and determine the required indentation. You seem to be > saying there's more there than meets the eye? I think the method of finding the correct node will need to be grammar-specific as well. Note that this is mostly important for "incomplete" code. The users of electric-pair-mode should experience adequate indentation behavior already. The for/if/else statements without curlies seem to be one of the few exceptions, but that the user also might be typing "{" next, in which case the current indentation will be the correct one.