From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)) Date: Fri, 01 Oct 2021 00:38:21 +0100 Message-ID: <87fstlzlaq.fsf@gmail.com> References: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> <874ka5gsqa.fsf@gnus.org> <25d8d72022b571db5291@heytings.org> <87h7e2xsl5.fsf@gmail.com> <25d8d72022e1ea7ed022@heytings.org> <87fstl7lzw.fsf@web.de> <87a6jt7ilx.fsf@web.de> 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="33089"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 01 01:41:49 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 1mW5gT-0008TQ-FH for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Oct 2021 01:41:49 +0200 Original-Received: from localhost ([::1]:47034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mW5gR-0001MB-K3 for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Sep 2021 19:41:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mW5dC-0000DX-6a for emacs-devel@gnu.org; Thu, 30 Sep 2021 19:38:26 -0400 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:36439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mW5d9-0000SY-Ba for emacs-devel@gnu.org; Thu, 30 Sep 2021 19:38:25 -0400 Original-Received: by mail-wm1-x32e.google.com with SMTP id l18-20020a05600c4f1200b002f8cf606262so9747853wmq.1 for ; Thu, 30 Sep 2021 16:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=T8sXRULrOFsljkVKttsifIoe+6GE6DVRkQC/+gvBM3E=; b=cetPwWPeD6YvRecIEcpCLllvZjQgXL2kXWe2+YER9x7h7G9t16qET8bL5RsAx1oCOX EIRgkW3IdR7X9zJoELaG5XSSP/COCvYnTXCWaOqQQ77aDA0TDWfO2tq8WySgnVaDMz2g PsIKGzpTWHkg2Ofb8g8we6lskLNvQz72IpUCPH2z+YcDOsK0Q+R/n6v09EYdvFbRuYIG 4Qy/HmiecL2voG6k07RofXl9HAVDsUgwpgTTDEYUsiUNTv87pEeqftez3W1wJrYUk22A 2qm3X303II4QceZqY6Q5CHxQ/Uowd3w22YvFuN0ZnlO7WR2GZb/mjnzHhlM9jVUhkSXR 94lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=T8sXRULrOFsljkVKttsifIoe+6GE6DVRkQC/+gvBM3E=; b=RHYStIOU5AVTcHAep4c0zJ6Lf1CdT31Ddv8/t3ghMjF11e0fxZ8eTnEXDzw92BF4Lr be1DMmHsOsDmGHgUp0fQvrWibTXLi3NrDH0j7p6reLmrA4x8rIYZBGuaB2LPUXx45oO+ I9x1NjTeWH31Zx4elNuWsJHTZ2Tp+b8Lia4rfVcHPH55Fn+44jQcE2zXW1vfNx1CU0Js SjXEbjp19o34LpdFrvLPlPK5D32egO1hCFgxmQNOH3zmQHsb333VJjOcgD4usZ7zda3U fqmxlcO1c28TnFDgpO7QWXBvbNk+X2QbTcbAIbEtoSACyA4DTRj1CMGZRVLq4SOfcuF2 xamQ== X-Gm-Message-State: AOAM532M0ZfYmLSxErdO4r4qoclSDpWRx0iw6EKKbYgU/cWC8vRYhV3x AXJaSMjZYh35Yk7QAeHPt1lm1Tl2ZCs= X-Google-Smtp-Source: ABdhPJyK9DEp3rpSYz+qF/w+wmH0LWoQDHs7u5yWptdi/5K16A5OA9hH0cFkz3zxU/QmWbws4wfQ8g== X-Received: by 2002:a7b:c453:: with SMTP id l19mr1481447wmi.7.1633045101352; Thu, 30 Sep 2021 16:38:21 -0700 (PDT) Original-Received: from krug (87-196-156-235.net.novis.pt. [87.196.156.235]) by smtp.gmail.com with ESMTPSA id i92sm4141955wri.28.2021.09.30.16.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 16:38:20 -0700 (PDT) In-Reply-To: <87a6jt7ilx.fsf@web.de> (Michael Heerdegen's message of "Fri, 01 Oct 2021 01:23:54 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x32e.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:275937 Archived-At: Michael Heerdegen writes: > Jo=C3=A3o T=C3=A1vora writes: > Actually, el-search searches expressions. The search "pattern" is a > description (predicate) for expressions, and it searches for matching > expressions. I made it so that search patterns are pcase patterns - > while this fits perfectly, it's also the most deterring aspect for most > people :-P But of course, but it makes total sense that a Lisp-aware searcher would be much more powerful like you have designed it. Much as I applaud that, I think the grep crowd needs to be appeased with something with a similar interface, though. The passion I'm seeing in some messages seems to be about knowing where a particular symbol is referenced (understanding shorthands, of course). > Symbols are compared with `eq', so I think the answer to the question of > fast symbol comparison is "yes". One surprisingly time consuming part > in simple cases is setting up buffers (to support read and sexp-based > scanning). I'm going to vapourwarely say that can be optimized if you pass a function as the STREAM argument to `read`. Maybe? You'll always need a character buffer somehow, but perhaps you don't need to setup a big one expensively. Also what do you mean scanning, you mean `parse-partial-sexp` aka syntax-ppss scanning? That's much more expensive than `read` and used for font-lock, C-M- navgation and such. A more basic, faster searcher wouldn't need that. > IIRC, "elisp-refs" (Melpa) copied the basic approach and created > something more lightweight but easier to use (a bit like xref I think, I > don't use xref - not sure). I think adding shorthand support to that > package would also be trivial. Interesting, and closeness to xref.el is indeed very useful. Jo=C3=A3o