From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Elijah G." Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] Submitting treesit-fold to NonGNU ELPA Date: Mon, 01 Jul 2024 21:24:50 -0600 Message-ID: <86cynwzda5.fsf@gmail.com> References: <86a5je2dh1.fsf@gmail.com> <24F7C984-E6F8-49D2-BD98-46DC500359A1@gmail.com> 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="4633"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (windows-nt) Cc: Yuan Fu , Emacs Devel , jcs090218@gmail.com, Philip Kaludercic , Stefan Kangas To: Stefan Monnier , jcs090218@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 02 05:26:57 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 1sOUAT-00011b-DF for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jul 2024 05:26:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOU9R-0001yY-VH; Mon, 01 Jul 2024 23:25:53 -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 1sOU9P-0001yL-RH for emacs-devel@gnu.org; Mon, 01 Jul 2024 23:25:51 -0400 Original-Received: from mail-oo1-xc44.google.com ([2607:f8b0:4864:20::c44]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOU9O-0000jQ-4B for emacs-devel@gnu.org; Mon, 01 Jul 2024 23:25:51 -0400 Original-Received: by mail-oo1-xc44.google.com with SMTP id 006d021491bc7-5c219c54800so1799962eaf.0 for ; Mon, 01 Jul 2024 20:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719890747; x=1720495547; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R52WLhLqTn85vUuGxexzFXohNZBDVn+4qZPkmdNEpP8=; b=RIezSKzCzj508bgOF3U1WtjY0ZayCyiA2esLDVFbag0GT3quHI1ceSKt2lfq/aviJu NbDBicVYFRpft0ApUlXcnwRsHGacn2erGUTVRTLCBm7tz7IDKzW9GCvdSxzdOXc4ZyK3 I6kFu8q6Lfot4xVFk7twHkBc5vwOIcmk2HHc+82GRqsT9x/GP8YI3X3MC7HA5rN4qEow qqYkHo+V/gxP+O3c/nqoK/KIIzgcVuJ0cs9QDVVL8uaPd+9iFAo3yGY5oHyaLg4GDWK4 V912qu8oRxMZWg2zXhzOByemnovE8gCewzuKMEwPRQc+Spp8TewP3tYSxu8XGT6U6Eb9 1qwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719890747; x=1720495547; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=R52WLhLqTn85vUuGxexzFXohNZBDVn+4qZPkmdNEpP8=; b=snDSxt/PZm+TygbXVjXkGsfyL2oh5CuDl6abJD8D3Wez7NX0wStLqJLHY9F+YK2ne7 ABX2p5zhC7heujP7yB7S7hETwM/RPQU8fGfEFhLx+8vliFyY1INsRnk6vynjtFUN0fxc nn90j9vDMIob+NwX0kc9MFvsfBYF31lKeHBSAAeOPpG4f8zUpKbx3kvJDoKoYm/nXNhe MnYq7nft9ONBVIlXTmESxoqslZmfTiE4PT+Z6J2iv9ZuqPKs57NBXhiISAi5qe5l/Hr2 I+WWtZoSKtn//lpvSh5n/QLltuWDL0tm+yV9O3G9xo0tkWbB5ar8WJnKac5nO5UHmk4/ zo8Q== X-Forwarded-Encrypted: i=1; AJvYcCUWIWHlX1BJ3n7iyHx70yVXnMXxI3/PHWmF2+nMOLSGpul6sBXaA7lTjUO5LaIXKqpe/U8FzxFSxp/YORd3gQWzegvI X-Gm-Message-State: AOJu0YyC5Z6f4x4A7BVOhoLfcQ8WzWOgHIfccYHbr3IbYrSYV+A5XJe2 dmKOtK/CZSxApLmC+P/Tkq14HVPqc7ZhiX+HuZDnnnqZnmUqotBI X-Google-Smtp-Source: AGHT+IF2I0vkZFkEJRlxGdu7KIDSdU7S2nuR3LShe+b1q1xl+aP+IvVI9H+qfx6kV6wQXBdJsckAMg== X-Received: by 2002:a4a:58c4:0:b0:5c2:2663:bbe with SMTP id 006d021491bc7-5c438e0258cmr8088214eaf.1.1719890746742; Mon, 01 Jul 2024 20:25:46 -0700 (PDT) Original-Received: from LIBERO ([187.184.25.251]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5c430aa1cf0sm879097eaf.23.2024.07.01.20.25.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 20:25:46 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Mon, 01 Jul 2024 10:05:24 -0400") Received-SPF: pass client-ip=2607:f8b0:4864:20::c44; envelope-from=eg642616@gmail.com; helo=mail-oo1-xc44.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, 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:321086 Archived-At: 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 for > 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-se= q) (declaration_list . treesit-fold-range-seq) (enumerator_list . treesit-f= old-range-seq) (field_declaration_list . treesit-fold-range-seq) (preproc_i= f . 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-l= ike-comment))) ``` -- E.G. from Gnus The Emacs Newsreader and E-mail client