From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Missing features in c-ts-mode Date: Fri, 17 Feb 2023 17:37:47 +0100 Message-ID: <20230217163747.yt5kizq6e4vqmqqe@Ergus> References: <87fsb67pfj.fsf@thornhill.no> <83lekyagwy.fsf@gnu.org> <87a61e7n5j.fsf@thornhill.no> <877cwi7mju.fsf@thornhill.no> <83bkluaevv.fsf@gnu.org> <871qmq7l9q.fsf@thornhill.no> <87ilg1qv71.fsf@thornhill.no> <20230217082935.waa7f473dmvbpg3d@Ergus> <87fsb4r4xf.fsf@thornhill.no> <83k00g1o0k.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25678"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Theodor Thornhill , casouri@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 17 17:38:36 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pT3kp-0006UB-K2 for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Feb 2023 17:38:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT3kF-000203-P1; Fri, 17 Feb 2023 11:37:59 -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 1pT3kE-0001zl-3x for emacs-devel@gnu.org; Fri, 17 Feb 2023 11:37:58 -0500 Original-Received: from sonic315-13.consmr.mail.bf2.yahoo.com ([74.6.134.123]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pT3kC-0008Aj-5H for emacs-devel@gnu.org; Fri, 17 Feb 2023 11:37:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1676651872; bh=MbNqUrJ5zMuWala9ns7bBA2Zdi5OvGnyBGEPwlyNCoA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=oQTL204jkRdPOnepaFMFAPC8GzUI1zH0R7xTpiuU+au+syN2gCBsp+EtEueIubSrdSw7W5CmPmt/RyOhmSdr11iefXCDAytoBQqxoInrDH5w3FQBcpKveor4Sx3Xghzxma5mhUyzmvTJTnVONBMsDPufC2NNxHyOvFlODQgsn1zOVUBIctQeAUfjJHMrEpssnZvlc/9Pmi3aC4hvhXbf34whWR5LlYKhxjLZ2NFbWXMJqeVWf4TEsH+ldTkC9oY2AHa1vLhqKBK3xGSnpi71bqbn/mUvRycudD4ruLidzx5vSliTmmnUBcDf/B5O/ZPSG0FX6ErCFq5NLSiO1cQbww== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676651872; bh=ch6Iyxyf72t9bV6XJNFzKwaaOwXk48JOWWZ6CZPYVkF=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=dichMHdnXNWaCVm3NkDIOtG6xef7lds+5cjNc7QXr4N0wbkz63KLAtHeXDxLBcgKWAwzBFHrFJp6eGTeA3Q6qxIcf1735UHCIFYmlWP8NWqUNufz+eV1AjQfqD4n2Lt5vtq42Pv3aK63oKs/Lc583TXkjDGE+YgY2DbJf2YlHZ/kaELnRI1NgnwU4PzRuzRpq9fgG8wzDZpQaq7Quyo1bIqBsu5Nurlnu1ZF4MLM+XzVDA0Eb0THVfywhKfow5mLjVHLHqZ4quSESYpG6++PEULGb4N9glx8jJweqMjuuzT8LVzj5P0aablCQrVetOl89Rq9RxYsRZEWlsfTIRqXsA== X-YMail-OSG: cJfRWTYVM1mYpuO8RDsHKFL6esn8YeBkoH02XwcQMdNnf4XnJXrjTM7eZ_1S_PV Djxsae10gK6pgmXqvgQ8bkERVsPaNiZ3a9JGNP_pcix41kOOXq3xOY6j68hKEvevFafsw4UfFqRK XjJZ4LL_FKKhtfXqPFJOgqIeV64FVkmROSk8CCKkL4Jsj9_Ib7P8ypwC9LXv6nZMQgTa6D39QI_B 2PK843S9n7JKRMHMZVewShh4yjBo3nCPNwEuxOCHWTgP5yxnDp8yNEhwqd_aVrDPQA8FbsoQkDZo KV1_FJ5qIFk8l.fFw0X1aYaDiTes6ICxTOdv5.Ys7byFV755vjoijXSteBCb4jE9rAHE1Gmtude0 FjPnpXQpPiDkjtxd_r29Ui.p7dlKAO.t8h6hjS1cyzyaWrhzlStLTs8f4ptaT2XUt8LU9xJ7jwSc JNNvV7sMLnt8eBeRlMoT7eby8O7NiLVVZGJlFa6bAFeXB2lXWxzpX3EaaP6MT9mj8F0msPWjMZwm AEMaYpzYL.UVu5rWL2VIYSLFA7L2CHudzXzepVAU.L4PSCKNqlwywuHSx7BCp9S5fwnEH7kHm3cK Z6WVDEdvaCi7Y00Gle6SIZj.2eavLykLF96oYWfsolBaacL2I0bdaTjee3_w.aV9HD5yGMPsoWxK RL3hrZsVZz7gXD816CCdWxQnBR80dObnsRbmdI89fxoYfoHx6x8oEtNdDVEPVLuc_sjpi_fAoGrF tjlMeUkYhEeeUynAGbFmwgPeYO3jq9aOkfEJXMdXEyijh.2ssK2JmPyoaH1YlH1s9kk_iGuDvpoo LCCiy3TDgM.T89.fQKq7ALLpie4BQuiJw2gilUIaeQ 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 16:37:52 +0000 Original-Received: by hermes--production-ir2-65c64dfd66-2jlf9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d348e51f457a4f53f3953d55633bec96; Fri, 17 Feb 2023 16:37:50 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83k00g1o0k.fsf@gnu.org> X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.134.123; envelope-from=spacibba@aol.com; helo=sonic315-13.consmr.mail.bf2.yahoo.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303503 Archived-At: Hi Eli and Theo: Yes, I know that the feature is not very "popular" to be enabled by default, but for parallel programming models based on pragmas (OpenMP, OmpSs, OpenACC) it is very important. Many people in my previous work moved to some other editor after years using emacs due to these apparently "small" details. Every time they wanted to indent a portion of code (i.e they added an if around it), all the pragmas moved out of their place and needed manual fix. On that moment I commented with Alan the possibility to make #pragma a syntactc symbol which we could control its indentation like anything else in c-mode (with +, ++, -, 0 or [0]). But he said that it required too many changes to implement that and offered this "toggle" solution good enough for me. I will open the feature request in a moment, but just wanted to comment the alternative solution more consistent and without an extra mode; because maybe that way may be simpler now in the new mode?? Best, Ergus On Fri, Feb 17, 2023 at 02:20:59PM +0200, Eli Zaretskii wrote: >> From: Theodor Thornhill >> Cc: Eli Zaretskii , casouri@gmail.com, emacs-devel@gnu.org >> Date: Fri, 17 Feb 2023 10:56:28 +0100 >> >> > #pragma parallel for first private(x) \ >> > shared(y) etc >> > for (...) { >> > .... >> > } >> > } >> > >> > In this case the pragma in column zero is very confusing. Alan added a >> > new mode (c-toggle-cpp-indent-to-body) which worked around this issue a >> > few years ago. I don't if it is possible to enable similar behavior with >> > your change? Is is? >> > >> > Best, >> > Ergus >> > >> >> It's absolutely possible, but IMO that sounds like an improvement for >> emacs 30, maybe? > >It depends on how simple and safe the change will be. But yes, I'm >okay with delaying this to Emacs 30 if the addition is complex enough. > >Thanks. >