From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov 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, 2 Oct 2021 04:05:21 +0300 Message-ID: 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; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18173"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: tomas@tuxteam.de, emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 02 03:06:43 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 1mWTUB-0004XW-1m for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Oct 2021 03:06:43 +0200 Original-Received: from localhost ([::1]:41920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWTU8-0005N4-VU for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Oct 2021 21:06:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWTSy-0004VL-H9 for emacs-devel@gnu.org; Fri, 01 Oct 2021 21:05:28 -0400 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:47003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWTSw-0007En-EZ for emacs-devel@gnu.org; Fri, 01 Oct 2021 21:05:28 -0400 Original-Received: by mail-lf1-x131.google.com with SMTP id z24so45161917lfu.13 for ; Fri, 01 Oct 2021 18:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Fya7F4Kieqq6OCOun0YOob/VKpXRZFhzjYgkIKz3Hdk=; b=gQzMlxH3sqedg0Q6igjHr+QW1btpkzQ5YwYJBVJ8X3iVtpldrN24NGIHozQ4Kmgcrb B5PLGEll86IlVhaPC2MWKD0BzA25Rstuae8pNdFoh43CGE6Fns+PEzdOhRQgzEuJU8F5 Rv46DAY0e4VmTeWQhjuCZO1qTf/TH/8rDbnBcKNxnBKHVS79XyVnWCTSuapwdKuniVAq y5zNacU/P6jEDN4t6GzUeL0fWXVSdxSraw0IU5nldyZ8FgWcOlt+1orFE80/dlONxgC7 wFvaq7sPussqThSFQF33tjLNshk8aqO7Xc2QSZX53fqizgkSWueUwgWg4I2t2cb7Ansk 6tRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Fya7F4Kieqq6OCOun0YOob/VKpXRZFhzjYgkIKz3Hdk=; b=SwfboeJFdANrQzRTxef5pOvdF0X+Dh9EVt9Hf/hMFTBON2rwtVule7cR92lY7OwOD9 /60x8BfJ5ksrAfWkncPc4jPOmlW2au8DoA6LOXCJGCJTMLVEXDEp8SZv4uscyvgVzqLR r+8Ve7fnqruIIy/pF+Vvoic2PbVgqUAbFakS1RdURYpVyIOhYqU5ZiNDOdfPgyZPMnzY F0ZvFCIUCE3Y5SGvP5UExkMjPHKw7+GtcyaOMR1Jyu4NUEOw07eRX5wJogeZCshloQa7 8lQqAuPwv6y4xPgzzBe6c2pSLa5kT15ki4DhEVSUBHXKRDsM5tKwBkv2qrkxe0521xGH s6hQ== X-Gm-Message-State: AOAM533aaF6YNl4tWqmeSgNfJEHwWkdkebl4JBWYcIzOmJuMsO35eSjr fcwdclldheXZtfeBjmVMJS5ph2Sx0R4= X-Google-Smtp-Source: ABdhPJx0dgF/Gj03ZtSTXVTackL9ZWiuin/Mk9kVz/albg+JtoBl3QtZr285PF5+YWGv1Md48gEPIg== X-Received: by 2002:a2e:b702:: with SMTP id j2mr792119ljo.6.1633136723325; Fri, 01 Oct 2021 18:05:23 -0700 (PDT) Original-Received: from [192.168.1.113] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id bd7sm814310ljb.20.2021.10.01.18.05.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Oct 2021 18:05:22 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=raaahh@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-1.127, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:276031 Archived-At: On 01.10.2021 19:05, João Távora wrote: > On Fri, Oct 1, 2021 at 4:48 PM Dmitry Gutov wrote: >> >> On 01.10.2021 17:40, João Távora wrote: >> >>>> Certain language designers intentionally limit the language's power due >>>> to usability considerations, keeping in mind their audience. >>> >>> What languages, what evidence for this? Anyway, many more limit the power >>> due to performance considerations. Counts as "usability"? I guess. IME >>> language audiences that are interested in performance usually don't >>> care so much >>> about ergonomics and vice versa. >> >> Go would be one example. The reasoning lies largely in the field of >> usability. Their understanding of it, at least. > > Yes Go, I see what you mean. But it's been growing with new features, > like generic functions. And has namespaces. They didn't design it > around grep, that's for sure. That's what I meant. Growing very slowly. Go wasn't designed around Grep, perhaps. But you made a high-level statement, and I make a high-level rebuke. >> Taking the example from the manual, the clients would be able to write >> ;; elisp-shorthands: (("snu" . "some-nice-string-utils")) >> but not >> ;; elisp-shorthands: (("sn" . "some-nice")) >> and that doesn't sound like a terrible limitation. > > I agree. We could make it a recommendation, i.e. issue a (stern) > warning when we > detect this. Or not allow shorthands of other forms in Emacs code, ELPA, etc. 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. >>> 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 symbol, > a string, a list. We could have some kind of "symbol-prefix" "symbol-suffix" > 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. >>> That's not the approach I was thinking of, but I hope to present a working >>> 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.