* bug#59248: 29.0.50; apropos lists keywords as if they were variables
@ 2022-11-13 16:56 Thibault Polge
2022-11-13 18:09 ` Eli Zaretskii
2022-11-14 5:21 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 5+ messages in thread
From: Thibault Polge @ 2022-11-13 16:56 UTC (permalink / raw)
To: 59248
On a very recent (about yesterday) Emacs from HEAD, apropos lists
interned keywords as undocumented variables. Eg, the following
invocation:
M-x apropos RET distant-foreground RET
displays the following output:
> Type RET on a type label to view its full documentation.
>
> :distant-foreground
> Variable: (not documented)
> Value: :distant-foreground
This is technically correct --- keywords are variable-ish --- but quite
useless. At best, keywords just add noise to `apropos` output. At
worst, they may be misleading, since an user may assume they can somehow
control something by setq'ing a keyword.
Regards,
Thibault
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#59248: 29.0.50; apropos lists keywords as if they were variables
2022-11-13 16:56 bug#59248: 29.0.50; apropos lists keywords as if they were variables Thibault Polge
@ 2022-11-13 18:09 ` Eli Zaretskii
2022-11-13 18:30 ` Thibault Polge
2022-11-14 5:21 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-11-13 18:09 UTC (permalink / raw)
To: Thibault Polge; +Cc: 59248
> From: Thibault Polge <thibault@thb.lt>
> Date: Sun, 13 Nov 2022 17:56:09 +0100
>
> On a very recent (about yesterday) Emacs from HEAD, apropos lists
> interned keywords as undocumented variables. Eg, the following
> invocation:
>
> M-x apropos RET distant-foreground RET
>
> displays the following output:
>
> > Type RET on a type label to view its full documentation.
> >
> > :distant-foreground
> > Variable: (not documented)
> > Value: :distant-foreground
>
> This is technically correct --- keywords are variable-ish
"M-x apropos" is not just about variables. It's about any symbol that
matches a regexp.
> but quite useless. At best, keywords just add noise to `apropos`
> output. At worst, they may be misleading, since an user may assume
> they can somehow control something by setq'ing a keyword.
How can Emacs know that the user didn't actually _want_ to look up a
keyword? It is not impossible.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#59248: 29.0.50; apropos lists keywords as if they were variables
2022-11-13 18:09 ` Eli Zaretskii
@ 2022-11-13 18:30 ` Thibault Polge
2022-11-13 18:34 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Thibault Polge @ 2022-11-13 18:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 59248
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Thibault Polge <thibault@thb.lt>
>> Date: Sun, 13 Nov 2022 17:56:09 +0100
>>
>> On a very recent (about yesterday) Emacs from HEAD, apropos lists
>> interned keywords as undocumented variables. Eg, the following
>> invocation:
>>
>> M-x apropos RET distant-foreground RET
>>
>> displays the following output:
>>
>> > Type RET on a type label to view its full documentation.
>> >
>> > :distant-foreground
>> > Variable: (not documented)
>> > Value: :distant-foreground
>>
>> This is technically correct --- keywords are variable-ish
>
> "M-x apropos" is not just about variables. It's about any symbol that
> matches a regexp.
In this case, the docstring for `apropos` is incorrect. It currently
reads:
"Show all meaningful Lisp symbols whose names match PATTERN. Symbols
are shown if they are defined as functions, variables, or faces, or if
they have nonempty property lists."
The second sentence should include keywords.
The produced output is also incorrect: a symbol is not a "Variable: (not
documented)", and I'm not sure it makes sense to give its value, since
it's auto-evaluating.
>> but quite useless. At best, keywords just add noise to `apropos`
>> output. At worst, they may be misleading, since an user may assume
>> they can somehow control something by setq'ing a keyword.
>
> How can Emacs know that the user didn't actually _want_ to look up a
> keyword? It is not impossible.
I'm not sure I can think of a reason to do that: all the user would learn is
that something, somewhere, interned that keyword. But maybe there are use
cases that escape me.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#59248: 29.0.50; apropos lists keywords as if they were variables
2022-11-13 18:30 ` Thibault Polge
@ 2022-11-13 18:34 ` Eli Zaretskii
0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2022-11-13 18:34 UTC (permalink / raw)
To: Thibault Polge; +Cc: 59248
> From: Thibault Polge <thibault@thb.lt>
> Cc: 59248@debbugs.gnu.org
> Date: Sun, 13 Nov 2022 19:30:23 +0100
>
> > "M-x apropos" is not just about variables. It's about any symbol that
> > matches a regexp.
>
> In this case, the docstring for `apropos` is incorrect.
I will see about fixing that, thanks.
> > How can Emacs know that the user didn't actually _want_ to look up a
> > keyword? It is not impossible.
>
> I'm not sure I can think of a reason to do that: all the user would learn is
> that something, somewhere, interned that keyword. But maybe there are use
> cases that escape me.
Apropos is also (if not mainly) for when you don't remember the exact
name of something.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#59248: 29.0.50; apropos lists keywords as if they were variables
2022-11-13 16:56 bug#59248: 29.0.50; apropos lists keywords as if they were variables Thibault Polge
2022-11-13 18:09 ` Eli Zaretskii
@ 2022-11-14 5:21 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 5+ messages in thread
From: Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-11-14 5:21 UTC (permalink / raw)
To: Thibault Polge; +Cc: 59248
[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]
Thibault Polge <thibault@thb.lt> writes:
> On a very recent (about yesterday) Emacs from HEAD, apropos lists
> interned keywords as undocumented variables. Eg, the following
> invocation:
This happens to me with a Emacs build from more than two months old
commit.
>
> M-x apropos RET distant-foreground RET
>
> displays the following output:
>
>> Type RET on a type label to view its full documentation.
>>
>> :distant-foreground
>> Variable: (not documented)
>> Value: :distant-foreground
>
> This is technically correct --- keywords are variable-ish --- but quite
> useless. At best, keywords just add noise to `apropos` output. At
> worst, they may be misleading, since an user may assume they can somehow
> control something by setq'ing a keyword.
>
> Regards,
> Thibault
>
>
>
These symbol (nil, t, keywords) are self-evaluating. Their value is the
symbol itself. For example, do the following:
M-x apropos RET ^nil$ RET
M-x apropos RET ^t$ RET
However they are constants, the values can't be changed.
I suggest to remove the "Variable" and "Value" and add something like
"Self-evaluating: yes" and "Constant: yes".
--
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-14 5:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-13 16:56 bug#59248: 29.0.50; apropos lists keywords as if they were variables Thibault Polge
2022-11-13 18:09 ` Eli Zaretskii
2022-11-13 18:30 ` Thibault Polge
2022-11-13 18:34 ` Eli Zaretskii
2022-11-14 5:21 ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).