From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61541: 30.0.50; Wrong indentarion in csharp-mode Date: Fri, 17 Feb 2023 22:43:46 +0100 Message-ID: <20230217214346.dr6d54yxk2rr6ucj@Ergus> References: <87k00i7hko.fsf.ref@aol.com> <87k00i7hko.fsf@aol.com> <87a61cozw8.fsf@thornhill.no> <305e7060-58cc-344a-ae1a-98c82510aa88@secure.kjonigsen.net> Reply-To: Ergus Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37456"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Theodor Thornhill , 61541@debbugs.gnu.org To: jostein@kjonigsen.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 17 22:44:28 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 1pT8Wp-0009av-QY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Feb 2023 22:44:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT8WT-0000Jn-P2; Fri, 17 Feb 2023 16:44:05 -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 1pT8WR-0000JD-NW for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 16:44: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 1pT8WQ-0004Wg-SU for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 16:44:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT8WQ-0000nx-HV for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 16:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2023 21:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61541 X-GNU-PR-Package: emacs Original-Received: via spool by 61541-submit@debbugs.gnu.org id=B61541.16766702403078 (code B ref 61541); Fri, 17 Feb 2023 21:44:02 +0000 Original-Received: (at 61541) by debbugs.gnu.org; 17 Feb 2023 21:44:00 +0000 Original-Received: from localhost ([127.0.0.1]:41774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT8WN-0000na-SO for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:44:00 -0500 Original-Received: from sonic315-14.consmr.mail.bf2.yahoo.com ([74.6.134.124]:33426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT8WM-0000nL-JN for 61541@debbugs.gnu.org; Fri, 17 Feb 2023 16:43:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1676670230; bh=7MoXdB5PH+xyZiPFpUFTRc1mda5fWBxULwASzVElbsQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=I+dR2IpS3eSbC7p+ZqNX5XBpQfLnEHKxGBFQ7J8Di2wDz8zW+DjFa0wQfjodF7WurnuxEpiKdfXMiniTKODDbrYxcslz/INcaw4+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5Tqoo7iXcB7E84WDTGG_LpokpVkbA_4EpWQxENB.sf.CVuecslhT.l1 jtHfpSHQYgrgdosf6avg4fx4qbewKZhXcOB7Zq_WnCtlpao.ZBt8n9TmZ_exneFSDl7pY5MqELz2 iN74nR1XmaOLczcWEPjlZoDQzRLaEk4h1B45qRKWeDhbKKsRDNe9BWQswRGsAYusPXZyeiP.J2MG 7XGkFH_UgL4jDBz1RW95t84lA5DhiJMGomTUMPzaSm3P7RNemZQ9vtsLJQGPbsG5wNl95FYHOkKV IGEbTCS.q5hjSH8.kmcZjIfpD43YL1MdvcQ6RSmz7DboAYqFnET.xfFpuYuRtUCdkXn34BhgOqvI uC9T0ehVj1KPth9asr8pK9tKOf_dc7O4BR6FCj5qv0Vt8IuHtrEacQmULCrv7o3t27Gofr0uAk1K iKRHHPqr_ML05yJddNxsa1dd9G27Z07CFym2av6Wlm4Z2NIWIW2fojDcnSBU3VouKx4QuBfO9Ixr UUGB3xkgxRJK9dx3Mb79aRWP84JOt1yk54wxlre4eA X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Fri, 17 Feb 2023 21:43:50 +0000 Original-Received: by hermes--production-ir2-65c64dfd66-wgvcl (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a013df23548792a63257957ff362d350; Fri, 17 Feb 2023 21:43:49 +0000 (UTC) Content-Disposition: inline In-Reply-To: <305e7060-58cc-344a-ae1a-98c82510aa88@secure.kjonigsen.net> X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol 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:255905 Archived-At: On Fri, Feb 17, 2023 at 10:06:50PM +0100, Jostein Kj�nigsen wrote: >2/17/23 20:28, Theodor Thornhill wrote: >>Ergus writes: >> >>>Hi: >>> >>>I just found that this indentations are wrong in csharp mode: >>> >>>// wrong >>>new myNamespace.myClass >>>{ >>> Name1 = x.Value, // defun-block-intro >>> var2 = 2 // statement-cont >>> } // statement-cont >>> >>> >>>The problem seems to be related with the dot (.) in the new, because >>>this variant indents correctly: >>> >>>// right >>>new myClass >>>{ >>> Name1 = x.Value, // brace-list-intro >>> var2 = 2 // brace-list-entry >>>} // brace-list-close >>> >>> >>>csharp-ts-mode is doing it right BTW. >>> >>Hi! >> >>Yeah, this is one of the harder issues iirc, and one of the ones that >>made us move to tree-sitter in csharp-mode in the first place. >> >>What do you think Jostein? >> >>Patches welcome! >> >>Theo >> >First of all: Thanks for a detailed bug-report. > >Then for the bad news: I may be missing something here. I'm on the >latest revision of the emacs-29 branch, and I really can't reproduce >at all. > >I've tried typing out the concrete code-samples above, and I've tried >copy-pasting them. > >No matter what I do, I cannot reproduce the behaviour outlined above. > >Ergus: Could you come up with a even more complete example? > >I mean... If I can't reproduce, I definitely won't be able to come up >with a patch. > >-- >Jostein > Hi Jostein: I just do: emacs -Q /tmp/main.cs Then pasted (or write) the code snippet shown in the example, and re-indent the buffer: I get this: new myNamespace.myClass { Name1 = 1, Name2 =2 } Exactly like in the example C-c C-o shows the same than in the example. Even the fontification is wrong. If I remove the dot like this myNamespacemyClass the fontification and indentation is fixed immediately. I am using the master branch (emacs-version = 30.0.50) tomorrow I can try to reproduce the issue on emacs-29 branch, but I have to build it. Best, Ergus