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: Tue, 28 Sep 2021 19:23:03 +0000 Message-ID: <9ecf597461945bf5f13c@heytings.org> References: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> <87ee99dv34.fsf@gmail.com> <07cf50ddddb5a9556aa94201a7ac88c9@webmail.orcon.net.nz> <13419e1a-d257-2a94-baaa-dcb555ec8619@yandex.ru> <87tui4d8vu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4674"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Phil Sainty , emacs-devel@gnu.org, Dmitry Gutov 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 Tue Sep 28 21:24:55 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 1mVIik-0000yF-6L for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 21:24:54 +0200 Original-Received: from localhost ([::1]:39248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVIij-0006eG-0d for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Sep 2021 15:24:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVIh5-0004X8-Du for emacs-devel@gnu.org; Tue, 28 Sep 2021 15:23:13 -0400 Original-Received: from heytings.org ([95.142.160.155]:55884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVIh0-0002di-72 for emacs-devel@gnu.org; Tue, 28 Sep 2021 15:23:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1632856983; bh=nM3TNhmQuxlClHkpduNPFfSBnRm32C5VlMC9Bh5iRJQ=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=DM1CBPtSJfKTLt1waTzjTvVEdbb3b88GDxCBTvybX8ZIMyHA9EHPOLVX5P7EcAfil M6SqnfmSxUgisAiCbAc1YABt6KeR6ZxC6RBc+8CSOWfi1+kl/oTb0/6DUaMiHJitCk Ngt/3g813q6u5krWp4roYaFOv7C4tCHC5U/WtvcI/PV/m/p3WBBmqCpcfOSH2hsAP9 amVbXDMYivB8JuRkYWSU1IzMAwPQt3MusVwVG7w3saJa6XB01bUGczvFy/1taBrDk1 RUcidDphjYhUSxS+jEkjlHFpBmcdjz+euN27kvnm9dKg/l+r2+fGrpZWpnJht6345f 9HswAjFI6DW6w== In-Reply-To: <87tui4d8vu.fsf@gmail.com> 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:275732 Archived-At: >> Perhaps we could alleviate this by requiring that shorthands end with a >> particular character (like '/' or ':'), so that if you see it in a >> name, it's probably a shorthand. > > I think that's a dreadful idea. > How so? The purpose is only to provide an unambiguous textual clue that the symbol will be transformed by the Lisp reader into another symbol. With your examples (in the manual), the author or user of some-nice-string-utils.el would use ;; elisp-shorthands: (("snu" . "some-nice-string-utils-")) (without the final dash) in its local variables, and the chosen symbol (after thinking a bit more about this, I think "::" which was suggested earlier is better than "@") between snu and the function/variable names throughout the file. That would also make the task of standard tools like tags or grep easier. > > If however, you substritute "requiring shorthands to end" with "visually > annotating" shorthands, such as with font-lock, for example > So in the end we would have something that very much resembles nameless.el (a prefix defined in local variables, and using font lock to "visually annotate" that prefix) without its benefits (not breaking any of the standard tools and allowing anyone to choose whether and how they want to use that feature)?