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: Wed, 06 Oct 2021 12:28:00 +0100 Message-ID: <87zgrmv1dr.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> <87sfxgx09x.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="20551"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: Phil Sainty , Alan Mackenzie , Eli Zaretskii , Richard Stallman , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 06 13:31:28 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 1mY58w-00058P-9T for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Oct 2021 13:31:26 +0200 Original-Received: from localhost ([::1]:59696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mY58v-0002Mk-3F for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Oct 2021 07:31:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mY55f-0008O9-Qe for emacs-devel@gnu.org; Wed, 06 Oct 2021 07:28:03 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:43938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mY55e-0001Y1-3O; Wed, 06 Oct 2021 07:28:03 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id r7so7752006wrc.10; Wed, 06 Oct 2021 04:28:00 -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=Cj5IiIKcExo/HEzUtox6Mm2yKeLG9CZ9XhJEKIX1FZY=; b=aPrdEZGAQml2arqcIHTCkKE/wzEiBw/6dFqt6UJ8T9pXEZG5mL2hybj4zPrQ82SPtT SV5e/4qjaSWUBsCEhjXdrcid7gTZP0JBY0B/hfI8dA7TsQf+HoaLjpdn+gOlQZS++wJy tdHgHxGzduWNmdaJUv8+kwPDpg03iOnzMeS4ZmmmjLL8/XfuzfrfL6NRsqfOm57a4IXA 1oKNOXxZ47hliRnZY64OdZThmZvqIbAniFmnlnWpc/PkpMt6ZepNHG8hGDqYCJDSEn81 fwiCl0ZnWFXrkZ/E9kwdBFU9Rk7/m3P1YVHvMbvApDKJyeFR7WbZw1gwuewAmtj7BT0U 1lqA== 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=Cj5IiIKcExo/HEzUtox6Mm2yKeLG9CZ9XhJEKIX1FZY=; b=r4fHoF5JEslXlTpW5sEY9qNmU3fmvWPaLsuYsjG5V0Z6+ICEjTFqWXPL5xfNJz1Q8T /WPO45pfJRx584gRfvFNIwjwY6pSImSyhRoXKwAE3S9I5pIY1fcvQAew7fSRLIYhIInH WxKWFz/hIZYm7YLYSJaM0v/mshNANLqM3dBadeC0+OfPFFTKU7GftqQTPmbXCGykp/OX iUeXGfT7zK1VI3R7p34BnRH82rBtrDDHcUGkjC+pJHIYT0U5MwbMhx2TxbZPYOC75LGC Gmv7purgRL6++2xQpzM5bUXavOHghwIxQIfBb05ak1aj/WYwvtZrdr5kO+yo+VnFLhZK WRpQ== X-Gm-Message-State: AOAM530/VSvrtF2IFiEhaThEiH0ALPDuC5oMWTaC50vFnhvziIe0Lowr QQVs/VgvmkeAO61gkyeveGKdtO2XChU= X-Google-Smtp-Source: ABdhPJwU46qHnGTKylQVJn5xp/q6nf1zn9oJkrXC1+U0T3SDNzhMm2RSEeGTGqzDbnLPZMHVqpXLbQ== X-Received: by 2002:a05:600c:489a:: with SMTP id j26mr9229942wmp.111.1633519679488; Wed, 06 Oct 2021 04:27:59 -0700 (PDT) Original-Received: from krug ([87.196.156.235]) by smtp.gmail.com with ESMTPSA id y15sm14003548wrp.44.2021.10.06.04.27.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 04:27:59 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 05 Oct 2021 18:15:15 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x430.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.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:276421 Archived-At: Stefan Monnier writes: On Tue, Oct 5, 2021 at 11:16 PM Stefan Monnier w= rote: > > > It would for me. =C2=A0I'd have to keep in mind exactly where I'm invok= ing help > > commands from. =C2=A0I've never done that. > > Yet, I think it's very natural. =C2=A0When you do `C-x o` the current sym= bol > under point is used as a default choice, so it makes sense that it would > obey the rules that apply to the buffer from which it was invoked. I don't think it's natural at all. A most common case of me is doing a C-h f from within the *Help* buffer itself, to find another related function. Should I keep track of where all the C-h f chains started to use those shorthands in those C-h f searches? That's madness, at least for me. To your example, you'll notice that `C-x o` on a shorthand under point works. The shorthand is immediately read into the symbol and the symbol's full name shows in the default. As I think you understand, a shorthand is _not_ a symbol, but it's read into a symbol. So the listing of symbols is unaffected: it remains a listing of symbols, coming from the only source of symbols, obarray. (As Drew noted elsewhere, you can have obarray store symbols for other purposes, and that's fine, but the symbols you use in Elisp programs all live in the global obarray). > That's already the case for variable names when it comes to printing > their (buffer-local) value, of course. Yes, but the "variableness" is a property of a symbol. I can find the symbol 'foo' in any variable listing, from any buffer. Eventually the description eventually shows me that it doesn't have the value I expected it to in that buffer, but it doesn't hide the symbol from me depending on where I invoked it from. > More importantly, I think conflicts will be quite rare, so you could > decide to not use this functionality and you'd likely not be > significantly affected. I've pushed a patch for bug#50959 that implements Eli's suggestion using completion styles. The specific original request of that bug is fixed. I've also experimented with actually listing shorthands in the symbols listings and it's also possible (if a bit more tricky). If you select one of them, the shorthand is interned to the symbol and things just work. I wouldn't _like_ to see them there, it would confuse me a lot to see them sometimes and not others. So at least a knob to turn them off would be needed. Jo=C3=A3o T=C3=A1vora