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#44418: 28.0.50; Spliced variable not matched as symbol in isearch Date: Sat, 8 Jul 2023 16:48:57 -0700 Message-ID: <9289047B-5BD7-493A-8A89-E2B0B38A8364@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) 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="18287"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Basil Contovounesios , 44418@debbugs.gnu.org, Lars Ingebrigtsen , monnier@iro.umontreal.ca To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 09 01:50:18 2023 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 1qIHgv-0004bf-PJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Jul 2023 01:50:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIHgh-000276-Qd; Sat, 08 Jul 2023 19:50:03 -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 1qIHgg-00026y-HZ for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 19:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIHgg-0006ps-8g for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 19:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qIHgf-0003om-Ln for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 19:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jul 2023 23:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44418 X-GNU-PR-Package: emacs Original-Received: via spool by 44418-submit@debbugs.gnu.org id=B44418.168886015814610 (code B ref 44418); Sat, 08 Jul 2023 23:50:01 +0000 Original-Received: (at 44418) by debbugs.gnu.org; 8 Jul 2023 23:49:18 +0000 Original-Received: from localhost ([127.0.0.1]:45346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qIHfy-0003na-9n for submit@debbugs.gnu.org; Sat, 08 Jul 2023 19:49:18 -0400 Original-Received: from mail-pf1-f179.google.com ([209.85.210.179]:49585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qIHfv-0003nJ-Ac for 44418@debbugs.gnu.org; Sat, 08 Jul 2023 19:49:16 -0400 Original-Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-666eec46206so2693823b3a.3 for <44418@debbugs.gnu.org>; Sat, 08 Jul 2023 16:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688860149; x=1691452149; 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=U/LTL72J2wyb3sET58R1zambUYBWkc90BQgyvPDfJVk=; b=Fizvv4p7XIfX88bRFmT4UaoOjXaZDpHDrcaVrWy3h+jVhpufuyZortf4YKJ6QeIF7w M+S5i23jSN6A5TkhGM7w9yQr5cKCcDVj7fE40imzaoVrwQhQ7i6DttRCX+RFXR4crcyV Urp8CI+6A8/Uxeciyamz2P2+I+IDaEI3UvTnReH2YqbCZK8rTNIbvYOiJ34+kx86M78c FInk7PqMijOklRu30hp8mBtLS7wX/g1rF6LVBHyceV6g621bW8w9gsaejkND6OSGC0z6 UylsT3VodpwHva8jNDQkTplRlA3sOel5R4xkugeWKrgQXumTfOltGMAHNIzamCT0yVrS NT6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688860149; x=1691452149; 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=U/LTL72J2wyb3sET58R1zambUYBWkc90BQgyvPDfJVk=; b=R3ePMDLvcdgliTWEb3xmXo2YaIOi9BNr2Sn1ZBML+todI0ChOK+BYVYo8Tj3tgdjux rUBToAveku46Im6lHIghM3V7bte3SB3YQB7U32zfPPPU4oL4snvSyVzIUQkIarNnDp6/ nuF6ANK7APwyi+TulYz1pmCvfPNg2Am144UgNxcLEWIsnkuHurjJW0tS4PK0ne5mXoxa NiKMF+6BR6goRRDaxZlOnkfT96YUfYv20no4UIqws8usMYy7mZ+4tBTswPtytz9rSb8r Y3BBGa2FdG/pj6imhe85Hd9KmLEJr0m29qHlTJdrM9h/iTKA1T62JoHSVhhBmsRJAMM4 pA9Q== X-Gm-Message-State: ABy/qLanjnuSt0O2JlPbNXBNZtGu5plC48WGWJqXokJEmmAtGg+obdEr OMELho81nFDu8CkMbaMMx4M= X-Google-Smtp-Source: APBJJlEFy9HI4Q5zO6jsFMx2m2A2VBOu0Lr+P9ISBqJR+487dfAzMXXWlTCIaJSEpDfVhiU0zoztVw== X-Received: by 2002:a05:6a20:1394:b0:122:4a16:dfa4 with SMTP id hn20-20020a056a20139400b001224a16dfa4mr8326385pzc.10.1688860149100; Sat, 08 Jul 2023 16:49:09 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id x7-20020a62fb07000000b006828ee9fa69sm4755191pfm.206.2023.07.08.16.49.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jul 2023 16:49:08 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3731.600.7) 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:264803 Archived-At: > On Jun 24, 2023, at 3:12 AM, Mattias Engdeg=C3=A5rd = wrote: >=20 > 24 juni 2023 kl. 00.39 skrev Yuan Fu : >=20 >> I want to point out that a) this will add complexity and make the = syntax >> harder to read and learn (however minuscule the impact might be); b) = is >> not enough by itself to make isearch symbol work with capture names: >> whoever write the code must _use_ this syntax; and c) I don=E2=80=99t = think >> isearch symbol itself is popular/important enough to justify the = change. >=20 > Well, you are the treesit maintainer and get to decide, but perhaps I = could try to sway your opinion. First note that the change is very small = with no increase in complexity -- most treesit users would never bother = to learn that there is an alternative @SYMBOL notation in addition to = the standard (@ SYMBOL). >=20 > Furthermore, the @SYMBOL notation is quite un-Lisp-like and alien to = Lisp programmers who definitely tend to make use of symbol search, which = is why this bug (about the ,@ prefix) was so annoying: it not only = prevented us from effectively finding all occurrences of a symbol, but = deprived us of a common way to check that the spelling of name is = correct and corresponds to its definition. A pity if we now introduce = the same kind of bug again, unforced. >=20 > I did a quick translation of some treesit patterns in various language = modes from @SYMBOL to (@ SYMBOL) and the result was no less readable. = Try it yourself. >=20 > Your decision to expose treesit queries as Elisp S-expressions was = fortunate, as can be seen by the fact that no Emacs editing mode seems = to use the other (string) syntax, and the modes make frequent use of = backquote forms to interpolate Lisp values into patterns. Sorry for taking so long, I never decided against other people for = important things in Emacs, and I certainly don=E2=80=99t want to make a = wrong decision and regret it later, so I struggled a bit and kept = procrastinating =F0=9F=98=83 I agree that it=E2=80=99s easy to figure out what does the detached @ = syntax mean. I mainly just don=E2=80=99t like having two ways to do the = same thing. Since I don=E2=80=99t use search symbol myself, I can=E2=80=99t grasp = the importance of it. You apparently care about it enough to go this = far, and I=E2=80=99m willing to take your word for it. You mentioned sexp queries, which reminded me that using the detached = syntax would allow people to interpolate capture names with quasi = quotes. That=E2=80=99s a plus for the detached syntax. Ultimately I=E2=80=99m still on the fence for this. But if you still = want to add it, please go ahead :-) Yuan=