[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: |
Wed, 06 Oct 2021 12:28:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
On Tue, Oct 5, 2021 at 11:16 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> > It would for me. I'd have to keep in mind exactly where I'm invoking help
> > commands from. I've never done that.
>
> Yet, I think it's very natural. When you do `C-x o` the current symbol
> 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ão Távora
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), (continued)
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Eli Zaretskii, 2021/10/04
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Gregory Heytings, 2021/10/04
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/10/04
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Gregory Heytings, 2021/10/04
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Richard Stallman, 2021/10/05
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/10/06
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Richard Stallman, 2021/10/05
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Richard Stallman, 2021/10/05
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/10/05
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Stefan Monnier, 2021/10/05
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master),
João Távora <=
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Stefan Monnier, 2021/10/06
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/10/06
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Stefan Monnier, 2021/10/06
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/10/06
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/10/06
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Stefan Monnier, 2021/10/06
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/10/06
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Stefan Monnier, 2021/10/06
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Dmitry Gutov, 2021/10/10
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Richard Stallman, 2021/10/07