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.devel Subject: Re: Writing manuals Date: Thu, 19 Aug 2021 08:59:32 -0700 Message-ID: References: <60B2E271-2E91-4906-940E-425A76ED0DCD@gmail.com> <83czqc715e.fsf@gnu.org> <502702DF-70A7-4FCC-93FD-08E984673832@gmail.com> <83tujo56oj.fsf@gnu.org> <83o89v6hsd.fsf@gnu.org> <83eear5vys.fsf@gnu.org> <6EB979D9-EDD7-4F4B-B3CF-8FDC345F6E42@gmail.com> <831r6r53zd.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) 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="21407"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 19 18:02:18 2021 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 1mGkUj-0005NP-Fr for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Aug 2021 18:02:17 +0200 Original-Received: from localhost ([::1]:58516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGkUi-0005gQ-7y for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Aug 2021 12:02:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGkSA-0002zR-0s for emacs-devel@gnu.org; Thu, 19 Aug 2021 11:59:38 -0400 Original-Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:41574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGkS8-000726-B5; Thu, 19 Aug 2021 11:59:37 -0400 Original-Received: by mail-pj1-x102a.google.com with SMTP id fa24-20020a17090af0d8b0290178bfa69d97so5170815pjb.0; Thu, 19 Aug 2021 08:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rIVlHWUpBVZfcEjWNAqoHpXKl+sfT2ZC429bmLKYcnQ=; b=gR8TXcExecN+3N7kKF6IEyt02M/Uh/fCvJnCvSNTeEZjTCjJIKACcpsMhx48+mX7g2 OLXr3uzKxhGgouXcx2w/3GZrf3Z4ttpDgOZ700JEF38Sko1umVihgPKzAuM9Qm7RB1Wc pzzc7SqtWq9aY7psac5SbuDsfpgJX7XdadvK99r0JhhjFxdZM9piJ/jth2/bBMJlnWAe 6aDvWYioAnO5pWwWa6+nhzSfevxYloEklV+h4eqdagOpnleZ34bm9qKOeiVfIyThn2a8 doNNl2W3ugltuUS7IWY821079IAiy+JE1WuGK4IvRiVos/iKv/ZlfA9uqHM0v2V8cpvW j+7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rIVlHWUpBVZfcEjWNAqoHpXKl+sfT2ZC429bmLKYcnQ=; b=nSBIIJhMMQd/mzlOaVjgA2/ymyGTxEmu+3df7lL5T9PjYqKeGba0/peTixUNwughvg Jax5lfYDayWOY85BhNC1oNS/INMtQj7WkB7FQgA32+4oqonIUIz8ElUYy/hQIEUB1qdN Oe9gu0CsEf9v64jHyrcAH36Q4TJQd6Vr6TVdo6Jv3P3/pUIAitkUCf3H0cOoMDD55laA 771kSbbI+A3eLgARpBd72ieiBeXlnZBBeSeLL3jrAXoRCf1wKSXN4iJmnZ9Ardj/Ep0C w7td5a9LwYVifgd7GZkRJnGV9I4BVc9VrR0CHPZVmd0tKQ/GVdArr+8WYnfMEUK7OclO yzMA== X-Gm-Message-State: AOAM531AyXcm/N19C79K5adKa2hav67yl6MdjCoMqA8yZ2y3GX6hhaW8 6eXIQNW4LGIUbdt5vSqIrOvdTthSPac= X-Google-Smtp-Source: ABdhPJzRmMeX74yiwHjg4ap+7hCaH7I6bQCC1mr4+imaK+7dPVpYe7ssfnjQ9iLCBjNTIDm73o96gA== X-Received: by 2002:a17:90b:3718:: with SMTP id mg24mr16225883pjb.158.1629388773701; Thu, 19 Aug 2021 08:59:33 -0700 (PDT) Original-Received: from 2603-8000-d900-871b-58b5-e604-2024-45ab.res6.spectrum.com (2603-8000-d900-871b-58b5-e604-2024-45ab.res6.spectrum.com. [2603:8000:d900:871b:58b5:e604:2024:45ab]) by smtp.gmail.com with ESMTPSA id d22sm4432165pgi.73.2021.08.19.08.59.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Aug 2021 08:59:33 -0700 (PDT) In-Reply-To: <831r6r53zd.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=casouri@gmail.com; helo=mail-pj1-x102a.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, 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.23 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" Xref: news.gmane.io gmane.emacs.devel:272678 Archived-At: > On Aug 18, 2021, at 5:31 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Tue, 17 Aug 2021 20:24:55 -0700 >> Cc: emacs-devel@gnu.org >>=20 >>> No, please don't use TS-specific chapter names. In the text, you = can >>> tell that the functions you describe require the tree-sitter = library, >>> but the chapter and section names should ideally be neutral, so we >>> could later add stuff provided by other libraries, like LSP. >>=20 >> Ok, then can I mention tree-sitter in section titles? The tentative = sections are: >>=20 >> * Language definitions:: Loading tree-sitter language definitions. >> * Using parsers:: Introduction to parsers. >> * Accessing nodes:: Accessing syntax nodes. >> * Pattern matching:: Pattern matching with query patterns. >> * Query syntax:: Introducing pattern matching query = syntax. >> * Multiple languages:: Parse buffers written in multiple = languages. >> * API correspondence:: Correspondence between C API and ELisp = API. >> * Parse a string:: Parse a single string. >>=20 >> They are all tree-sitter specific. >=20 > What's wrong with the section names you show above? Nothing wrong, just that if we want to add manual for other parsing = tools, there could be clashes in title: maybe LSP returns syntax nodes, = too, but =E2=80=9CAccessing nodes=E2=80=9D section is all about = tree-sitter nodes. But we=E2=80=99ll worry about that later, as you = suggested. Another problem I discovered when writing the manual is that, my = explanation of the query syntax is similar to the official documentation = of tree-sitter. Will there by copyright concerns? I=E2=80=99ve written = the section describing query syntax, and I=E2=80=99ll write another = section describing the grammar definition, these two sections will be = similar to their tree-sitter official documentation counterparts, = because they cover exactly the same thing. Perhaps it is best if you can see what I=E2=80=99ve write and compare = that with the official documentation. I (force) pushed the latest code = to GitHub. I put the manual in parsing.texi. The section describing the = query syntax is (elisp)Parsing Program Source > Pattern matching. The = official documentation is at = https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-w= ith-queries Yuan