From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master) Date: Thu, 30 Sep 2021 13:18:28 +0000 Message-ID: <25d8d7202296cdd07290@heytings.org> References: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> <874ka5gsqa.fsf@gnus.org> <25d8d72022b571db5291@heytings.org> <87h7e2xsl5.fsf@gmail.com> <25d8d72022e1ea7ed022@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14398"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?Andr=C3=A9_A=2E_Gomes?= , Phil Sainty , Lars Ingebrigtsen , Richard Stallman , emacs-devel@gnu.org To: =?UTF-8?Q?Jo=C3=A3o_T=C3=A1vora?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 30 15:20:36 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 1mVvzH-0003bZ-TT for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Sep 2021 15:20:35 +0200 Original-Received: from localhost ([::1]:39800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVvzG-0003Uz-SI for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Sep 2021 09:20:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVvxJ-0001MX-Hr for emacs-devel@gnu.org; Thu, 30 Sep 2021 09:18:35 -0400 Original-Received: from heytings.org ([95.142.160.155]:58412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVvxH-0001Un-Af; Thu, 30 Sep 2021 09:18:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1633007909; bh=rTz0Rf8IsB9rIPxeE88CY3OeLJH6916RhxfTeGMujqs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=j/OU1H09XUFZ1o6UzlGtvEwycxkMtw5QgJOUnSpqMGifOmzL7aSBBm+s+JdPfFL/w 2Lq1J3GD2I0Wck30L0FrsoMRRqHeAIwJWetmnItURzty+uaJTVa/nFYhaiEfJ/H4P/ pisVGhFOJ/j2ts9NlVailxs7/7eMNBGmvJ3BNNHif5lT8XDfB6G46NyyvV6dNjRfQb Ank377ktivXrPC/OIYhPhporyaSZmt+WVQakxZLh2SIwlKSKBY3wPnUM/4watPwcZ1 bRWgwUgeR2vvjkm3xkVmQUfzE/bcfAXqeWUAMljfEUJkU6razhPv6nMa+7e4H0J2wT APE0qFTZ43sWA== In-Reply-To: Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org 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, SPF_HELO_PASS=-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:275891 Archived-At: >>> but it's the wrong tool. >> >> And what is/what are the "right" tool(s) for the above use case? > > Tools that understand the symbolic nature of the Lisp family of > languages. For the examplw you have since, Tools that rely on way or the > other really on the 'read' Lisp primitive. > > xref-find-definition does. xref-find-references doesn't, yet, as far as > i know. C-h f is fine, and so is completion-at-point. > Which means that you basically have to load all ELPA packages into your Emacs session to answer a question that was so far trivial to answer (which packages use such-and-such function or refer to this-or-that variable). > > Grep, as you very well note, is already flawed, not only for Lisp, but > for many languages. By "flawed" I mean: it is not suitable for > categorically answering questions e.g. about how functions relate to > each other (callers and callees). > It's not flawed, it's not perfect, like pretty much any other tool (and it has been around long enough that its users are aware of its limits). Even a tool that would be aware of the Lisp read primitive cannot categorically answer that question, for example when function names are created dynamically, or with (apply variable args). > > It fails even on C, for example by the mere existence of comment blocks. > Should comment blocks be outlawed in C? > Of course not. And comment blocks are not a problem AFAICS, visiting the file will clearly show that this is not an actual call. In C it's preprocessing that is a problem. And function pointers.