From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63141: Incorrect indentation in csharp-mode Date: Sat, 29 Apr 2023 13:54:11 +0200 Message-ID: <91689035-9CEF-49C9-A525-478D96F60620@thornhill.no> References: <83354ksb73.fsf@gnu.org> <875y9ge6gu.fsf@thornhill.no> <87zg6scomn.fsf@thornhill.no> <83y1mcqoyl.fsf@gnu.org> <87wn1wcj6s.fsf@thornhill.no> <87ttx0cj04.fsf@thornhill.no> <83jzxvqlz6.fsf@gnu.org> <83cz3nqkl5.fsf@gnu.org> <77880442-05AB-40CC-ABA5-DDC40AC4413A@thornhill.no> <83ttwzotex.fsf@gnu.org> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10951"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63141@debbugs.gnu.org, jostein@kjonigsen.net To: Jen-Chieh Shen , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 29 13:55:12 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 1psjAW-0002dR-0x for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Apr 2023 13:55:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psjAO-0008Ee-HB; Sat, 29 Apr 2023 07:55:04 -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 1psjAM-0008EU-F3 for bug-gnu-emacs@gnu.org; Sat, 29 Apr 2023 07:55:02 -0400 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 1psjAM-0000cQ-3N for bug-gnu-emacs@gnu.org; Sat, 29 Apr 2023 07:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psjAL-0003zq-Oa for bug-gnu-emacs@gnu.org; Sat, 29 Apr 2023 07:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Apr 2023 11:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63141 X-GNU-PR-Package: emacs Original-Received: via spool by 63141-submit@debbugs.gnu.org id=B63141.168276926015182 (code B ref 63141); Sat, 29 Apr 2023 11:55:01 +0000 Original-Received: (at 63141) by debbugs.gnu.org; 29 Apr 2023 11:54:20 +0000 Original-Received: from localhost ([127.0.0.1]:35360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psj9f-0003wn-LW for submit@debbugs.gnu.org; Sat, 29 Apr 2023 07:54:20 -0400 Original-Received: from out-13.mta1.migadu.com ([95.215.58.13]:46827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psj9c-0003wb-1W for 63141@debbugs.gnu.org; Sat, 29 Apr 2023 07:54:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1682769254; 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=MHE8SdkPhTRbx41flN6tz7RYDJIXDPXLp26yGSja820=; b=B4Nle5TzTd4n3TooNZMoWrDaUi/NZMRjmZwUqjZSpsXK9IrD+GnsE4wWraJdnlhlb0nN0L Ecnc0ssH8OeCva4Dsj3PGPYKXInlr/31ED0pzYVezlOLtWRK9CkKIAcJ2c3mO9JfWvsTdX D3atw/gRQDrFKe7NlFARqAJ4o5Aw9LA0OEbphFw4Eqik+BKwXswQp5h1jyOzAS1/JvZaaN HZtHcqi1nv0KxAb3zsmbIEIpr/kKWleBCHxSd+WSdhKrbsLw1Rn9KnqvfFb4rgb3OYjKhG YUrc8KjZkNKfKKV27WWqVv0MiAaho/yKSTxAAKnFLsZ6c/vaxe9MW5jptWWxlw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: X-Migadu-Flow: FLOW_OUT 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:260815 Archived-At: On 29 April 2023 13:00:59 CEST, Jen-Chieh Shen wro= te: >> The patch I can envision is to change the default c-offsets-alist=2E >But IMO we should only do that if many/most C# programs use the style >suggested by the OP=2E > >Just want to mention, the style conflicts with Visual Studio IDE (probabl= y >VSCode too), and Microsoft creates C#=2E It's probably a good idea to mat= ch >with these tool=2E > >I don't know what=E2=80=99s the prefer C# style guides in the old days, b= ut I=E2=80=99ve >been using C# 8+ years and I know it has always been this way (the one wi= th >expected behavior)=2E > >LMKWYT? > I'm open to changing the default alist=2E Are you open to devising such a = patch? Theo > >On Sat, Apr 29, 2023 at 3:48 AM Eli Zaretskii wrote: > >> > Date: Sat, 29 Apr 2023 12:40:30 +0200 >> > From: Theodor Thornhill >> > CC: 63141@debbugs=2Egnu=2Eorg, jostein@kjonigsen=2Enet >> > >> > >> (c-add-style "csharp" >> > >> '("java" >> > >> (c-basic-offset =2E 4) >> > >> (c-comment-only-line-offset =2E (0 =2E 0)) >> > >> (c-offsets-alist =2E ((inline-open =2E 0) >> > >> (arglist-intro =2E +) >> > >> (arglist-close =2E 0) >> > >> (inexpr-class =2E 0) >> > >> (case-label =2E +) >> > >> (cpp-macro =2E >> c-lineup-dont-change) >> > >> (substatement-open =2E 0)))= )) >> > >> ``` >> > >> >> > >> I consider it an awkward indentation, so better to change the defa= ult >> (change to the expected >> > >> behavior)=2E >> > > >> > >I'll let Theo and Jostein chime in regarding the accepted practices = in >> > >C#, but in general it is not enough to hear from one or several user= s >> > >that they don't like the defaults in order for us to change the >> > >default behavior=2E These customization options exist precisely so = that >> > >people who don't like the defaults could easily adjust Emacs to thei= r >> > >liking=2E Why would you impose your personal preferences on everyon= e >> > >else, instead of letting them customize this as they see fit? >> > >> > I agree=2E It's not a bug, but could absolutely be a missing >> feature/consideration=2E I'd be happy to review a patch with the propos= ed >> changes, though=2E >> >> The patch I can envision is to change the default c-offsets-alist=2E >> But IMO we should only do that if many/most C# programs use the style >> suggested by the OP=2E >>