GNU bug report logs - #7774
24.0.50; `frame-background-mode'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 3 Jan 2011 07:19:01 UTC

Severity: minor

Found in version 24.0.50

Done: Chong Yidong <cyd <at> gnu.org>

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 7774 in the body.
You can then email your comments to 7774 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7774; Package emacs. (Mon, 03 Jan 2011 07:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 03 Jan 2011 07:19:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; `frame-background-mode'
Date: Sun, 2 Jan 2011 23:25:13 -0800
emacs -Q
 
There needs to be some explanation of `frame-background-mode' for users
and for Emacs-Lisp programmers.
 
First, the option is described briefly in the Elisp manual, but not in
the Emacs manual.  It is a _user_ option, and should be in the latter.
 
Second, the (elisp) entry does not say what happens if the value is
nil.  The doc string does say that if it is nil then Emacs will "examine
the brightness for you".  That explanation of nil is incomprehensible
and pretty useless for users, but it is especially useless for
programmers. 
 
I had some code that tried to DTRT for a given color based on the
`frame-background-mode'.  I was incorrectly assuming that the value was
set to `light' or `dark' automatically by Emacs ("examine the brightness
for you") if it was not already set (customized) by the user.
 
Now I guess I will need to call `frame-set-background-mode' if the value
is nil, to determine the proper value.  The doc should have helped here.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-12-20 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7774; Package emacs. (Mon, 03 Jan 2011 08:06:01 GMT) Full text and rfc822 format available.

Message #8 received at 7774 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <7774 <at> debbugs.gnu.org>
Subject: RE: bug#7774: 24.0.50; `frame-background-mode'
Date: Mon, 3 Jan 2011 00:11:21 -0800
> Now I guess I will need to call `frame-set-background-mode' 
> if the value is nil, to determine the proper value.

Forget that "solution".  I was confusing the option with the frame parameter.
What I needed to test was the parameter `background-mode', not the option.

That doesn't change the rest of the bug report.  The option should be mentioned
in the Emacs manual. (I'm not even sure it's needed also in the Elisp manual.)
And the manual, like the doc string, should mention the value nil.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7774; Package emacs. (Sun, 05 Aug 2012 09:34:01 GMT) Full text and rfc822 format available.

Message #11 received at 7774 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7774 <at> debbugs.gnu.org
Subject: Re: bug#7774: 24.0.50; `frame-background-mode'
Date: Sun, 05 Aug 2012 17:25:28 +0800
"Drew Adams" <drew.adams <at> oracle.com> writes:

> The option should be mentioned in the Emacs manual. (I'm not even sure
> it's needed also in the Elisp manual.)  And the manual, like the doc
> string, should mention the value nil.

Fixed in trunk.




bug closed, send any further explanations to 7774 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 05 Aug 2012 09:34:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 Sep 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 259 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.