From: Po Lu <luangruo@yahoo.com>
To: Gregory Heytings <gregory@heytings.org>
Cc: Eli Zaretskii <eliz@gnu.org>, acm@muc.de, emacs-devel@gnu.org
Subject: Re: CC Mode troubles and Emacs 29
Date: Wed, 11 Jan 2023 18:12:32 +0800 [thread overview]
Message-ID: <87eds1fkhb.fsf@yahoo.com> (raw)
In-Reply-To: <502d6ee86af078e950e9@heytings.org> (Gregory Heytings's message of "Wed, 11 Jan 2023 09:27:28 +0000")
Gregory Heytings <gregory@heytings.org> 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.
next prev parent reply other threads:[~2023-01-11 10:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <874jt0hw7p.fsf.ref@yahoo.com>
2023-01-09 9:51 ` CC Mode troubles and Emacs 29 Po Lu
2023-01-09 12:31 ` Eli Zaretskii
2023-01-09 13:49 ` Po Lu
2023-01-09 15:48 ` Alan Mackenzie
2023-01-09 16:56 ` Eli Zaretskii
2023-01-10 1:05 ` Po Lu
2023-01-10 12:57 ` Eli Zaretskii
2023-01-10 14:13 ` Gregory Heytings
2023-01-11 1:36 ` Po Lu
2023-01-11 1:46 ` Po Lu
2023-01-11 9:27 ` Gregory Heytings
2023-01-11 10:12 ` Po Lu [this message]
2023-01-11 13:27 ` Eli Zaretskii
2023-01-11 14:17 ` Po Lu
2023-01-11 14:27 ` Gregory Heytings
2023-01-10 17:37 ` Alan Mackenzie
2023-01-10 17:50 ` Eli Zaretskii
2023-01-09 16:36 ` Eli Zaretskii
2023-01-10 9:26 ` Gregory Heytings
2023-01-10 9:49 ` Po Lu
2023-01-10 10:06 ` Gregory Heytings
2023-01-10 17:05 ` Alan Mackenzie
2023-01-09 15:52 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eds1fkhb.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=acm@muc.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=gregory@heytings.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.