GNU bug report logs -
#44107
set-window-dedicated-p: args should be marked as optional
Previous Next
Reported by: Boruch Baum <boruch_baum <at> gmx.com>
Date: Tue, 20 Oct 2020 22:56:01 UTC
Severity: normal
Tags: wontfix
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44107 in the body.
You can then email your comments to 44107 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44107
; Package
emacs
.
(Tue, 20 Oct 2020 22:56:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Boruch Baum <boruch_baum <at> gmx.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 20 Oct 2020 22:56:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The definition for function `set-window-dedicated-p' indicates that its
two arguments are required, but the docstring indicates that the
arguments are optional. I haven't looked at the C source code, but my
testing indicates that the arguments really are optional, so the
description should mark them as such, ie.
(set-window-dedicated-p &optional WINDOW FLAG)
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44107
; Package
emacs
.
(Wed, 21 Oct 2020 00:14:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 44107 <at> debbugs.gnu.org (full text, mbox):
Boruch Baum <boruch_baum <at> gmx.com> writes:
> The definition for function `set-window-dedicated-p' indicates that its
> two arguments are required, but the docstring indicates that the
> arguments are optional.
I assume you're referring to the following sentence:
WINDOW must be a live window and defaults to the selected one.
The default case in question is when WINDOW is specified as nil.
Perhaps this could be made more explicit, but it's a pretty pervasive
idiom.
In other words, set-window-dedicated-p takes two positional arguments
and its docstring does not intentionally try to suggest otherwise.
> I haven't looked at the C source code, but my
> testing indicates that the arguments really are optional, so the
> description should mark them as such, ie.
>
> (set-window-dedicated-p &optional WINDOW FLAG)
Could you please describe your testing in more detail? Evaluating
(set-window-dedicated-p)
gives me
(wrong-number-of-arguments set-window-dedicated-p 0)
since at least as far back as Emacs 24.5, so I'm not sure how you
reached that conclusion.
Or are you suggesting that the function's arguments _be made_ optional,
since they are both allowed to be nil? (A positional argument that can
be nil is not the same as an optional argument.)
--
Basil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44107
; Package
emacs
.
(Wed, 21 Oct 2020 00:19:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 44107 <at> debbugs.gnu.org (full text, mbox):
On 2020-10-21 01:13, Basil L. Contovounesios wrote:
> Or are you suggesting that the function's arguments _be made_ optional,
> since they are both allowed to be nil? (A positional argument that can
> be nil is not the same as an optional argument.)
Yes, I see I was unclear about that. They should be made optional since
both may be nil.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44107
; Package
emacs
.
(Wed, 21 Oct 2020 00:26:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 44107 <at> debbugs.gnu.org (full text, mbox):
Boruch Baum <boruch_baum <at> gmx.com> writes:
> On 2020-10-21 01:13, Basil L. Contovounesios wrote:
>> Or are you suggesting that the function's arguments _be made_ optional,
>> since they are both allowed to be nil? (A positional argument that can
>> be nil is not the same as an optional argument.)
>
> Yes, I see I was unclear about that. They should be made optional since
> both may be nil.
I don't think that would make sense, since
(set-window-dedicated-p nil nil)
undedicates the selected window, but if I saw its (proposed) equivalent
(set-window-dedicated-p)
I'd think the opposite.
--
Basil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44107
; Package
emacs
.
(Wed, 21 Oct 2020 00:48:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 44107 <at> debbugs.gnu.org (full text, mbox):
On 2020-10-21 01:25, Basil L. Contovounesios wrote:
> Boruch Baum <boruch_baum <at> gmx.com> writes:
>
> > On 2020-10-21 01:13, Basil L. Contovounesios wrote:
> >> Or are you suggesting that the function's arguments _be made_ optional,
> >> since they are both allowed to be nil? (A positional argument that can
> >> be nil is not the same as an optional argument.)
> >
> > Yes, I see I was unclear about that. They should be made optional since
> > both may be nil.
>
> I don't think that would make sense, since
>
> (set-window-dedicated-p nil nil)
>
> undedicates the selected window, but if I saw its (proposed) equivalent
>
> (set-window-dedicated-p)
>
> I'd think the opposite.
Good point. And since WINDOW is sequentially the first arg, it alone
can't be optional. Unless you or someone else has a better idea then,
this report should be closed.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
Added tag(s) wontfix.
Request was from
"Basil L. Contovounesios" <contovob <at> tcd.ie>
to
control <at> debbugs.gnu.org
.
(Wed, 21 Oct 2020 08:29:01 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
44107 <at> debbugs.gnu.org and Boruch Baum <boruch_baum <at> gmx.com>
Request was from
"Basil L. Contovounesios" <contovob <at> tcd.ie>
to
control <at> debbugs.gnu.org
.
(Wed, 21 Oct 2020 08:29:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#44107
; Package
emacs
.
(Wed, 21 Oct 2020 08:29:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 44107-done <at> debbugs.gnu.org (full text, mbox):
tags 44107 wontfix
close 44107
quit
Boruch Baum <boruch_baum <at> gmx.com> writes:
> Good point. And since WINDOW is sequentially the first arg, it alone
> can't be optional. Unless you or someone else has a better idea then,
> this report should be closed.
Thanks, I'll close it for now then. If someone comes up with a better
idea we can just reopen it.
--
Basil
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 18 Nov 2020 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.