From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: CC Mode troubles and Emacs 29 Date: Wed, 11 Jan 2023 18:12:32 +0800 Message-ID: <87eds1fkhb.fsf@yahoo.com> References: <874jt0hw7p.fsf.ref@yahoo.com> <874jt0hw7p.fsf@yahoo.com> <838ribq48f.fsf@gnu.org> <87zgarhl7j.fsf@yahoo.com> <83zgarodeh.fsf@gnu.org> <87v8lfgpwf.fsf@yahoo.com> <83k01uo8db.fsf@gnu.org> <56368889cb296ad26b5e@heytings.org> <87zgapg8di.fsf@yahoo.com> <502d6ee86af078e950e9@heytings.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32904"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , acm@muc.de, emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 11 11:14:01 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 1pFY7N-00080h-Gk for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Jan 2023 11:14:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFY6H-0000sM-Gy; Wed, 11 Jan 2023 05:12:53 -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 1pFY6F-0000sB-NJ for emacs-devel@gnu.org; Wed, 11 Jan 2023 05:12:51 -0500 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFY6D-000419-Pa for emacs-devel@gnu.org; Wed, 11 Jan 2023 05:12:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1673431964; bh=Bm+1Dlb8rspuyThVeGlow2MryU9xSzKVIlogpbpVV50=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=pPnhhrmNOLCzAEnkEU7tmZpQ9Vmg50fc3jNZJm4cxHVSwG2PYnCl1AavdWXhztaKta+KpOsaMjFTEGuyd7920PuAKltVfHWA90G1RLqsRrjtYomGrjo7tVs6/2nTzDmgegHawoD2Znn2hpK4loAol+OzmVALoJo/LirDgvdiN9kUk/xFMh7hryqrUF3Tk+OUsbb9DN5PU9GDHfa4T8sMf/ABsfxkKxUgRLidXj5yp12qb+WbyRaP3NsIIgpBjs2291sbcnHDYqV4BuvwMsWC3DOygGi1gYKkVSwW8wz/S/SkyPhtfH4oFwlWt/lIWVGhVh7SMXq4FV1BEbWX+6OvEA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1673431964; bh=1hLtfsG2UaQPwie7YRo+rWqfi4fNyEPbJKoYvD8QcaK=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=AIFIgtNfhDilOzC6II+TaYVBIEafRMuCvGAmeiCDA26p8AuIRsUmTlLgYgwXOdntNCQdUyDT610UVouP+boKE12I7ONlMPQPB6LLFN8v78kogzfaRqY9mjdpgC36pOmuZDTBceHrAjTFF7OG057B82sJzhjLVpLuVxk/m9b+UdK7IZvcunQdOkEHF+ttliJ3G1a+7A4/vNIZ3JSCmyu1o5J0F6xFT+0CVwvn82brVzNLHdT7mp9RsncAFs4NPVkY/bmPKU3FoT7Ipw5NtL0RnRvxCNMPppY17LAY1rIWOeqc0Q6OtY691Kt3GccRIZPa0E3Xt3PU4kbeXRuFpMeJkg== X-YMail-OSG: WOB38CkVM1mq9oouW.PmO08eMP1k0VVB2qTwOuiWn2mQhJnALUqwzVQkw3krtBy oxZdOk2ss9tIYiqS83YGlm2dv5UtA1dtySmZDScqTGKDOf5EmewReCs1cXjo8gm35MiGvo7B3OAw phmbkOSCmZXtF4gCsknJVDgmbO8FOiF3sr5ufmPeBohJXD4c75x7htI1SIPY1AJZiv4yf.6bgRj2 pzRyPoH4zcR0iqpXcjtHxtyiqs13iLMQ7fhFv5svT0OL9fuwtDg7pdV7AynlVBW0.zNmqcmiAK5C hZPbUSsGs.cVJP4D97XdABp.5knIn7vBjS6GB0OpJyuWXTseC3xVEAcxGfab2gsuPnPc2CAhSNMf j.00x.3g6h0ZgVQ3YxRDvT0CddSi8.gPTm2q8XrYQ.Bp_eaNUbftSib8uL8VAGfLQ8KlFJ1Q_mNh VlfMy.rycDOU4mGRAh8HvEMvvRzdRTthJcQTry_npvcZivZcTOsiVhBUvZ_Ywpg0Y.dKidAnD7jU r3Ioz_Se09wMWsvkfGQR2YQHN9BYjho5RR.tq7O_zc9EeE9rfTmZE6ddV7ZZT9AEIxjjVkvGLtFJ 57C_fbqrHExq608nIVjH96SKLrqgQPfoiXH8E_S7xVb1v6PKafXmJeaWiVwEiuv8lJSHKoTm6QhV j330JxaPkhUycfcQKDiSL7WIrMqUGI4ltopq9yVOiGbKq9PANQxhu.m2Cy4wTprbfVH0NWnx7rEJ eqbaUYLNgejpbZs_Tr1a3wIwh53FCH.4ILcrHqpTwtE36XhGq.8lsAO3CRrYlK3mxOEeszzFsSYb NC5v.MRu.hWazcgLjC7BLkupSAvc19UWIua9a3bIz0 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Wed, 11 Jan 2023 10:12:44 +0000 Original-Received: by hermes--production-sg3-5ff5bbd69d-tnk2j (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 161390121c871a121ad339ebaeabf80a; Wed, 11 Jan 2023 10:12:39 +0000 (UTC) In-Reply-To: <502d6ee86af078e950e9@heytings.org> (Gregory Heytings's message of "Wed, 11 Jan 2023 09:27:28 +0000") X-Mailer: WebService/1.1.20982 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.204; envelope-from=luangruo@yahoo.com; helo=sonic310-23.consmr.mail.ne1.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=ham 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:302331 Archived-At: Gregory Heytings writes: > That's the problem. Clearly you prefer the former (all bug reports in > the long list that Alan shared were filed by you), and others prefer > the latter. There is a tension between fontifying too few identifiers > with a type face and fontifying too many identifiers with a type face. > And that problem cannot have an accurate solution without a parser. One involves me doing nothing at all. The other results in massive green splotches appearing in my code. There is also no such tension because I have not heard of this problem occurring in any other editor in the past. > Alan did not add a defcustom around that new feature (and rightly so, > AFAIU), but you can also turn it off with a single short line in your > init file: > > (advice-add #'c-fontify-new-found-type :override #'ignore) That is not a solution, because the feature will still be broken for everyone else. And at work everyone is more or less forced to use the same provisioned site-init file. > Evidently that's your opinion and preference, and it's not what others > prefer: they are more annoyed by type identifiers that remain > unfontified than by occasional fontification of non-type identifiers > as types. Most people I asked, at my day job, find the current situation of CC Mode laughable. It is immediately obvious to any other C programmer who begins to use Emacs 29 for real work, where it is necessary to continuously work on large C files for periods longer than 5 minutes at a time. When doing that, random misfontification does not even happen with the toy text editor that is part of GNOME, but it does with Emacs 29. And very quickly. In one example I just sent, `fprintf' was turned into a type within 5 minutes of beginning to edit a file. I don't know how, because I noticed too late to get the lossage. Sadly, the reason nobody else has reported this bug is because working with Emacs development is more or less incompatible with a full time job. It takes quite an effort to find a reproducer, report a bug, and then argue with people like you who insist it is not a bug and argue against the easy way to fix it in time for the release, so why do that when I already am? (Notice that the actual maintainer of CC Mode agrees that it is a serious bug, so your arguing is essentially a waste of time, of exactly the sort that drives people away from Emacs development.) Previously, nothing was broken. The status quo was with us since font lock in C code first existed, back then CC Mode did not even make an effort to fontify types. It is still there, with us, on the Emacs 28 branch. If people want to make CC Mode fontify more types, that is fine. But nobody in the thread you linked has said he prefers identifiers being fontified as types to some types not being fontified at all. > Sorry, I don't understand what you mean by this, or how it is related > to the problem at hand. c-ts-mode, the so-called ``fontification based on an actual parser'', does not work for me. I explained why before, and it will take a long time for it to become a useful substitute for CC Mode, seeing as it until recently (this was fixed just a few days ago) experienced problems with code along the lines of: typedef struct { unsigned long flags; unsigned long functions; unsigned long decorations; long input_mode; unsigned long status; } PropMotifWmHints; Which is a structure copied absolutely everywhere throughout X programs.