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.bugs Subject: bug#68824: treesitter support for outline-minor-mode Date: Sun, 11 Feb 2024 17:07:00 -0800 Message-ID: References: <86le8667u7.fsf@mail.linkov.net> <865xza39vp.fsf@gnu.org> <86y1c6q7oh.fsf@mail.linkov.net> <86mssbbdz5.fsf@mail.linkov.net> <86zfwbwe7a.fsf@gnu.org> <86v86z9e4u.fsf@mail.linkov.net> <86eddmwzs0.fsf@gnu.org> <865xyykvp3.fsf@mail.linkov.net> <86sf21v3rj.fsf@gnu.org> <864jeg8dch.fsf@mail.linkov.net> <86jznctd6p.fsf@gnu.org> <86le7qykec.fsf@mail.linkov.net> <86cyt2st5g.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) 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="2330"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68824@debbugs.gnu.org, Juri Linkov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 12 02:08:10 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rZKnp-0000Om-W9 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Feb 2024 02:08:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZKnU-0005EN-EO; Sun, 11 Feb 2024 20:07: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 1rZKnS-0005DA-Av for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 20:07:46 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZKnS-0002RB-3A for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 20:07:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZKni-0005rm-Az for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 20:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Feb 2024 01:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68824-submit@debbugs.gnu.org id=B68824.170770005822484 (code B ref 68824); Mon, 12 Feb 2024 01:08:02 +0000 Original-Received: (at 68824) by debbugs.gnu.org; 12 Feb 2024 01:07:38 +0000 Original-Received: from localhost ([127.0.0.1]:37391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZKnK-0005qZ-AX for submit@debbugs.gnu.org; Sun, 11 Feb 2024 20:07:38 -0500 Original-Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:47419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZKnG-0005qE-W1 for 68824@debbugs.gnu.org; Sun, 11 Feb 2024 20:07:36 -0500 Original-Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1d7393de183so16928595ad.3 for <68824@debbugs.gnu.org>; Sun, 11 Feb 2024 17:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707700032; x=1708304832; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WEfTbPun6Vzg9y4/FTpoh//fWddpgKc2d/SK1dU/GHw=; b=Y/IjAAbuIYE3RNsFVMKlFZA/eWtHA4wDqb8xqCITzrarGBHZLaoR/R/RTVbuw38qnz /BvRLOuGe6gYOV2jqm3Md70Xt/FghbDdGKTboskCELXcTPCvCkylrWt4UHfj6cwuJzJ5 UbIMFtYHxWVNZMPJ/T59GPKnUVSbiAR3WKvRgTpqcGhMW8xaEHElyv5S7aQ1bEueA2e4 VfqKPEgjSgM4FPt9B7HPfuyyf4cIT3W6jH6dnyIUHpkECQNxEA9rLFpEtj6t/y6EX+rJ emdTsZpJkXl6gNcv35MzGE+DbEaM4gSSUg1s9GuHEh3IbkOWBGdjb1Lh3XjBbQJubUgS CZ/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707700032; x=1708304832; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WEfTbPun6Vzg9y4/FTpoh//fWddpgKc2d/SK1dU/GHw=; b=vvdx+XtJ1hFFZH5KXFe/BhOUbKU+qY2oSBZF16BO7w+MPucHcyLrF8k13yInqNpf42 ezAnO1rgy6ceS0CJx+h/MnlYbQHU7kf60UhPS0UpwsAbkJK3DfLi4hGawNpmDc1lL6BJ 0IU6nHt0nOUNLmBVdXLtQ0/cAiMQ8ZWZyLgdRkNNNGc7h56z4/K+fpRnAs1R9/JJWb3p ZRLE3xvpDsryTTwd9Qic2h/T1J+fyzfk+c9qjAv2MAVeoHimlfR5jLVSZHhpx+eqRNgy ylNPiDvIC4ybfWlSBcJb5KYPu0NEJa87vOtmEaAKI6zntj+0t89dxB1lnNb1RDOmZx0D W/7Q== X-Gm-Message-State: AOJu0Ywk+ikOft7L5WwE5iakUMR0xUgcGwL1mO7m+P0mYUIbnhxSRzbl EWoQmC+v62NIXvtj28jjGxT7kp4aIXdqtGD3f++TkwGNqYslZibZ X-Google-Smtp-Source: AGHT+IEkLscJrDnGjG4fS+kY17iTgn8MweJHN+gXEBiNK8NJcxl9IqEhDzYe49iEcklP4q+N3gyqgA== X-Received: by 2002:a17:903:2a8b:b0:1d9:f62b:237b with SMTP id lv11-20020a1709032a8b00b001d9f62b237bmr6627981plb.39.1707700032457; Sun, 11 Feb 2024 17:07:12 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXskVnhjx5V1IVmwUT/iu4MbWTuGfyiZJWUpM4fmeoRYSOLPLdr24UWs4S2ruLlRN5YMNahgFsu+7RKFsXAqk6Qc6zPH50= Original-Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id kp15-20020a170903280f00b001d7726c4a40sm4827219plb.277.2024.02.11.17.07.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Feb 2024 17:07:11 -0800 (PST) In-Reply-To: <86cyt2st5g.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.700.6) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279879 Archived-At: > On Feb 11, 2024, at 11:22 AM, Eli Zaretskii wrote: >=20 >> From: Juri Linkov >> Cc: casouri@gmail.com, 68824@debbugs.gnu.org >> Date: Sun, 11 Feb 2024 19:34:51 +0200 >>=20 >>>>>> The problem is that the Info node in the ELisp manual would be = too small. >>>>>> I have no idea what to write in that node more than 10 lines from = the >>>>>> docstring of 'outline-search-function'. >>>>>=20 >>>>> Why does it have to be a separate node? Why cannot we have a >>>>> paragraph or two about this in "Tree-sitter Major Modes", for = example, >>>>> or in "Minor Modes"? >>>>=20 >>>> 'outline-search-function' is an internal detail of implementation >>>> for 'treesit-outline-predicate'. Here is the relevant part from = the >>>> previous patch that shows there is no place for = 'outline-search-function: >>>=20 >>> Then maybe just move the text about outline-search-function to the >>> place where you describe treesit-outline-predicate? >>=20 >> 'outline-search-function' is unsuitable for "Tree-sitter Major = Modes". >=20 > All of this thread clearly indicates otherwise. The real problem is probably that outline-minor-mode=E2=80=99s api = wasn=E2=80=99t described in the Elisp manual (Imenu, OTOH, has a node in = Elisp manual). I think we can create a node for outline in (elisp)Modes = (that=E2=80=99s where the node for Imenu is). We can start out with only = outline-search-function in there, and over time populate it with = outline-level, outline-regexp, etc. If in the future we add language-agnostic features similar to outline = and imenu, which needs major mode integration, (elisp)Modes would be a = good place to document them. Yuan=