From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Fri, 04 Jun 2021 11:34:31 +0100 Message-ID: <87czt1zzns.fsf@gmail.com> References: <831r9iw473.fsf@gnu.org> <2d6d1cb0-2e8f-ceea-cb83-3bb840b65115@dancol.org> <83zgw6udxt.fsf@gnu.org> 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="29173"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Daniel Colascione , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 04 12:35:15 2021 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 1lp7AY-0007QO-Kx for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 12:35:14 +0200 Original-Received: from localhost ([::1]:50492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp7AX-0000fz-99 for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 06:35:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp79w-0008QP-Mb for emacs-devel@gnu.org; Fri, 04 Jun 2021 06:34:36 -0400 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:39605) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lp79u-0004EU-Pv; Fri, 04 Jun 2021 06:34:36 -0400 Original-Received: by mail-wm1-x32b.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso7605284wmh.4; Fri, 04 Jun 2021 03:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=IPHoO7AGeWG9HKANDAbS81kipoRjbrUrCyHLmb1pqfA=; b=QuQiD4/Skkm9Xon7hjIPHKzopoDpBCvPz2P7vmaQOixja12pb0DdGEmVIU9Iy8AA0+ g6FTNegDxpBV1Zq1WTIc37BD6/J0OkZ5fau291+MdmbDGPszmlGZHdCPls1qgKkbI1Tq kvjpyYzmIG8vLkXIwUS9/dgB5Jl+wv11M6cB+wk30LhLtLMaE8EnpcaEIxSymVsmvHhc E0L9BNdmNKiz5teh6iXc97nL+qffjrA8qok8ss1jI0F02rLJ6L+f7SBniOBv93RQyg9W Y4H9GdHgLj1lHxPX9rvk0ye9T4MbznnKW4E8O5JRgRxcDNicreRsMdB1vKKesinA4SkR AX9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=IPHoO7AGeWG9HKANDAbS81kipoRjbrUrCyHLmb1pqfA=; b=Quz4QW81fpScA78IjCK2gmmm7X7WytAR65loY/jlfC29BOPHBQ73MPTKRtGnRKhGOG 1FGzgUmtduYSQdjJkT/wRnEk4xtLrIkJxfQr935x8wdbqLmt5uLNHkz1Ovd95+3on0vu PuQf4Y0XH0ff+V+vD2aalcisu32DnRiHcxOfSsmj9FEbzx9ZJA7n4X+q3kW5BytBfBeH 0SepN5peVBG/0PAA7mEf+Dv+39XTSVcr2GPc1nLpEjCwe0zDFSBxo+atwdywnNwhw2CJ cvcMQy62c7HyI75Cs5/1GD0w6BsuymC5ACcSKcEKhed8EnWGhAee/z+DPCUO10RaBao2 OE1w== X-Gm-Message-State: AOAM531kLpVJ5r4an27zpkW7gL/QVWjKBYFdwoKVpgo04JPbEgyue5Xk r1GG/h1MW3cToZQtqHUGAg6ioGESGxw= X-Google-Smtp-Source: ABdhPJzQYJuWCvj6F58YFA5GiaP6j8vX/t/0boozUW9M2DF3HE81D403uYPTtBDXS/t4R+l9SvOQIw== X-Received: by 2002:a1c:f316:: with SMTP id q22mr2910240wmq.152.1622802872495; Fri, 04 Jun 2021 03:34:32 -0700 (PDT) Original-Received: from krug ([89.180.155.72]) by smtp.gmail.com with ESMTPSA id l13sm5969106wrv.57.2021.06.04.03.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 03:34:31 -0700 (PDT) In-Reply-To: <83zgw6udxt.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Jun 2021 13:22:38 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x32b.google.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.23 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" Xref: news.gmane.io gmane.emacs.devel:270370 Archived-At: Eli Zaretskii writes: > My problem is that I know of now package that integrates tree-sitter > into Emacs with architecture that makes sense to me. The ones I saw > all send the entire buffer to tree-sitter using buffer-string (and > failing to encode it), which doesn't scale. In this matter, the LSP approach may be more efficient, since it transmits only changes/differences, and should (in principle) handle the encoding troubles. But I don't understand what's stopping these tree-sitter C modules (like [1] and [2]) to have access to the buffer's contents directly and have the best of both worlds. Jo=C3=A3o [1]: https://github.com/karlotness/tree-sitter.el [2]: https://github.com/ubolonton/emacs-tree-sitter