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: Sat, 02 Oct 2021 02:30:08 +0100 Message-ID: <8735pk5i3j.fsf@gmail.com> References: <25d8d72022b571db5291@heytings.org> <87h7e2xsl5.fsf@gmail.com> <25d8d72022e1ea7ed022@heytings.org> <87fstl7lzw.fsf@web.de> <87a6jt7ilx.fsf@web.de> <87fstlzlaq.fsf@gmail.com> <20211001070242.GC16352@tuxteam.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="9264"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: tomas@tuxteam.de, emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 02 03:31:45 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 1mWTsP-0002AB-8Y for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Oct 2021 03:31:45 +0200 Original-Received: from localhost ([::1]:49516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWTsN-0003K0-PL for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Oct 2021 21:31:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWTqv-0002St-OV for emacs-devel@gnu.org; Fri, 01 Oct 2021 21:30:13 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:53868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWTqt-0008Mm-7H for emacs-devel@gnu.org; Fri, 01 Oct 2021 21:30:13 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id z2so8402413wmc.3 for ; Fri, 01 Oct 2021 18:30:10 -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=Mq9iJZBRmkJE1Av8K026orN3rgENxPI39RIo+YOL5CQ=; b=nyfGHpfYKp+8uSnhmShF2dtipWTWWiUeEUbLSrdjpHsMlgtO5JNVHX3MuICxIHLf+x Sza88Qslu/T7y7Cb8Uiuq4xJvTbNEda878/AWYXTsMwo1KB9GeJnW2d9t3+SAbSMXI4d nYsfWZLowP3s/LfpUxf9uDmURVN2EtZli5U98P3PZy1g2eXRdZemxcaqaXzbziKOOrJZ Zg/szgZ+Pi7fUC+XJoCi0yasw3J91BuXJSzLRLC3pkSaGDH5a/Tdx01OY1r2A4KcmG9f r1cvAW3CK9MIE3yn/mK/GsWyv8vAo4Nkh0uMBuYgLNYnkxGLKZnbd56ewUFmi/i5p1UA 43Vg== 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=Mq9iJZBRmkJE1Av8K026orN3rgENxPI39RIo+YOL5CQ=; b=OJPCuIniDwGp8XTopVnSkV9EaObKHEgtgIPvN7KnowRFHK7xDk7LsCHOgu1o6kZQCR zpM/8bCbLiXd23jqk9OfkooDFw3ScYpCttx0OXEfcBMP/Bx5NUypJExdd20oyCBRay6F WMspxPXJrYTeP5ZAmwKy3OutS/9Bc3AzWrZU9sRiN9o3EWWxRml7c2Oa9+K/+rpQTsFr Y5HWI3SbSBIxfY2eI+1hZLhOqvXnBbJmfAnOrW3ItAOESeJV7SRmFruchO/JbCunLzeY kYotvj9ZQfcHt5HBxWk4B5Wv/YhNHE1/wEpwNbhBe0JAS9FRG3Vpcggo9ZeLULkN8+uz 8Hkw== X-Gm-Message-State: AOAM531+Z8wZyhpX3wdOp0+N5MDUL5ez5UNFcrOhS9JDnHQ68Saoh1Yv gi25z2lSXq6mrGk4dDV5QV19vgU2XiU= X-Google-Smtp-Source: ABdhPJzkyBwayOF64fhUwqPOh0PuLmNeTTF1aeXaycfMJP71pAu3CpH4NhHg+XOeSasLfw82Op/HWg== X-Received: by 2002:a05:600c:896:: with SMTP id l22mr7428590wmp.173.1633138209170; Fri, 01 Oct 2021 18:30:09 -0700 (PDT) Original-Received: from krug ([87.196.156.235]) by smtp.gmail.com with ESMTPSA id v191sm7465940wme.36.2021.10.01.18.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 18:30:08 -0700 (PDT) In-Reply-To: (Dmitry Gutov's message of "Sat, 2 Oct 2021 04:05:21 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x335.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:276034 Archived-At: Dmitry Gutov writes: > On 01.10.2021 19:05, Jo=C3=A3o T=C3=A1vora wrote: > Go wasn't designed around Grep, perhaps. But you made a high-level > statement, and I make a high-level rebuke. Actually no. Since you bring it up, I wrote: >..> Language design never has been held back by the particular >..> assumptions of a search tool, popular and ubiquitous as it may be. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I really did mean Grep, which is even more obvious from the context.. _You_ made up another, different, statement about "usability" and rebuked that. So you self-rebuked, or something of the sort. But I agree with your point, in part, nonetheless. > Or make it mandatory, thus making it possible to use the approach to > searching I've described, and more or less guarantee it working on > third-party code as well. We could, but it's too soon for that. Bear in mind, one thing is the Emacs repo, another thing is what you wish to do with the language. And a warning would more than suitably protect the former (once we decide what needs to be protected and from what). For the latter, removing a feature that works fine is almost immoral IMO. You may as well forbid small prefixes alltogether, or heretic symbol names, or anaphoric macros. Rather, I think we must understand what the grep-inclined want to do. For example it might make sense to enforce some rules for external symbols (the ones that one commonly searches for across files) and others for internal symbols. >>>> But >>>> possible, yes. Would you like to work on that `thing-at-pt.el` front? >>> >>> thing-at-pt? I'm not sure which particular task you are referring to. >> thingatpt.el, sorry. The library used by other Elisp programs when >> they >> want to pick some text from the buffer, at point, that represents a symb= ol, >> a string, a list. We could have some kind of "symbol-prefix" "symbol-su= ffix" >> or "symbol-part" for eventually telling grep to go search only for that = part. > > I think you're rather looking at altering what > > (get 'emacs-lisp-mode 'find-tag-default-function) > > returns. What does that do? Returns nil here. I'd like the approach to work with Leo Liu's ack.el, for example, which is the particular 'grep' interface I use. It uses 'thingatpt'. >>>> That's not the approach I was thinking of, but I hope to present a wor= king >>>> prototype soon, which is a better way to present ideas. >>> Looking forward to it. >> Just realized the default xref-backend-references uses semantic and >> ede... > Uses a certain minor part of Semantic and doesn't use EDE. I wasn't criticizing btw. Wouldn't be a problem if it used even a big part. Jo=C3=A3o