From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pedro Andres Aranda Gutierrez Newsgroups: gmane.emacs.devel Subject: Re: Make all tree-sitter modes optional Date: Sun, 22 Jan 2023 07:23:17 +0100 Message-ID: References: <83a62dobfi.fsf@gnu.org> <83o7qtm33d.fsf@gnu.org> <83o7qskt0d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000005f02e05f2d45327" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23486"; 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 Sun Jan 22 07:24:29 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 1pJTmH-0005wK-DE for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Jan 2023 07:24:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJTlc-0005JF-TX; Sun, 22 Jan 2023 01:23:48 -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 1pJTlc-0005J6-1a for emacs-devel@gnu.org; Sun, 22 Jan 2023 01:23:48 -0500 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJTlZ-000181-Ix; Sun, 22 Jan 2023 01:23:47 -0500 Original-Received: by mail-ed1-x534.google.com with SMTP id v5so11154794edc.3; Sat, 21 Jan 2023 22:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+WdhTaS3Eus5fBaSsJoukLgEEN+Fg+5c8ulnu1tlKIc=; b=IGfVfK4PZtOvj30laP5Z+c+Hi8f4FE2hyReRqpIg5EcfZNSBWQL2TsUgFcIu4vFliD 0y8i+8NbAc3kzP++4rxh3hq3pXB5Lb75h/inO7RG0XV4gDuc0KhaMH+pm5U7lW9hxCq+ 2cSRoKDE2+f3dQPdxXlFKJmD7Ce81Y2incazs58GXZ0xdtEEw/btmHjByB/kwXWi3QDu o2sMnHHdS5z1w7oTBaU2tY02P3+mlkQN4MUUTBc8rbX4jYoost1Uos5lxdmEdb2326eq WbdQmGQ1ZPw2xrIAwgm7f/L4HOeD8tB7LylRfEEFzQv/XVUk7w/hifXMVLdYbuqzA6qX DqUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+WdhTaS3Eus5fBaSsJoukLgEEN+Fg+5c8ulnu1tlKIc=; b=PmA49TscdW9DO6hhT/KJUC0UHv0n6KwH9m14219ZsV5Z++mYEVR1z5zqo62DCigZcC 9IlPUHbaIZq0AbTkuPuCVyfl+ev8IovRpscFG77gFg+ClJ2fKtyUTKrfi3I8GeC13k4V xebds1z79TuRSJmMSi3PtvJONgNpg38ad3kqwTt4owLJeeVKOZ6ubs7oUpEn7MxWt+dj nOs0pThobyzl9os8PUYQyvsEh4AvfTwY457aPqZrcEM32ixU0TeqiPMm+KOvUGdU/qTd MuGYhOfbFzasiDvOE/U0qyz41sOhZh8EB7IFk0G0gNmSG5p6MCvkfLU8HQa5RR4cibb8 tU3w== X-Gm-Message-State: AFqh2kpiFN7UXtyjhkMp1ylMccBmK3X1dztt2j2sJ3mfJ1CttFOHKS9T PGGIJ/GKqbj+MD34GECTdOKXPthOgOO374EIwx8UcNRTKb4Fhg== X-Google-Smtp-Source: AMrXdXsn2s8eFBP/EjPaCgVSXDISj/5O08Il3wwy+f49od+M+SYNWdPh0yMG5McP/NT3yJzpd0k+TOgpMqQPweJcsUA= X-Received: by 2002:aa7:d74a:0:b0:463:bc31:2604 with SMTP id a10-20020aa7d74a000000b00463bc312604mr2289968eds.32.1674368623438; Sat, 21 Jan 2023 22:23:43 -0800 (PST) In-Reply-To: <83o7qskt0d.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=paaguti@gmail.com; helo=mail-ed1-x534.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, HTML_MESSAGE=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:302596 Archived-At: --00000000000005f02e05f2d45327 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Eli writes: > What message? I asked to show these messages before, and I didn't see > your answer to that question. We don't intend to have Emacs show any > such messages just because you don't have tree-sitter installed. Just try M-x c-ts-mode and you'l get this message *four* times (side question, isn't one enough?) =E2=9B=94 Warning (treesit): Cannot activate tree-sitter, because tree-sitt= er library is not compiled with Emacs Another question: If I can't use the command, wouldn't it be better if I had no access to it? Best, /PA PS: BTW, at this point, removing the 'Warning (treesit)' would leave a coherent message WRT the no entry sign, but that's another thread ;-) On Sat, 21 Jan 2023 at 12:48, Eli Zaretskii wrote: > > From: Pedro Andres Aranda Gutierrez > > Date: Sat, 21 Jan 2023 12:30:26 +0100 > > Cc: emacs-devel@gnu.org > > > > Eli writes: > > > Why would it confuse? You also have there stuff like w32-win.el.gz, > > > which is used only on MS-Windows, and other files that are not > > > necessarily for your configuration. This is not a problem, and > > > shouldn't be one. > > > > I don't know, maybe for me there is a difference between the OS specifi= c > stuff, tree-sitter and other stuff in > > Emacs: > > It is nothing new in Emacs: we provide many packages, some of which > are specific to platforms other than yours, some others need optional > libraries that you don't necessarily have, etc. > > > tree-sitter modes 'compete' with 'regular' modes and if I don't have > tree-sitter activated at compile time, it > > can be misleading to see those files there > > I disagree it should mislead anyone, and let's leave it at that. > > > and 'sub-optimal' (to say the least) to get a message that you > > can't use them. > > What message? I asked to show these messages before, and I didn't see > your answer to that question. We don't intend to have Emacs show any > such messages just because you don't have tree-sitter installed. > > > OS related stuff is different in the sense that, well, if I'm on a Linu= x > system and try to use (you say the > > OS)-specific features, it is natural that I get a 'wake-up' message > there and stop trying to do things that make > > no sense. > > Same thing if you use a Lisp package which requires an optional > library you don't have installed or if you use Emacs which wasn't > built with support for that library. Examples: GnuTLS, HarfBuzz, > librsvg, sqlite3, etc. > > > As for the rest, having dormant features that _work_ (or are WIP with a > level of maturity enough to be in > > master) and only wait for me to test them and activate them if they hel= p > me in my day-to-day interactions > > with Emacs, of course, put 10^n n->infinity of those in Emacs, no > problem. > > > > In that sense, if there was a way to disregard *-ts-*.el files in > ELC/ELN compilation and installation when I > > compile Emacs _without_ tree-sitter support, the whole picture would be > (once again, IMvHO) much more > > coherent. > > We don't disregard any Lisp files. When Emacs builds, it compiles all > the files in the source tree. A release tarball comes with *.elc > files already compiled, and *.eln files will only be produced if you > actually load the corresponding *.el package. So I see no problem > here. > --=20 Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet --00000000000005f02e05f2d45327 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Eli wri= tes:
> What message?=C2=A0 I asked to show these messages before, an= d I didn't see
> your answer to that question.=C2=A0 We don'= ;t intend to have Emacs show any
> such messages just because you don= 't have tree-sitter installed.

Just try M-x c-ts-mode and you'l get this message *four* times (side = question, isn't one enough?)

=E2=9B=94 Warning (treesit): Cannot activate tree-sitter, becau= se tree-sitter library is not compiled with Emacs
Another question: If I can't use the command, wouldn't = it be better if I had no access to it?

Best, /PA

PS: BTW, at this point, removing the 'Warn= ing (treesit)' would leave a coherent message WRT the no entry sign, bu= t that's another thread ;-)

<= /div>

On Sat, 21 Jan 2023 at 12:48, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Pedro Andres Aranda Guti= errez <paaguti@gm= ail.com>
> Date: Sat, 21 Jan 2023 12:30:26 +0100
> Cc: emacs-dev= el@gnu.org
>
> Eli writes:
> > Why would it confuse?=C2=A0 You also have there stuff like w32-wi= n.el.gz,
> > which is used only on MS-Windows, and other files that are not > > necessarily for your configuration.=C2=A0 This is not a problem, = and
> > shouldn't be one.
>
> I don't know, maybe for me there is a difference between the OS sp= ecific stuff, tree-sitter and other stuff in
> Emacs:

It is nothing new in Emacs: we provide many packages, some of which
are specific to platforms other than yours, some others need optional
libraries that you don't necessarily have, etc.

> tree-sitter modes 'compete' with 'regular' modes and i= f I don't have tree-sitter activated at compile time, it
> can be misleading to see those files there

I disagree it should mislead anyone, and let's leave it at that.

> and 'sub-optimal' (to say the least) to get a message that you=
> can't use them.

What message?=C2=A0 I asked to show these messages before, and I didn't= see
your answer to that question.=C2=A0 We don't intend to have Emacs show = any
such messages just because you don't have tree-sitter installed.

> OS related stuff is different in the sense that, well, if I'm on a= Linux system and try to use (you say the
> OS)-specific features, it is natural that I get a 'wake-up' me= ssage there and stop trying to do things that make
> no sense.

Same thing if you use a Lisp package which requires an optional
library you don't have installed or if you use Emacs which wasn't built with support for that library.=C2=A0 Examples: GnuTLS, HarfBuzz,
librsvg, sqlite3, etc.

> As for the rest, having dormant features that _work_ (or are WIP with = a level of maturity enough to be in
> master) and only wait for me to test them and activate them if they he= lp me in my day-to-day interactions
> with Emacs, of course, put 10^n n->infinity of those in Emacs, no p= roblem.
>
> In that sense, if there was a way to disregard *-ts-*.el files in ELC/= ELN compilation and installation when I
> compile Emacs _without_ tree-sitter support, the whole picture would b= e (once again, IMvHO) much more
> coherent.

We don't disregard any Lisp files.=C2=A0 When Emacs builds, it compiles= all
the files in the source tree.=C2=A0 A release tarball comes with *.elc
files already compiled, and *.eln files will only be produced if you
actually load the corresponding *.el package.=C2=A0 So I see no problem
here.


--
Fragen sind nicht da um b= eantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
<= div>unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should = run a leader-deposed hook here, but we can't yet

--00000000000005f02e05f2d45327--