all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
@ 2009-09-09  7:23 ` Erik Charlebois
  2009-09-10  6:27   ` Glenn Morris
  2009-09-27 16:20   ` bug#4381: marked as done (23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs) Emacs bug Tracking System
  0 siblings, 2 replies; 7+ messages in thread
From: Erik Charlebois @ 2009-09-09  7:23 UTC (permalink / raw)
  To: emacs-pretest-bug


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org  
mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

term/ns-win.el line 1068 sets the face background for 'region to
"ns_selection_color", which is defaulted to lightgoldenrod2 on Macs
and looks rather harsh on dark backgrounds. My problem is that
ns-win.el is eval'd after your .emacs/init.el and will override
any color choices you made for 'region. I'm working around it by
setting the 'region background in a window-setup-hook (which is
after frame-notice-user-settings in startup.el).

It seems like this is a mistake and the 'region face background
should not be set in ns-win.el. It's unintuitive that one specific  
face setting
isn't honoured in your init.el.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
     `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/Users/erikc/Documents/emacs/nextstep/Emacs.app/Contents/Resources/etc/ 
DEBUG for instructions.


In GNU Emacs 23.1.50.3 (i386-apple-darwin10.0.0, NS apple- 
appkit-1038.00)
of 2009-09-08 on ermac.local
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--with-ns''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: nil
   value of $XMODIFIERS: nil
   locale-coding-system: nil
   default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
   display-time-mode: t
   show-paren-mode: t
   global-whitespace-mode: t
   savehist-mode: t
   global-auto-revert-mode: t
   yas/global-mode: t
   yas/minor-mode: t
   shell-dirtrack-mode: t
   mouse-wheel-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   global-auto-composition-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
M-x r e p o r t q <backspace> <tab> <return>

Recent messages:
Loading ~/.viper...done
Loading tramp...done
Building list of manual directory expansions...
Building completion list of all manual topics...
Loading /Users/erikc/.emacs.d/anything-c-adaptive-history...done
Setting up CEDET packages...done
Loading /Users/erikc/.emacs.d/haskell-mode-2.4/haskell-site-file.el  
(source)...done
Loading fu...done
Ido mode enabled
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/Users/erikc/.emacs.d/cedet-1.0pre6/speedbar/speedbar hides /Users/ 
erikc/Documents/emacs/nextstep/Emacs.app/Contents/Resources/lisp/ 
speedbar
/Users/erikc/.emacs.d/cedet-1.0pre6/speedbar/sb-image hides /Users/ 
erikc/Documents/emacs/nextstep/Emacs.app/Contents/Resources/lisp/sb- 
image
/Users/erikc/.emacs.d/cedet-1.0pre6/common/ezimage hides /Users/erikc/ 
Documents/emacs/nextstep/Emacs.app/Contents/Resources/lisp/ezimage
/Users/erikc/.emacs.d/cedet-1.0pre6/speedbar/dframe hides /Users/erikc/ 
Documents/emacs/nextstep/Emacs.app/Contents/Resources/lisp/dframe


Erik Charlebois
erikcharlebois@gmail.com









^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
  2009-09-09  7:23 ` bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs Erik Charlebois
@ 2009-09-10  6:27   ` Glenn Morris
  2009-09-10  6:35     ` Processed: " Emacs bug Tracking System
  2009-09-13 21:56     ` Erik Charlebois
  2009-09-27 16:20   ` bug#4381: marked as done (23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs) Emacs bug Tracking System
  1 sibling, 2 replies; 7+ messages in thread
From: Glenn Morris @ 2009-09-10  6:27 UTC (permalink / raw)
  To: Erik Charlebois; +Cc: 4381

reassign 4381 emacs,ns
stop

Erik Charlebois wrote:

> term/ns-win.el line 1068 sets the face background for 'region to
> "ns_selection_color", which is defaulted to lightgoldenrod2 on Macs
> and looks rather harsh on dark backgrounds. My problem is that
> ns-win.el is eval'd after your .emacs/init.el and will override
> any color choices you made for 'region.

ns-win.el is compiled into the Emacs executable, and therefore is
loaded before your .emacs file is processed. So while there may be a
problem here, it probably is something different.

Please post the minimal .emacs that shows the problem, and hopefully a
Mac user can help.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Processed: Re: bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
  2009-09-10  6:27   ` Glenn Morris
@ 2009-09-10  6:35     ` Emacs bug Tracking System
  2009-09-13 21:56     ` Erik Charlebois
  1 sibling, 0 replies; 7+ messages in thread
From: Emacs bug Tracking System @ 2009-09-10  6:35 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs Bugs, ns for {4381}

Processing commands for control@emacsbugs.donarmstrong.com:

> reassign 4381 emacs,ns
Bug #4381 [emacs] 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
bug reassigned from package 'emacs' to 'emacs,ns'.
Warning: Unknown package 'ns'
Warning: Unknown package 'ns'
Warning: Unknown package 'ns'
Warning: Unknown package 'ns'
Warning: Unknown package 'ns'
> stop
Stopping processing here.

Please contact me if you need assistance.

Don Armstrong
(administrator, Emacs bugs database)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
  2009-09-10  6:27   ` Glenn Morris
  2009-09-10  6:35     ` Processed: " Emacs bug Tracking System
@ 2009-09-13 21:56     ` Erik Charlebois
  2009-09-14  1:09       ` Glenn Morris
  1 sibling, 1 reply; 7+ messages in thread
From: Erik Charlebois @ 2009-09-13 21:56 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 4381

The minimal .emacs that shows the problem (extracted by digging into  
the color-themes package):

(setq default-frame-alist '((background-color . "white")))
(custom-set-faces '(region ((t (:background "red")))))

The face setting is not honoured (reverts to ns_selection_color).

If I do...
(set-face-attribute 'region nil :background "red")
instead of custom-set-faces, it works fine (but color-theme uses  
custom-set-faces).

Erik Charlebois
erikcharlebois@gmail.com




On 2009-09-09, at 11:27 PM, Glenn Morris wrote:

> reassign 4381 emacs,ns
> stop
>
> Erik Charlebois wrote:
>
>> term/ns-win.el line 1068 sets the face background for 'region to
>> "ns_selection_color", which is defaulted to lightgoldenrod2 on Macs
>> and looks rather harsh on dark backgrounds. My problem is that
>> ns-win.el is eval'd after your .emacs/init.el and will override
>> any color choices you made for 'region.
>
> ns-win.el is compiled into the Emacs executable, and therefore is
> loaded before your .emacs file is processed. So while there may be a
> problem here, it probably is something different.
>
> Please post the minimal .emacs that shows the problem, and hopefully a
> Mac user can help.
>






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
  2009-09-13 21:56     ` Erik Charlebois
@ 2009-09-14  1:09       ` Glenn Morris
  2009-09-14  6:07         ` Erik Charlebois
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2009-09-14  1:09 UTC (permalink / raw)
  To: Erik Charlebois; +Cc: 4381

Erik Charlebois wrote:

> The minimal .emacs that shows the problem (extracted by digging into  
> the color-themes package):
>
> (setq default-frame-alist '((background-color . "white")))
> (custom-set-faces '(region ((t (:background "red")))))
>
> The face setting is not honoured (reverts to ns_selection_color).
>
> If I do...
> (set-face-attribute 'region nil :background "red")
> instead of custom-set-faces, it works fine (but color-theme uses  
> custom-set-faces).

Your problem sounds like this one:

http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2868

(which unfortunately split into many different bugs rather than being
all in the same one)

I think the underlying problem is that ns-win is doing a slightly odd
thing by calling set-face-background, and it does not play well with
customize. See also bug #3408.

The solution may be to change ns-win to use a more customize-friendly
method of changing the face, if it really needs to do that.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
  2009-09-14  1:09       ` Glenn Morris
@ 2009-09-14  6:07         ` Erik Charlebois
  0 siblings, 0 replies; 7+ messages in thread
From: Erik Charlebois @ 2009-09-14  6:07 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 4381

I did a deep dive and figured out exactly what is going on.

The (set-face-background 'region "ns_selection_color") that gets run  
in ns-win.el adds an entry to face-new-frame-defaults for 'region with  
"ns_selection_color" in the background slot. This gets persisted to  
the temacs-generated image.

In startup.el after (command-line) (and therefore, after .emacs runs),  
there's a call to frame-notice-user-settings. Because the background- 
color has been changed, a call to face-set-after-frame-default is  
made. This is turn calls internal-merge-in-global-face. This function  
overrides local settings with the global ones in face-new-frame- 
defaults, which clobbers the face setting.

The reason using set-face-attribute in .emacs works and custom-set- 
faces doesn't is because set-face-attribute (with nil frame) sets the  
value in face-new-frame-defaults.

Those are the gory details. I'm not sure what the right fix is.

Erik Charlebois
erikcharlebois@gmail.com

On 2009-09-13, at 6:09 PM, Glenn Morris wrote:

> Erik Charlebois wrote:
>
>> The minimal .emacs that shows the problem (extracted by digging into
>> the color-themes package):
>>
>> (setq default-frame-alist '((background-color . "white")))
>> (custom-set-faces '(region ((t (:background "red")))))
>>
>> The face setting is not honoured (reverts to ns_selection_color).
>>
>> If I do...
>> (set-face-attribute 'region nil :background "red")
>> instead of custom-set-faces, it works fine (but color-theme uses
>> custom-set-faces).
>
> Your problem sounds like this one:
>
> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2868
>
> (which unfortunately split into many different bugs rather than being
> all in the same one)
>
> I think the underlying problem is that ns-win is doing a slightly odd
> thing by calling set-face-background, and it does not play well with
> customize. See also bug #3408.
>
> The solution may be to change ns-win to use a more customize-friendly
> method of changing the face, if it really needs to do that.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#4381: marked as done (23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs)
  2009-09-09  7:23 ` bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs Erik Charlebois
  2009-09-10  6:27   ` Glenn Morris
@ 2009-09-27 16:20   ` Emacs bug Tracking System
  1 sibling, 0 replies; 7+ messages in thread
From: Emacs bug Tracking System @ 2009-09-27 16:20 UTC (permalink / raw)
  To: Adrian Robert

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

Your message dated Sun, 27 Sep 2009 12:14:23 -0400
with message-id <72AE156F-90CA-4D0A-B93C-F3E3B3253B57@gmail.com>
and subject line Re: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
has caused the Emacs bug report #4381,
regarding 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
4381: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4381
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 7043 bytes --]

From: Erik Charlebois <erikcharlebois@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
Date: Wed, 9 Sep 2009 00:23:33 -0700
Message-ID: <1AAD906B-FB98-45B1-897A-C42427404493@gmail.com>


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org  
mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

term/ns-win.el line 1068 sets the face background for 'region to
"ns_selection_color", which is defaulted to lightgoldenrod2 on Macs
and looks rather harsh on dark backgrounds. My problem is that
ns-win.el is eval'd after your .emacs/init.el and will override
any color choices you made for 'region. I'm working around it by
setting the 'region background in a window-setup-hook (which is
after frame-notice-user-settings in startup.el).

It seems like this is a mistake and the 'region face background
should not be set in ns-win.el. It's unintuitive that one specific  
face setting
isn't honoured in your init.el.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
     `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/Users/erikc/Documents/emacs/nextstep/Emacs.app/Contents/Resources/etc/ 
DEBUG for instructions.


In GNU Emacs 23.1.50.3 (i386-apple-darwin10.0.0, NS apple- 
appkit-1038.00)
of 2009-09-08 on ermac.local
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--with-ns''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: nil
   value of $XMODIFIERS: nil
   locale-coding-system: nil
   default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
   display-time-mode: t
   show-paren-mode: t
   global-whitespace-mode: t
   savehist-mode: t
   global-auto-revert-mode: t
   yas/global-mode: t
   yas/minor-mode: t
   shell-dirtrack-mode: t
   mouse-wheel-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   global-auto-composition-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
M-x r e p o r t q <backspace> <tab> <return>

Recent messages:
Loading ~/.viper...done
Loading tramp...done
Building list of manual directory expansions...
Building completion list of all manual topics...
Loading /Users/erikc/.emacs.d/anything-c-adaptive-history...done
Setting up CEDET packages...done
Loading /Users/erikc/.emacs.d/haskell-mode-2.4/haskell-site-file.el  
(source)...done
Loading fu...done
Ido mode enabled
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/Users/erikc/.emacs.d/cedet-1.0pre6/speedbar/speedbar hides /Users/ 
erikc/Documents/emacs/nextstep/Emacs.app/Contents/Resources/lisp/ 
speedbar
/Users/erikc/.emacs.d/cedet-1.0pre6/speedbar/sb-image hides /Users/ 
erikc/Documents/emacs/nextstep/Emacs.app/Contents/Resources/lisp/sb- 
image
/Users/erikc/.emacs.d/cedet-1.0pre6/common/ezimage hides /Users/erikc/ 
Documents/emacs/nextstep/Emacs.app/Contents/Resources/lisp/ezimage
/Users/erikc/.emacs.d/cedet-1.0pre6/speedbar/dframe hides /Users/erikc/ 
Documents/emacs/nextstep/Emacs.app/Contents/Resources/lisp/dframe


Erik Charlebois
erikcharlebois@gmail.com






[-- Attachment #3: Type: message/rfc822, Size: 2586 bytes --]

From: Adrian Robert <adrian.b.robert@gmail.com>
To: 4381-done@emacsbugs.donarmstrong.com
Subject: Re: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs
Date: Sun, 27 Sep 2009 12:14:23 -0400
Message-ID: <72AE156F-90CA-4D0A-B93C-F3E3B3253B57@gmail.com>

Closing, fixed with commented version of last patch posted.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-09-27 16:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <72AE156F-90CA-4D0A-B93C-F3E3B3253B57@gmail.com>
2009-09-09  7:23 ` bug#4381: 23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs Erik Charlebois
2009-09-10  6:27   ` Glenn Morris
2009-09-10  6:35     ` Processed: " Emacs bug Tracking System
2009-09-13 21:56     ` Erik Charlebois
2009-09-14  1:09       ` Glenn Morris
2009-09-14  6:07         ` Erik Charlebois
2009-09-27 16:20   ` bug#4381: marked as done (23.1.50; Cocoa Emacs: face background for 'region set in ns-win.el after .emacs) Emacs bug Tracking System

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.