From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jen-Chieh Shen Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] Submitting treesit-fold to NonGNU ELPA Date: Tue, 2 Jul 2024 14:30:51 -0700 Message-ID: References: <86a5je2dh1.fsf@gmail.com> <24F7C984-E6F8-49D2-BD98-46DC500359A1@gmail.com> <86cynwzda5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004007e9061c4a6e4a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38894"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Yuan Fu , Emacs Devel , Philip Kaludercic , Stefan Kangas To: "Elijah G." Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 02 23:32:10 2024 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 1sOl6g-0009sB-HW for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jul 2024 23:32:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOl5n-0007TL-D9; Tue, 02 Jul 2024 17:31:15 -0400 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 1sOl5h-0007RM-0d for emacs-devel@gnu.org; Tue, 02 Jul 2024 17:31:09 -0400 Original-Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOl5d-0005Xn-JW for emacs-devel@gnu.org; Tue, 02 Jul 2024 17:31:08 -0400 Original-Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-52cd87277d8so4913654e87.2 for ; Tue, 02 Jul 2024 14:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719955863; x=1720560663; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3x94aeLg+YCZbz8jBKtrEnhbOhNJUX90VIfK0PdN+GI=; b=TU2jIUg/KNYU+HX6XBZiuS/ke5qT9F1EXDyacew4UQHR9qY84wWwKcaLPWvuqZ6JDi uVuUdPwx2d30vceKZqVtCQ7XVTm2pSYnY/B6fWwExC8HV03CljOY72nJ687CHKOtFqnq 7YHOPVwRy2r0DZGhBRl43qyKLIrPkNdHDcyucdlUpfju1nKZroV569TMScKK88lQOMEZ reX2EI9BAIJr9HGyxcfnZOpKjGTIU1LRSP7qShplVQkTA9hjkza4P3ESW+WsOPwUZv0d 4IqD6xsFQvDZA3dYwe1DawWNCjbE9QItKWNFMdSXzfh0rfZyas1JaXjX8odn3bdmpX6o o/NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719955863; x=1720560663; 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=3x94aeLg+YCZbz8jBKtrEnhbOhNJUX90VIfK0PdN+GI=; b=NvasAGSPc90tuCiFWFeSBg2AYbJ1OQR6RyfnNw0a9czJ++W9fsOibFmWlTCwJwlQVY RSt2Mq94IcUkhsOlTT0TI3DjLs9tmFTBCzSSLLqg6GqMWVZwtk0NZyHUTGVoCRB/doOQ sIMVPOsZN6D0LyxL/pBqmNrg+nR0fxxzux7U3kBite+uCa8EZo0z0++qsbAZ5tLcS/Vz Ythlvfus0k+5Yk0Rc7qx2KC739lB0SpNdfSwlwnft2t3B1ltNhDnVS2v5PPNiZhxKgND M+SY3in0IEE5YKHMiCIj+YTKix1iKtCtKIGsksv+nCzJwk8J7aK9+kvF9hi7MGmVbF+Y oM7A== X-Forwarded-Encrypted: i=1; AJvYcCV4FP00L6hIh8IEhHA6NLl/cgbVutM3mWFLC5O83ggviwwavamn2BAQL7NBqdKeWLCYx6joh6ictx3u6wE/SNADzlEy X-Gm-Message-State: AOJu0YwpEQm7CTZNO5wfVpeCIYppI4UvI6l00yTpe+IKGDQAFjwysC8d pV6JFKk3VIsDb0Sfg+FAl2yfcEto/OWlV+muPc6THJX9REKIEbcWvbJ5VyVVm7Wa35l0M9ktKne gtgQP49jOx8rGf7ghVydbK0/WwUY= X-Google-Smtp-Source: AGHT+IGzD1ExMKxSsSr+DZu27Rig/C6pv4tF1dF9bFRqYBshEE5+hhddhsQ93/vC3H51VmcGqHCuEoNWyMau+9Yiz8A= X-Received: by 2002:a05:6512:1251:b0:52c:deba:7e6e with SMTP id 2adb3069b0e04-52e82691371mr7815924e87.29.1719955863108; Tue, 02 Jul 2024 14:31:03 -0700 (PDT) In-Reply-To: <86cynwzda5.fsf@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=jcs090218@gmail.com; helo=mail-lf1-x134.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, HTML_OBFUSCATE_05_10=0.26, 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:321207 Archived-At: --0000000000004007e9061c4a6e4a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > I'would also like that the pacakge can get into GNU ELPA, but IMO the > problem would be the contributions since i think it could limit it > (due paperwork), also since this package is a fork of another > one [ts-fold][https://github.com/emacs-tree-sitter/ts-fold] i don't know > if it could be a problem, Jen-Chieh what do you think about this?. I am unsure since I have not submitted packages to GNU ELPA or non-GNU ELPA= . As seven people (including myself) have made contributions to more than 15 LOC, I assumed we would need to get them all to sign the paperwork. - jcs090218 (+12,214/-8,638) - signed - Junyi Hou (+402/-39) - Nidish96 (+215/-107) - samrjack (+567/-258) - DevelopmentCool2449 (+434/-360) - mattiasdrp (+199/-90) - akirak (+29/-2) On Mon, Jul 1, 2024 at 8:25=E2=80=AFPM Elijah G. wrote= : > Stefan Monnier writes: > > >> Thanks for working on this! Treesit-fold is quite useful and through. > >> It=E2=80=99ll be a great addition to NonGNU ELPA or ELPA! > > > > I just added it to `nongnu.git`. It should hopefully appear at NonGNU > > later today. > > > > I see that there are very few other contributors beside Jen-Chieh Shen > > (the main author). Since he signed the copyright paperwork, it might > > not be too hard to get this into GNU ELPA. > > I'would also like that the pacakge can get into GNU ELPA, but IMO the > problem would be the contributions since i think it could limit it > (due paperwork), also since this package is a fork of another > one [ts-fold][https://github.com/emacs-tree-sitter/ts-fold] i don't know > if it could be a problem, Jen-Chieh what do you think about this?. > > > Another thing I noticed: just as for the EditorConfig thingy, this > package > > comes with a `-alist` holding per-major-mode information which > > should ideally be provided directly by the major modes rather than by > > the package. But just as with the EditorConfig thingy, the package did > > not come with a variable which the major mode can set buffer-locally fo= r > > that purpose. Not sure how we can encourage such a design, tho. > > I'm not understanding this, but if the major mode (-ts-modes) comes with > a variable for the treesitter nodes folding (like something that maybe > hideshow can use) maybe it can be possible use the > variable instead define them, the problem that i see is the > compatibility with emacs-29. > > something like this?: > ``` > (defvar c-ts-mode-nodes-alist '((compound_statement . > treesit-fold-range-seq) (declaration_list . treesit-fold-range-seq) > (enumerator_list . treesit-fold-range-seq) (field_declaration_list . > treesit-fold-range-seq) (preproc_if . treesit-fold-range-c-preproc-if) > (preproc_ifdef . treesit-fold-range-c-preproc-ifdef) (preproc_elif . > treesit-fold-range-c-preproc-elif) (preproc_else . > treesit-fold-range-c-preproc-else) (comment . > treesit-fold-range-c-like-comment))) > ``` > > -- > E.G. from Gnus The Emacs Newsreader and E-mail client > --0000000000004007e9061c4a6e4a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> I'would also like that the pacakge can get into G= NU ELPA, but IMO the
> problem would be the contributions since i thi= nk it could limit it
>=C2=A0(due paperwork), also since this package = is a fork of another
>=C2=A0one [ts-fold][https://= github.com/emacs-tree-sitter/ts-fold] i don't know
>=C2=A0if = it could be a problem, Jen-Chieh what do you think about this?.

I am unsure since I have not submitted packages to GNU ELPA or non-= GNU ELPA.
As seven people (including myself) have made contributi= ons to more than 15 LOC,
I assumed we would need to get them all = to sign the paperwork.=C2=A0

- jcs090218=C2=A0(+12,214/-8,638) - signed
- Junyi Hou=C2=A0(+402/-39)<= /div>
- Nidish96=C2=A0(+215= /-107)
- samrjack=C2= =A0(+567/-258)
- DevelopmentCool2449=C2=A0(+434/-360)
- mattiasdrp=C2=A0(+199/-90)
- akirak=C2=A0(+29/-2)


On Mon, Jul 1, 2024 at 8:25=E2=80=AFPM Elijah G. <eg642616@gmail.com> wrote:
Stefan Monnier <monnier@iro.umontreal.ca> w= rites:

>> Thanks for working on this! Treesit-fold is quite useful and throu= gh.
>> It=E2=80=99ll be a great addition to NonGNU ELPA or ELPA!
>
> I just added it to `nongnu.git`.=C2=A0 It should hopefully appear at N= onGNU
> later today.
>
> I see that there are very few other contributors beside Jen-Chieh Shen=
> (the main author).=C2=A0 Since he signed the copyright paperwork, it m= ight
> not be too hard to get this into GNU ELPA.

I'would also like that the pacakge can get into GNU ELPA, but IMO the problem would be the contributions since i think it could limit it
(due paperwork), also since this package is a fork of another
one [ts-fold][https://github.com/emacs-tree-sitter/ts-f= old] i don't know
if it could be a problem, Jen-Chieh what do you think about this?.

> Another thing I noticed: just as for the EditorConfig thingy, this pac= kage
> comes with a `<blabla>-alist` holding per-major-mode information= which
> should ideally be provided directly by the major modes rather than by<= br> > the package.=C2=A0 But just as with the EditorConfig thingy, the packa= ge did
> not come with a variable which the major mode can set buffer-locally f= or
> that purpose.=C2=A0 Not sure how we can encourage such a design, tho.<= br>
I'm not understanding this, but if the major mode (-ts-modes) comes wit= h
a variable for the treesitter nodes folding (like something that maybe
hideshow can use) maybe it can be possible use the
variable instead define them, the problem that i see is the
compatibility with emacs-29.

something like this?:
```
(defvar c-ts-mode-nodes-alist '((compound_statement . treesit-fold-rang= e-seq) (declaration_list . treesit-fold-range-seq) (enumerator_list . trees= it-fold-range-seq) (field_declaration_list . treesit-fold-range-seq) (prepr= oc_if . treesit-fold-range-c-preproc-if) (preproc_ifdef . treesit-fold-rang= e-c-preproc-ifdef) (preproc_elif . treesit-fold-range-c-preproc-elif) (prep= roc_else . treesit-fold-range-c-preproc-else) (comment . treesit-fold-range= -c-like-comment)))
```

--
E.G. from Gnus The Emacs Newsreader and E-mail client
--0000000000004007e9061c4a6e4a--