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 short defense of shorthands.el (but CL packages are still better) Date: Sat, 05 Nov 2022 01:09:06 +0000 Message-ID: <87leoqfbrh.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34682"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 05 02:08:46 2022 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 1or7fy-0008sC-7S for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Nov 2022 02:08:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1or7fE-0007Fs-9T; Fri, 04 Nov 2022 21:08:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1or7fD-0007Fj-Hh for emacs-devel@gnu.org; Fri, 04 Nov 2022 21:07:59 -0400 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1or7fB-0004yl-IN; Fri, 04 Nov 2022 21:07:59 -0400 Original-Received: by mail-wm1-x32c.google.com with SMTP id v124-20020a1cac82000000b003cf7a4ea2caso6371572wme.5; Fri, 04 Nov 2022 18:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=IWDDG5iyyGhKzIYcZzh9pRFvG3ongyeUPrlagJyiRFE=; b=C4mbGQDiOTiyydK5Wf+i2WPtU0gyVIPlWgvdoJzXDa/kBrkjDwiAgpG9LvJoKXsS/+ 7hr0RnyHE3xWEUiwzAn738PeDv85toCPpWtU2+6sMK3H6nyulOEFA+pM5SOTIR4bpXdy O0q+IfogoAvRhwwtzbaPxF4TFjJPSF7ajyFRgVm28IN6zcBuw3VFL89zXDKJWUvgcsCU m2ZhYkERPod4n+0R10GboHu4zjIQmelF6gbcVf7nhyocOA69dUGuhEPy5YDNTol00hxA 9BrDUXeaILyuUu2jZPSVcH1Ge5UNRJSbiUyABPgubCLkX+U9qqGmM1mEljURAvLL53od 4rzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IWDDG5iyyGhKzIYcZzh9pRFvG3ongyeUPrlagJyiRFE=; b=u9n/InHu0xkx3cyk/85WYopahCtbmi2qvJ/gZdhXHAlKrJygC8OcjCO3EZ5m7+Inm0 DIfc6/Gg1llyZj0CxfAJgai/x/210+bJYRw2FFvV6MbFsrRUUcOVVZB7EupLGDviPIs0 tpi84hPCqKqMwuwtrfnUsenvQ8pXCxIJxwr6RR4z9TNItVlDWgsx+B5DyQRoWuKJHnTV A5K1WGMJ/+fFLBDOGpfPCvt2mzbkXdaxxBdiPU2TJo+cldKJS04/yk7+ILsktHR1zK8C UuJ7ckEXBCIX27crOWvrlY88LybX99za19CfsvHerCJulmIVdw0H6rA05XNiY1+zPyBK fygQ== X-Gm-Message-State: ACrzQf36fY3XIyI+qNMGPZMBI9/swk5BG4G/RvnA6miuRc8IeYDDk5dr +I+uB4hfZr8cr8vkv5/6b9UlxknlKyk= X-Google-Smtp-Source: AMsMyM66rGqLeFuaRnA0n9GjmKcGVHJZPCC/s4T4yaGx/lLRARYyQTBtdyydQ/pV2erVoidsXyzAOw== X-Received: by 2002:a05:600c:34ca:b0:3cf:81e8:20e0 with SMTP id d10-20020a05600c34ca00b003cf81e820e0mr14502615wmq.47.1667610474966; Fri, 04 Nov 2022 18:07:54 -0700 (PDT) Original-Received: from krug ([87.196.80.161]) by smtp.gmail.com with ESMTPSA id o13-20020a05600c510d00b003cf54b77bfesm4570977wms.28.2022.11.04.18.07.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 18:07:54 -0700 (PDT) In-Reply-To: (Richard Stallman's message of "Thu, 03 Nov 2022 23:28:27 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x32c.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.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299165 Archived-At: Richard Stallman writes: > If that's what files x.el and yummy.el contain, > I don't think anyone will grep for `xenomorph-foo'. > The code in yummy.el actually says `x-foo', so that > is what someone will grep for, and grep will find that in x.el. > So I don't think this case causes any problem with grep. As you know, he underlying interned symbol is xenomorph-foo, and that's the symbol that the at-point documentation system ElDoc shows you in the echo area, and that's what shows up C-h f. But I see what you mean: in this particular example, we're lucky enough that both yummy.el and x.el define the same shorthand. So it wasn't a good example. But we could have a perfectly reasonable z.el that defines: ;; read-symbol-shorthands: (("xeno-" . "xenomorph-")) And here, xeno-foo now means the very same symbol xenomorph-foo. And this "breaks grep". Not literally, of course just in that it undermines the user's ability to use grep to know where in source code the Lisp symbol xenomorph-foo is mentioned. My point is that this is common to all namespacing systems, across every language. Although in different languages and systems we may have different ways to work around the problem.