emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorth


From: João Távora
Subject: Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)
Date: Sat, 02 Oct 2021 11:52:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Phil Sainty <psainty@orcon.net.nz> writes:

> On 2021-10-02 19:45, Eli Zaretskii wrote:
>> There's a huge difference between breaking literal searches for
>> symbols by text-searching tools, and breaking basic Emacs commands
>> because the name the user sees and types is not known to Emacs.
>
> But shorthands does *both* of those things.
>
> The name the user sees is "s-foo".
>
> 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".

That's only when the user types that in the minibuffer and doesn't
associate in any way to the buffer where you set up that particular
shorthand (remember, shorthands aren't global: that's the point).  Much
like if I type 'import foo as bar' in my Python of JavaScript program
and then go search for 'bar' I don't get the results for 'foo'.

But (have you seen the animated gif?)  if you type 'C-h o' with point ON
TOP OF 's-foo', then M-x describe-symbol will be prepolulated with
string-library-foo, and need only type RET.

The same thing with ElDoc, or M-., or C-M-i when used *in the buffer*
that you are looking at.

So in with my suggestion you type half the characters and get the
correct choice.  If however you like to to copy what you see visually
from the buffer to the minibuffer, say, to warm your fingers, then a
visual strategy similar to the "nameless.el" package you have promoted
here can be devised.  You'd never never SEE "s-foo" (though it exists in
the buffer).  I, like others have said, think that is bit chaotic, but
not absurd.  Then you would be able to type C-h s t r i n g - l i b r a
r y - f o o RET

João





reply via email to

[Prev in Thread] Current Thread [Next in Thread]