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: Some performance questions. Date: Thu, 9 Feb 2023 16:45:02 +0100 Message-ID: <20230209154502.li4r26vxpfkjtshe@Ergus> References: <20230208190819.z7xwgxm5gpbzmjrz.ref@Ergus> <20230208190819.z7xwgxm5gpbzmjrz@Ergus> <83a61nor5r.fsf@gnu.org> <838rh7oqwg.fsf@gnu.org> <837cwrnz0e.fsf@gnu.org> <20230209114928.eqpojruluur42hur@Ergus> <831qmzlzna.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="2266"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 09 16:45:55 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 1pQ97S-0000UH-JG for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Feb 2023 16:45:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ96r-0001u5-LM; Thu, 09 Feb 2023 10:45:17 -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 1pQ96n-0001tI-QG for emacs-devel@gnu.org; Thu, 09 Feb 2023 10:45:14 -0500 Original-Received: from sonic317-26.consmr.mail.bf2.yahoo.com ([74.6.129.81]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQ96l-0004EM-Qk for emacs-devel@gnu.org; Thu, 09 Feb 2023 10:45:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1675957509; bh=mwin2zysILxPg2HzcRfqEswLeylVjVA/ypnhQ01aKU4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=YnXg50OiTCdICs7pVPp/8zYNYGTrBCfarpQmAdEqz9ejSqjiymB++X3v/RwvlahIifAhH8tAIoegUrd8AWDPTd8pnpTxIiTX4/3Vt0lpt7WshPM0Y76SCLL7dFfOejWsQz31iQGad7KFUkVNOoXRjCZ5xMJdnzfO6l/IlP+euX/ImpACZn+LW8lVImokTGNb92oAYSR9BSIHlUCtpbbi0r4waDb95pApX+FgzOSP0ktv9+SbbtcFQIceUcC7NpP2xYtCBqywSq55Z/Z83uXqSFnpNDiJqVwbL1x8xvWyRQc+xfJ4XwOV2EiNS1FlPH1Cl2freTeAnFGLstbFMGcmMQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1675957509; bh=NEUSHHXWT7BO6giNmIkR4dapA6BrwOTgY8ww+FhK9Yq=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=RK5DE/jm5/1X+NYh8JnoScfVoCRrFpBb66mUR57v3uU80mcSWOLlFdXjUdWvxnaXur2NDOd1PJls05PIhA9fZMaBBX8Hez/Gmh/tNUxeTVJ2O9x6WaxA8GlvehOeaa2XM4Xu4QTmLPxPXOrC+HdUZP3U2fTZTHcsI3znfANauwS75UQAI4LXIjTQmjsHT4KaugZ4iYBSb4DZkPFB2Qme+mSk0MjsH9W7Gr6keRyYqQfz2+Slyo0C7pcoW7B23mWOcfkL2VGuR4SoL69cnHIal1Ar+xIZmBi0EtC8xu4CsozXldXDeziyn8dVpyz7qcSxxv9ulUN3NcUuHgo4cg6zYw== X-YMail-OSG: glsqh7oVM1m.A9wDSc9vK5PNDVkPDFbORk7HQOthKTv.r.JyGtt.M99yoamE3q2 ZVHAbq6yJelNoH.gPvzp.tqWUWTK_cxMVdNDX9x9pKPydgYpWL2UZxfr1Y17A6d5aYYDCPl9y.Vd MV2C7IXOHukX2VKji17BRfk0du06caNjhgZYNqOlPSqBboIxwVJmDXQzAnypLbGxcrSDQGAVsgVU zTJqFte8s3NPyKL7ZL2b.WhLDIxy.HwkfwU6DOIsV8xCStZqq__WlT5gEHnEjldmbUgdbe5Ni2uh 9T8Kb6vVw66TVeacrdJ_4bmWwkQPTV.LK0t6NjuVZ2zmdYOKJsRo.fyLzX949AAsK_9Gr5wijCYu rsTxNfBoMCkBT1uQQzx7zDvzohpdjyYpoDCMegWeGtSdFJYxIfJ.T6p89uqj.I6HeVyuEuDorHWE EvQ.0RkIX0Nj9IapzQCyEwG1B6XBavb_5FtENtYSdxb8tH96EavNy3MLgQW94uZWTGjuS0_gTBkC 8XQYOHm5.bARcItSsPHBjoC8RXXo0SlaEwKam.92wbiUinckGyVS89gquabfwQrFgG_2K_cxk_Nm UPMVfKT2lO9OmM3qF4fIkEaKrAtl3CePh37ViEkP93PUDLi6ZRaWl3qXC_fWXKYEhXPWQXf3kTLw 45KQYwYJqHEhBn_K.U.msCfeo.2J9IkCUOh_zgNED2sePqMhe8X2mwn94og5MilZiAgvXfU6LPu2 3lLNZUhHtkM2vG6zm_E2aPbGpX8j7W.JxtDdOSevU_gRII3GeHjgqCC_P5d9lwxfJwyN_5IfT3AF 5iK3Daz5YXolX6MJPLuFQv9nVoXIHFVeTD3R2PI5gc X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.bf2.yahoo.com with HTTP; Thu, 9 Feb 2023 15:45:09 +0000 Original-Received: by hermes--production-ir2-65c64dfd66-hwhd6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a16494ede07e974c5bbee8cf8da44890; Thu, 09 Feb 2023 15:45:04 +0000 (UTC) Content-Disposition: inline In-Reply-To: <831qmzlzna.fsf@gnu.org> X-Mailer: WebService/1.1.21161 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.129.81; envelope-from=spacibba@aol.com; helo=sonic317-26.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:303083 Archived-At: Hi Eli: On Thu, Feb 09, 2023 at 03:46:49PM +0200, Eli Zaretskii wrote: >> Date: Thu, 9 Feb 2023 12:49:28 +0100 >> From: Ergus >> >> 1) The new c-ts-mode-indent-style is a bit confusing for a cc-mode >> user..., > >That is strange, since it's supposed to support (a subset of) the same >styles that CC mode support, including the default GNU style. > Yes, but in cc-mode it was possible (and pretty simple) to modify or create new styles. There are plenty of styles around modifying existing ones (google-c-style for example). In the new ts-mode looks like it is possible to do so, but the syntax and the names are a bit tricky. For example in cc-mode there was the c-set-offset command, very useful for small changes and to know which indentation syntactic element was at point. So with that information the user only needs: (c-offsets-alist (inline-open . 0) (arglist-close . 0) (innamespace . [0]) (access-label '-) ) to increase, decrease or set the indentation to zero. That's why just some equivalences or examples may be very helpful to ease the transition. >> could you add some similar/equivalent examples than the ones in the >> cc-mode documentation in order to extrapolate/translate? >> >> OR >> >> Is it possible to use add examples of equivalent implementations between >> c-offsets-alist and c-ts-mode-indent-style. > >This is supposed to work via indentation styles, see below. > The idea is to modify one of the existing styles or create new ones. Se above >> 2) In case the user wants to modify an indentation style, is it possible >> to use another existing style and use it as base template like >> c-add-style does? > >See c-ts-mode-set-style (bound to "C-c .", as in CC mode) and >c-ts-mode-set-global-style. > I mean, tweak details... like the inheritance we do in c-add-style, not set a completely different one. (c-add-style "mylinux" '("linux" <- (tab-width . 4) (c-basic-offset . 4) (fill-column . 80) ... >> 3) Which of the cc-hooks (c-hanging-braces-alist, c-cleanup-list and >> c-hanging-semi&comma-criteria) is already possible to reproduce with ts? >> some example please :( > >Please describe the behavior you want to see and didn't see in >c-ts-mode, the CC mode variables are not used in c-ts-mode. > I know they are not. I asked for some kind of equivalence (if available) because I don't know if they were already implemented somehow. c-hanging-braces-alist: Controls the insertion of newlines before and after braces c-cleanup-list: Basically for the opposite, to remove some auto inserted new lines next to braces (for example to have things like '} else {' or '{}') c-hanging-semi&comma-criteria For a similar behavior but with semi-colons and other cases. >> 4) Is it possible already (I am sure that in the future they will), to >> create behaviors like c-lineup-arglist, >> c-lineup-arglist-intro-after-paren, or c-snug-do-while? > >Again, please request features. I'm not sure I even know what these >do. Thanks. I will do, but there are multiple things and I don't want to be too (even more) pedantic, so I one by one... Best, Ergus