unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: Stefan Kangas <stefankangas@gmail.com>,
	 emacs-devel@gnu.org,
	 Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Is it better to add treesitter modes to core?
Date: Mon, 08 Jan 2024 06:15:07 +0000	[thread overview]
Message-ID: <871qas8i6s.fsf@posteo.net> (raw)
In-Reply-To: <df568f0e-c83b-4188-ae55-e49a5e5858c9@gutov.dev> (Dmitry Gutov's message of "Sun, 7 Jan 2024 23:27:42 +0200")

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 07/01/2024 19:46, Stefan Kangas wrote:
>> Dmitry <dmitry@gutov.dev> writes:
>> 
>>> On Sun, Jan 7, 2024, at 2:34 PM, Philip Kaludercic wrote:
>>>> What I am wondering, is if this simplification were to take place, if it
>>>> would be possible to add ada-mode (or ada-ts-mode in that case) back to
>>>> the core?
>>> What is this fetish of adding everything to the core?
>>> ELPA is just one 'M-x package-install' away.
>> In Emacs, whatever real work you need to do, it's often the case
>> that
>> "it's just one M-x package-install" away.
>
> That's right. It doesn't work for every purpose, though. Not for
> infrastructure packages (which we expect to be used by other
> packages), nor for features that we want to have enabled by default.
>
>> I see little reason for that.
>
> You don't want ELPA to be used?
>
>> In my ideal world, we should have basic editing support in place in
>> Emacs for typical tasks, and packages should provide extensions.  Most
>> users don't particularly enjoy starting work with installing a bunch of
>> extras.
>
> The way VS Code works and its level of popularity seem to say otherwise.

One notable difference is that VS Code prompts users to install the
necessary packages, while with Emacs one has to figure out what to
install (and how to install it in the case of ada-mode).

>> Take a look at how much better things are elsewhere and weep:
>>      https://github.com/vim/vim/tree/master/runtime/syntax
>> Yes, vim is different, their job is easier and so on and so forth.
>
> It is only better if the features provided in there are reasonably
> complete and well-maintained.
>
> Also note that in no cases Vim bundles advanced completion
> functionality of the kind that Ada-mode has. It's much bigger than any
> of the files in the above dir.
>
>> But
>> also consider that treesitter modes are looking far easier to maintain
>> than some of the behemoths we have sometimes had to write in ELisp.
>
> And yet the Vim repository doesn't have any tree-sitter integration,
> it's all third-party. I don't think we'll see it there anytime soon
> (or even in the medium term).

I don't know how to check this, but didn't Neovim have built-in
tree-sitter support?

>> We might not want _all_ language support in Emacs, but for the main
>> languages: why would we _not_ want it?  While I appreciate the
>> importance of workflow related arguments, from the end users point of
>> view, it really is a no-brainer which way is better.
>
> I don't really mind having the major modes for most popular languages
> in here, because in those cases the problem of extra traffic is offset
> by the advantage that one can see a problem and contribute a fix that
> will go out to help a lot of people. Even if I don't use a language in
> question myself. But doing that with languages that are unfamiliar to
> most contributors, and have small audience, is questionable.
>
>> This doesn't only apply to prog-modes, but also many text-modes.  Take a
>> look at toml-ts-mode.el for example, and tell me one reason why it
>> shouldn't be in Emacs core.  Markdown.  YAML.  Stuff like that.
>
> Possible grammar versioning problems. But the above should be small
> and stable enough, nor should they require many changes over the
> years.

I don't think this has to be a problem.  Last year I had suggested that
`treesit-install-language-grammar' should download release GitHub
tarballs, not just clone the repository (which requires Git, and is
prone to upstream breakage).

>>> And Ada is niche enough that even the argument of having the popular
>>> languages supported OOtB doesn't work.
>> I think historical context matters here.  Ada is not exactly in
>> vogue
>> these days, but it _is_ supported by GCC, and it has an ISO standard.
>> It's not some random novelty language for people that feel that
>> Typescript is not edgy enough, or anything like that.
>> We also happened to support it in Emacs for ages.
>
> And it's still there in ELPA, available for everybody to install.
>
> Note that I don't mean to belittle Stephen's work, nor have any desire
> to throw it away, but the sentiment "it's unmaintained, let's bring it
> in the core and see what happens" sounds very wrong to me.

Just to clarify, my question was what people would think of adding
ada-mode back to the core, if it were simplified using tree sitter.

> It would be a good idea for the interested parties to pay more
> attention to ELPA and improve it there. And if we really want basic
> support for Ada in the core, one could extract the "traditional" major
> mode from it. Or perhaps start anew and implement the tree-sitter
> based mode. Since there is an existing (LSP) language server, Eglot
> could be used for the IDE features. And then it would be easier to
> compare the feature sets.



  reply	other threads:[~2024-01-08  6:15 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-07 12:34 Ada-mode to be abandoned? Philip Kaludercic
2024-01-07 14:48 ` Eli Zaretskii
2024-01-07 15:21 ` Dmitry
2024-01-07 15:25   ` Eli Zaretskii
2024-01-07 15:54     ` Dmitry
2024-01-07 16:55       ` Eli Zaretskii
2024-01-08  2:14         ` Dmitry Gutov
2024-01-08  3:36           ` Eli Zaretskii
2024-01-08 12:22             ` Eli Zaretskii
2024-01-08 12:37               ` Dmitry Gutov
2024-01-08  1:45       ` Po Lu
2024-01-07 15:34   ` Daniel Mendler via Emacs development discussions.
2024-01-07 15:45     ` Alfred M. Szmidt
2024-01-07 15:58     ` Dmitry
2024-01-07 17:52     ` Stefan Kangas
2024-01-07 16:26   ` Philip Kaludercic
2024-01-07 16:48     ` Daniel Mendler via Emacs development discussions.
2024-01-07 20:36     ` Dmitry Gutov
2024-01-07 21:02       ` Daniel Mendler via Emacs development discussions.
2024-01-07 21:27         ` Stefan Kangas
2024-01-07 22:05           ` Daniel Mendler via Emacs development discussions.
2024-01-08  3:26         ` Eli Zaretskii
2024-01-07 17:46   ` Is it better to add treesitter modes to core? Stefan Kangas
2024-01-07 21:27     ` Dmitry Gutov
2024-01-08  6:15       ` Philip Kaludercic [this message]
2024-01-08 12:46         ` Dmitry Gutov
2024-01-08 12:47         ` Eli Zaretskii
2024-01-09 19:27           ` Philip Kaludercic
2024-01-09 19:54             ` Eli Zaretskii
2024-01-09 20:21               ` Philip Kaludercic
2024-01-10  3:29                 ` Eli Zaretskii
2024-01-09  5:20       ` Stefan Kangas
2024-01-09 17:50         ` Dmitry Gutov
2024-01-09 17:54           ` Dmitry Gutov
2024-01-09 18:59           ` Stefan Kangas
2024-01-09 19:51             ` Eli Zaretskii
2024-01-09 20:06               ` Dmitry Gutov
2024-01-10  6:27                 ` Stefan Kangas
2024-01-10 11:38                   ` Dmitry Gutov
2024-01-10 12:03                     ` Stefan Kangas
2024-01-10 12:14                       ` Dmitry Gutov
2024-01-10 15:11                         ` Stefan Kangas
2024-01-10 12:35                       ` Modes in generic-x.el (was: Is it better to add treesitter modes to core?) Peter Oliver
2024-01-10 13:50                         ` Eli Zaretskii
2024-01-10 13:47                       ` Is it better to add treesitter modes to core? Eli Zaretskii
2024-01-07 16:29 ` Ada-mode to be abandoned? Fernando Oleo Blanco
2024-01-07 16:48   ` Philip Kaludercic
2024-01-07 17:22     ` Fernando Oleo Blanco

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qas8i6s.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=dmitry@gutov.dev \
    --cc=emacs-devel@gnu.org \
    --cc=stefankangas@gmail.com \
    --cc=stephen_leake@stephe-leake.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).