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: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master) Date: Mon, 04 Oct 2021 16:44:26 +0100 Message-ID: <87sfxgx09x.fsf@gmail.com> References: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> <831r59kyhf.fsf@gnu.org> <834ka4k15m.fsf@gnu.org> <83y27gijmz.fsf@gnu.org> <8335pmgnjy.fsf@gnu.org> <604da2cb10ac61f2b8b89a02c89056be@webmail.orcon.net.nz> <83a6jtff87.fsf@gnu.org> <5ac7a31cf2959c31c262a3377c736a5a@webmail.orcon.net.nz> <83ilygew7p.fsf@gnu.org> <83fstjdiwl.fsf@gnu.org> <871r534s2o.fsf@gmail.com> 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="8843"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: psainty@orcon.net.nz, acm@muc.de, eliz@gnu.org, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 04 17:46:22 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 1mXQAY-00026u-0S for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Oct 2021 17:46:22 +0200 Original-Received: from localhost ([::1]:51872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXQAW-0000OF-TC for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Oct 2021 11:46:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXQ8x-0007di-Sd for emacs-devel@gnu.org; Mon, 04 Oct 2021 11:44:43 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:36855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXQ8j-0007kI-EN; Mon, 04 Oct 2021 11:44:43 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id l18-20020a05600c4f1200b002f8cf606262so20048886wmq.1; Mon, 04 Oct 2021 08:44:27 -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=Ggj4c9TeL/0Hrtd3sUmp8xbS1eV+2wTzehvxVQtxGNw=; b=EtbncURh4rH/LlTHYYRXwJYMK/B2Y7bS+qmo/W5BDnHPvgZLoMKX8g6IY7VzK5qCB2 iecBeVfa4F+PYRbxqBjsmPPH/FCLHoIhSxWh0jUeeXduhWtT0ZdiK6jVkAMxuAviF8Ur +JRpkojgY0m1SHlLGrvTBgt4s25kdEyKcCh9BOmx2PGAYor2QwTg8lPVaR2KVnjRE0xJ eq3O7iVvVC2RHODOR/URfG50MGj70ZNi2OqPAU52vxqpjxwpwqE1uV5ZOj507bQQkmyo z7lWR9r4T7CJoIKo4cXwepyMES3HWwpk1gORYGaiBNSCkDYXhHZD+39rVyb78evfhNOm sTqQ== 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=Ggj4c9TeL/0Hrtd3sUmp8xbS1eV+2wTzehvxVQtxGNw=; b=YQpw6SskSWT1VdZEO5o3RfHe2cTT5jpYpZP8m7czyEM86XCoKiEpxdn/rdoE3G3LIo LQhsyDk22QdtyWg6WQuLvqq8RixklMYoDNzZlpRc/Y0s1ld8RRC6NibsSO3ndzr7OE0P ZhCB90qQsvas+S1pedMsbxs1Lei4czSs+HGZ5qErIUAbyzWoszAMHfbOHZqtQQLpHNg9 zNpEmQLxhrRrCz278qA8eCMx2M7oP3FCUDK6hjsiB7uYJRTM7sAfl46to9ia11rPHrGL JZAlF7tb8d1Si5L3AKO08rJpIx2J/G8I7t2zKEpesPqibvQ4Bg/wNM+ftE4IwevL+HE+ 8qzA== X-Gm-Message-State: AOAM530FLGKKwQM4tkCLmRxTfiCEMkCYUNUi/fTf7pjdK5Q4r0BPJiSI SBpcqohTTJo1dfN/zoP4ax95F2MxBUY= X-Google-Smtp-Source: ABdhPJwejq0gGiItcQeS+Lc98q3RvmK29eBRxTEngixg5DUHq7C/wadk+qjEZsIjyHZgScJ/baZ2LA== X-Received: by 2002:a05:600c:4f4e:: with SMTP id m14mr19493737wmq.5.1633362266169; Mon, 04 Oct 2021 08:44:26 -0700 (PDT) Original-Received: from krug ([87.196.156.235]) by smtp.gmail.com with ESMTPSA id t15sm5597655wru.6.2021.10.04.08.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 08:44:25 -0700 (PDT) In-Reply-To: (Richard Stallman's message of "Sun, 03 Oct 2021 20:16:03 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x334.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, 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:276218 Archived-At: Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > > The name known to Emacs is "string-library-foo" (or whatever). > > > > > > The user types "C-h o s-foo RET" and Emacs says "no match". > > If the user switches to a buffer which contains a Lisp program that > requires s, then types C-h o s-foo RET, or C-h f s-foo RET, I think it > would make sense for it to find s-foo. The system is behaving as designed. In the sequence C-h o s-foo, the last 5 characters typed are not the name of a symbol, they are the name of a shorthand (a shorthand is _not_ a symbol) that you are seeing (in the sense of "with your eyes"") in some buffer. Note this: * The display of that shorthand is visually different from the display of any other symbol-referring form. In particular the prefix and the suffix are font-locked with different colors. Thus, there is little reason to be mistaken that 's-foo' is the full name of a symbol. There is even less reason to be mistaken than when using using 'cl-letf' and 'cl-flet', or level 'let' which create local definitions. * If, as you write, you have switched to the buffer where the shorthand 's-foo' occurs and you type the beginning of the C-h o sequence when point is ON that shorthand, the Lisp reader will follow the shorthand to the `string-library-foo' symbol and offer to display help on that. * The C-h o and similar commands operate on symbols and are global. They display the same list of symbols irrespective of the locus of there invocation. This makes sense, because Emacs operates with a single global collection of symbols. Shorthands haven't changed that, and this was never the intention. * C-h o and similar commands _could_ theoretically be changed to complement that list of symbols with the list of shorthands to symbols of the buffer. That would be a non-trivial effort and would bring grave confusion. That's because, as you have well written elsewhere, the Lisp reader follows 's-foo' to 'string-library-foo' on this buffer but may follow it to 'system-library-foo' in another buffer. That's what makes Shorthands a namespacing system (contrary to what some mistaken minds are keen on insiting): there is more than one way to refer to the same thing _depending_ on context and the _same name_ may refer to different tihngs, depending on context. The buffer is the context here. * So, if we follow our first instincts (they were my first instincts, too!), it means that the exact same Help input in two different situations could bring about different results. Again, it is theoretically possible to do as you suggest, but the effort required isn't trivial and, more importantly, the confusion generated is much, much greater. Jo=C3=A3o