From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter api Date: Thu, 16 Dec 2021 16:14:52 -0800 Message-ID: References: <83r1f7hydn.fsf@gnu.org> <83lf3zdh4z.fsf@gnu.org> <8965C4A0-79D3-4D77-A6BA-D07A6C93F7FE@gmail.com> <83ilz3cs4k.fsf@gnu.org> <04D19C1A-CD64-4156-B932-1C9FEEE4EC7B@gmail.com> <83zgsebc0r.fsf@gnu.org> <1F752923-F357-4A18-B6E2-0120F1B9BD37@gmail.com> <83fsu5bzem.fsf@gnu.org> <83zgsdad5j.fsf@gnu.org> <83sfy391ni.fsf@gnu.org> <03386E3C-A975-4ECD-BF89-6AC62F751725@gmail.com> <83ilyz8xdl.fsf@gnu.org> <86czp6ukpj.fsf@stephe-leake.org> <1AEED8A5-BF5E-45E5-AE22-9B405A710F9B@gmail.com> <83czp313tf.fsf@gnu.org> <7447C582-70CB-4599-BC76-AD5687D64250@gmail.com> <784947A6-6164-4158-993B-01E881690ADF@gmail.com> <83zgrxji7q.fsf@gnu.org> <8E8D28F9-258E-490B-BF48-7EF8D6CA0817@gmail.com> <838rzgk6ll.fsf@gnu.org> <83k0g8mznc.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) 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="21353"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?B?VHXhuqVuLUFuaCBOZ3V54buFbg==?= , Theodor Thornhill , =?utf-8?Q?Cl=C3=A9ment_Pit-Claudel?= , Emacs developers , Stefan Monnier , Stephen Leake , john@yates-sheets.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 17 01:16:29 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 1my0vE-0005JD-M4 for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Dec 2021 01:16:28 +0100 Original-Received: from localhost ([::1]:54102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1my0vD-0006yM-G4 for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Dec 2021 19:16:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my0tm-00065u-8A for emacs-devel@gnu.org; Thu, 16 Dec 2021 19:14:58 -0500 Original-Received: from [2607:f8b0:4864:20::829] (port=39598 helo=mail-qt1-x829.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1my0tk-0003rO-M1; Thu, 16 Dec 2021 19:14:57 -0500 Original-Received: by mail-qt1-x829.google.com with SMTP id l8so995369qtk.6; Thu, 16 Dec 2021 16:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6Niu2ppTn+Ro973RnHUIO6oxR7ebEdFfj9+0uEH4dwc=; b=So2sGVgXZEuUyodIZv4sCCd7A8amlb6vNPyFkTCFURW+imKarQUSW2uKulX7BVUiE0 c9UgWBw1V67A5pfUjv804gJerqtSkvW1CCOMGCCJXpFP/kTb28JzEwUJLaP4GyUJTpKO htV60JV0R6SvMgoaV8UNmnYpx3gKAxrGH9ZEex/SgRz3ZZ9Qxh+t4zbH5g2eAzmosJXf r9sJkhRUSxvGcoCp+69/1+ZmAvoRYsFKhiTL4bjFq/2qh3Y2Z8DoCcxRS4VbEeAV7oRL /sDBf9Pur5/Fa1BFHnz/pOeEZRNiBJHJw+cp1xZmjHQ5b/+JMP1CPHtcZyAOiAdQJSS4 fAxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6Niu2ppTn+Ro973RnHUIO6oxR7ebEdFfj9+0uEH4dwc=; b=k9nDB4hSRfPRfl/G3NGV29bLQAYGkZQn2Z0hklGOEbgk/eNRZWBhu9/0jF4jn0bzno ynsCvsd/Fx2jVNlaDVVxgYDr3E2zOpg2yMRWdjnDQAxG1pM8FC9kj8oE7p5wYdmEHm/9 J6oGWNpa6vF9sV18beDkxYtYJhNn4OBBpQwTgYPjVe+RXXwYjtD5LinTzSiqLR9RZCgI hybMIqkAlGoCfxR04M1As1tpCk2+Y4bJAgFCG1c3ZfS0PGg/ZcDC960bU7dAosA44YT0 J/HXRJAS1xEKfZBj96fI7h6DhBw6sPYK0DROjCNknKxEro8ek2G3zc9LY4b9PZpLc+26 bA/g== X-Gm-Message-State: AOAM532O6qO5rE5akgvYmThxcP1dQh0xqV2i9SpvvF+XF1lCOgfwrcFi hkRKYsoNxX5hbIWyE8LWh24QaXESJhw= X-Google-Smtp-Source: ABdhPJzrbrWd8ATMGbNkef72YWLee3nGOwPBitDxNkqW80Yb8rPz1JMcBwbmq7/eJ+fZZ4t9uiCoTw== X-Received: by 2002:a05:622a:1307:: with SMTP id v7mr431781qtk.536.1639700094766; Thu, 16 Dec 2021 16:14:54 -0800 (PST) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:1535:57d6:4d1d:1e63]) by smtp.gmail.com with ESMTPSA id e20sm5804518qty.14.2021.12.16.16.14.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Dec 2021 16:14:54 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::829 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::829; envelope-from=casouri@gmail.com; helo=mail-qt1-x829.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, 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" Xref: news.gmane.io gmane.emacs.devel:282169 Archived-At: > On Dec 13, 2021, at 11:19 PM, Yuan Fu wrote: >=20 >>>=20 >>> It=E2=80=99s been a while and no one provided further comments on = the indent and font-lock integration of tree-sitter, so I finished the = manuals for indent and font-lock integration. They are under 24.6 Font = Lock Mode and 24.7 Automatic Indentation of code. Once the author of = tree-sitter allow tree-sitter to change malloc implementation at = runtime, tree-sitter integration will be ready. (Though I suspect that = won=E2=80=99t come soon. The author is still actively developing = tree-sitter but he didn=E2=80=99t reply to my request.) >>=20 >> Would you please ping the authors and tell them that this single = issue >> prevents us from integrating TS into Emacs? Maybe that would change >> their priorities. I cannot imagine that the feature we are asking is >> hard to implement. >=20 > Done. Someone commented on my request saying > Had this issue as well, but thought was too niche to open an issue. = The standard way to change the allocator at runtime is with the = LD_PRELOAD envvar (see mimalloc or any allocator doc). IIUC it is more of a user-feature right? Like you will use = LD_PRELOAD=3Dxxx program but not change the environment programmatically = in the program? Could Emacs do this should tree-sitter doesn=E2=80=99t = want to change? BTW the conversation is at = https://github.com/tree-sitter/tree-sitter/issues/1535 The author suggested to implement runtime change of malloc on top of = current macros, but I think he missed the point (we don=E2=80=99t want = to maintain our own version of tree-sitter). Yuan=