* Recent change to describe-variable
@ 2011-04-03 0:15 Chong Yidong
2011-04-03 0:33 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Chong Yidong @ 2011-04-03 0:15 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
The completion function for describe-variable now uses the predicate
(lambda (vv)
(or (special-variable-p vv)
(get vv 'variable-documentation)))
This breaks using C-h v to examine let-bound variables in Lisp
backtraces.
Also, when coding I sometimes do (setq foo 1), and use C-h v to examine
the placeholder variable later on; this now fails.
There doesn't seem to be any good reason to restrict the completion this
way.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Recent change to describe-variable
2011-04-03 0:15 Recent change to describe-variable Chong Yidong
@ 2011-04-03 0:33 ` Drew Adams
2011-04-04 9:41 ` Ted Zlatanov
2011-04-04 13:46 ` Stefan Monnier
2 siblings, 0 replies; 15+ messages in thread
From: Drew Adams @ 2011-04-03 0:33 UTC (permalink / raw
To: 'Chong Yidong', 'Stefan Monnier'; +Cc: emacs-devel
> This breaks using C-h v to examine let-bound variables in Lisp
> backtraces.
>
> Also, when coding I sometimes do (setq foo 1), and use C-h v
> to examine the placeholder variable later on; this now fails.
>
> There doesn't seem to be any good reason to restrict the
> completion this way.
1+
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-03 0:15 Recent change to describe-variable Chong Yidong
2011-04-03 0:33 ` Drew Adams
@ 2011-04-04 9:41 ` Ted Zlatanov
2011-04-04 10:23 ` Juanma Barranquero
2011-04-04 13:46 ` Stefan Monnier
2 siblings, 1 reply; 15+ messages in thread
From: Ted Zlatanov @ 2011-04-04 9:41 UTC (permalink / raw
To: emacs-devel
On Sat, 02 Apr 2011 20:15:15 -0400 Chong Yidong <cyd@stupidchicken.com> wrote:
CY> The completion function for describe-variable now uses the predicate
CY> (lambda (vv)
CY> (or (special-variable-p vv)
CY> (get vv 'variable-documentation)))
CY> This breaks using C-h v to examine let-bound variables in Lisp
CY> backtraces.
CY> Also, when coding I sometimes do (setq foo 1), and use C-h v to examine
CY> the placeholder variable later on; this now fails.
CY> There doesn't seem to be any good reason to restrict the completion this
CY> way.
I think I reported this. It is too wide without that predicate. See
http://thread.gmane.org/gmane.emacs.devel/137048
So if `C-h v' AKA `describe-variable' is going to describe everything,
it should at least filter out self-quoting :symbols, and I think it
makes sense to provide a `describe-emacs-variable' to use the predicate
above, adjusting for let-bound variables.
Ted
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 9:41 ` Ted Zlatanov
@ 2011-04-04 10:23 ` Juanma Barranquero
2011-04-04 10:41 ` Ted Zlatanov
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Juanma Barranquero @ 2011-04-04 10:23 UTC (permalink / raw
To: Ted Zlatanov; +Cc: emacs-devel
2011/4/4 Ted Zlatanov <tzz@lifelogs.com>:
> So if `C-h v' AKA `describe-variable' is going to describe everything,
> it should at least filter out self-quoting :symbols
At your request I installed a change to exclude :keywords, but the
lexbind-new merge overrode it. So if the current predicate is removed
it would be good to filter out keywords again (though it makes sense
to let pass keywords with a docstring, which my original patch
didn't).
Juanma
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 10:23 ` Juanma Barranquero
@ 2011-04-04 10:41 ` Ted Zlatanov
2011-04-04 13:03 ` Drew Adams
2011-04-04 16:08 ` Chong Yidong
2 siblings, 0 replies; 15+ messages in thread
From: Ted Zlatanov @ 2011-04-04 10:41 UTC (permalink / raw
To: emacs-devel
On Mon, 4 Apr 2011 12:23:59 +0200 Juanma Barranquero <lekktu@gmail.com> wrote:
JB> 2011/4/4 Ted Zlatanov <tzz@lifelogs.com>:
>> So if `C-h v' AKA `describe-variable' is going to describe everything,
>> it should at least filter out self-quoting :symbols
JB> At your request I installed a change to exclude :keywords, but the
JB> lexbind-new merge overrode it. So if the current predicate is removed
JB> it would be good to filter out keywords again (though it makes sense
JB> to let pass keywords with a docstring, which my original patch
JB> didn't).
I'm OK with however you and the maintainers want to do it, fixing that
merge override. I do think it makes sense to have
`describe-emacs-variable' or `describe-documented-variable' (maybe
invoked with `C-u C-h v') to replicate that predicate, but that's a
different feature.
Thanks
Ted
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Recent change to describe-variable
2011-04-04 10:23 ` Juanma Barranquero
2011-04-04 10:41 ` Ted Zlatanov
@ 2011-04-04 13:03 ` Drew Adams
2011-04-04 13:34 ` Ted Zlatanov
2011-04-04 14:46 ` Juanma Barranquero
2011-04-04 16:08 ` Chong Yidong
2 siblings, 2 replies; 15+ messages in thread
From: Drew Adams @ 2011-04-04 13:03 UTC (permalink / raw
To: 'Juanma Barranquero', 'Ted Zlatanov'; +Cc: emacs-devel
> > So if `C-h v' AKA `describe-variable' is going to describe
> > everything, it should at least filter out self-quoting :symbols
>
> At your request I installed a change to exclude :keywords
Oh, are we now installing things at the request of one Emacs user/developer?
Someone has an idea s?he thinks is good, so it's installed as part of Emacs?
> but the lexbind-new merge overrode it. So if the current
> predicate is removed it would be good to filter out keywords
> again (though it makes sense to let pass keywords with a
> docstring, which my original patch didn't).
Keywords with a doc string and without. I agree with the post below by Stefan
to the cited thread: if it has a doc string, include it. And even if it doesn't
have a doc string, include it ("No documentation" is useful information.)
j>> (defconst :mykeyword :mykeyword)
j>> and even if you add a docstring to that, I'm not sure it is sensible
j>> to show it as a completion of describe-variable...
s>
s> Actually, if it has a docstring, it definitely makes sense. And if it
s> doesn't, then it's not that much of a problem to include those rare
s> cases in the completion.
It ain't broke. Please don't fix it. Let _users_ filter things as they like.
And if some user wants a specialized "`my-describe-emacs-variable' or
`my-describe-documented-variable' then s?he can define the command and post it
to the wiki. It's not rare (or difficult) for a user to define a specialized
`describe-*' command.
Emacs doesn't need it.
Especially as a replacement for `describe-variable'.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 13:03 ` Drew Adams
@ 2011-04-04 13:34 ` Ted Zlatanov
2011-04-04 14:46 ` Juanma Barranquero
1 sibling, 0 replies; 15+ messages in thread
From: Ted Zlatanov @ 2011-04-04 13:34 UTC (permalink / raw
To: emacs-devel
On Mon, 4 Apr 2011 06:03:09 -0700 "Drew Adams" <drew.adams@oracle.com> wrote:
>> > So if `C-h v' AKA `describe-variable' is going to describe
>> > everything, it should at least filter out self-quoting :symbols
>>
>> At your request I installed a change to exclude :keywords
DA> Oh, are we now installing things at the request of one Emacs
DA> user/developer? Someone has an idea s?he thinks is good, so it's
DA> installed as part of Emacs?
Yes, I believe that's exactly how it works. I don't know why you're
acting surprised.
>> but the lexbind-new merge overrode it. So if the current
>> predicate is removed it would be good to filter out keywords
>> again (though it makes sense to let pass keywords with a
>> docstring, which my original patch didn't).
DA> Keywords with a doc string and without. I agree with the post below by Stefan
DA> to the cited thread: if it has a doc string, include it. And even if it doesn't
DA> have a doc string, include it ("No documentation" is useful information.)
I was specifically talking about self-quoting symbols. Putting them in
`describe-variable' is like putting personal names like "John" and
"Nick" in the dictionary. Besides being incorrect, there are proper
nouns and verbs like "john" and "nick."
j> (defconst :mykeyword :mykeyword)
j> and even if you add a docstring to that, I'm not sure it is sensible
j> to show it as a completion of describe-variable...
s>
s> Actually, if it has a docstring, it definitely makes sense. And if it
s> doesn't, then it's not that much of a problem to include those rare
s> cases in the completion.
DA> Let _users_ filter things as they like. And if some user wants a
DA> specialized "`my-describe-emacs-variable' or
DA> `my-describe-documented-variable' then s?he can define the command
DA> and post it to the wiki. It's not rare (or difficult) for a user to
DA> define a specialized `describe-*' command.
But that's ridiculous, shifting the burden to the user. `C-h v' is a
first-class command; it's very visible and very important. It should
not offer garbage. How could it possibly benefit the user to offer
undocumented self-quoting symbols for completion to `describe-variable'?
Ted
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-03 0:15 Recent change to describe-variable Chong Yidong
2011-04-03 0:33 ` Drew Adams
2011-04-04 9:41 ` Ted Zlatanov
@ 2011-04-04 13:46 ` Stefan Monnier
2011-04-04 17:05 ` Chong Yidong
2 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2011-04-04 13:46 UTC (permalink / raw
To: Chong Yidong; +Cc: emacs-devel
> This breaks using C-h v to examine let-bound variables in Lisp
> backtraces.
`e' is supposed to be a more reliable way to get this result.
> Also, when coding I sometimes do (setq foo 1), and use C-h v to examine
> the placeholder variable later on; this now fails.
M-: also works well for that.
> There doesn't seem to be any good reason to restrict the completion
> this way.
There is no strong reason for this change, it just seemed like a good
idea since it eliminates keywords in a clean way.
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 13:03 ` Drew Adams
2011-04-04 13:34 ` Ted Zlatanov
@ 2011-04-04 14:46 ` Juanma Barranquero
1 sibling, 0 replies; 15+ messages in thread
From: Juanma Barranquero @ 2011-04-04 14:46 UTC (permalink / raw
To: Drew Adams; +Cc: Ted Zlatanov, emacs-devel
On Mon, Apr 4, 2011 at 15:03, Drew Adams <drew.adams@oracle.com> wrote:
> Oh, are we now installing things at the request of one Emacs user/developer?
> Someone has an idea s?he thinks is good, so it's installed as part of Emacs?
Please try to control yourself, at least if you're interested in discussion.
Ted asked it, and there was a bit of exchange; you've read it. The
patch was installed and nobody complained until now; and the complain
has not been caused by the keywords, but becase the lexbind-new change
is stricter.
> Keywords with a doc string and without. I agree with the post below by Stefan
> to the cited thread: if it has a doc string, include it. And even if it doesn't
> have a doc string, include it ("No documentation" is useful information.)
No, it's not, because I'm reasonably sure in all the Emacs sources
there's not a single case of a keyword constant with a docstring; I
suspect there's even no case of (defconst :x :x). So having a
docstring would be information, but not having one is just noise.
> Especially as a replacement for `describe-variable'.
I'm still trying to understand how can you defend so strenuously for
describe-variable to describe things that are not variables; the fact
that (defconst :x :x) is even allowed is just a relic from the past.
Juanma
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 10:23 ` Juanma Barranquero
2011-04-04 10:41 ` Ted Zlatanov
2011-04-04 13:03 ` Drew Adams
@ 2011-04-04 16:08 ` Chong Yidong
2011-04-04 16:11 ` Juanma Barranquero
2 siblings, 1 reply; 15+ messages in thread
From: Chong Yidong @ 2011-04-04 16:08 UTC (permalink / raw
To: Juanma Barranquero; +Cc: Ted Zlatanov, emacs-devel
Juanma Barranquero <lekktu@gmail.com> writes:
> 2011/4/4 Ted Zlatanov <tzz@lifelogs.com>:
>
>> So if `C-h v' AKA `describe-variable' is going to describe everything,
>> it should at least filter out self-quoting :symbols
>
> At your request I installed a change to exclude :keywords, but the
> lexbind-new merge overrode it. So if the current predicate is removed
> it would be good to filter out keywords again (though it makes sense
> to let pass keywords with a docstring, which my original patch
> didn't).
Could you apply such a change to the trunk? Thanks.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 16:08 ` Chong Yidong
@ 2011-04-04 16:11 ` Juanma Barranquero
0 siblings, 0 replies; 15+ messages in thread
From: Juanma Barranquero @ 2011-04-04 16:11 UTC (permalink / raw
To: Chong Yidong; +Cc: Ted Zlatanov, emacs-devel
On Mon, Apr 4, 2011 at 18:08, Chong Yidong <cyd@stupidchicken.com> wrote:
> Could you apply such a change to the trunk? Thanks.
Easily, once Stefan and you agree on what's better ;-)
Juanma
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 13:46 ` Stefan Monnier
@ 2011-04-04 17:05 ` Chong Yidong
2011-04-04 21:47 ` Stefan Monnier
0 siblings, 1 reply; 15+ messages in thread
From: Chong Yidong @ 2011-04-04 17:05 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> There doesn't seem to be any good reason to restrict the completion
>> this way.
>
> There is no strong reason for this change, it just seemed like a good
> idea since it eliminates keywords in a clean way.
OK, so do you have any objection to bringing back the old behavior in
the way suggested by Juanma?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 17:05 ` Chong Yidong
@ 2011-04-04 21:47 ` Stefan Monnier
2011-04-04 22:09 ` Juanma Barranquero
0 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2011-04-04 21:47 UTC (permalink / raw
To: Chong Yidong; +Cc: emacs-devel
>>> There doesn't seem to be any good reason to restrict the completion
>>> this way.
>> There is no strong reason for this change, it just seemed like a good
>> idea since it eliminates keywords in a clean way.
> OK, so do you have any objection to bringing back the old behavior in
> the way suggested by Juanma?
No, go ahead: it's much better for the completion to be too permissive
than too restrictive.
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 21:47 ` Stefan Monnier
@ 2011-04-04 22:09 ` Juanma Barranquero
2011-04-04 22:24 ` Juanma Barranquero
0 siblings, 1 reply; 15+ messages in thread
From: Juanma Barranquero @ 2011-04-04 22:09 UTC (permalink / raw
To: Stefan Monnier; +Cc: Chong Yidong, emacs-devel
On Mon, Apr 4, 2011 at 23:47, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> No, go ahead: it's much better for the completion to be too permissive
> than too restrictive.
Committed.
Juanma
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Recent change to describe-variable
2011-04-04 22:09 ` Juanma Barranquero
@ 2011-04-04 22:24 ` Juanma Barranquero
0 siblings, 0 replies; 15+ messages in thread
From: Juanma Barranquero @ 2011-04-04 22:24 UTC (permalink / raw
To: Stefan Monnier; +Cc: Chong Yidong, emacs-devel
On Tue, Apr 5, 2011 at 00:09, Juanma Barranquero <lekktu@gmail.com> wrote:
> Committed.
OK, that's been a brain fart (I'm allowing functions). I'll fix it ASAP.
Juanma
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-04-04 22:24 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-03 0:15 Recent change to describe-variable Chong Yidong
2011-04-03 0:33 ` Drew Adams
2011-04-04 9:41 ` Ted Zlatanov
2011-04-04 10:23 ` Juanma Barranquero
2011-04-04 10:41 ` Ted Zlatanov
2011-04-04 13:03 ` Drew Adams
2011-04-04 13:34 ` Ted Zlatanov
2011-04-04 14:46 ` Juanma Barranquero
2011-04-04 16:08 ` Chong Yidong
2011-04-04 16:11 ` Juanma Barranquero
2011-04-04 13:46 ` Stefan Monnier
2011-04-04 17:05 ` Chong Yidong
2011-04-04 21:47 ` Stefan Monnier
2011-04-04 22:09 ` Juanma Barranquero
2011-04-04 22:24 ` Juanma Barranquero
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.