unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Solaris 5.8 version hangs again (X resources for faces?)
@ 2008-07-14 13:27 Klaus Zeitler
  2008-07-14 14:16 ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Klaus Zeitler @ 2008-07-14 13:27 UTC (permalink / raw)
  To: emacs-devel

In May I reported a problem with the Solaris (5.8) version of emacs 23
(Subject: startup hangs in select call in wait_reading_process_output)
Since then I wasn't able to start emacs 23 up till recently, but last
week I could start emacs again for the first time in weeks.
Unfortunately faces from X resources were not read anymore and 2 days
later I was back to my original problem, i.e. emacs hangs in startup.
It seems as if both my problems have something to do with the following 3
lines in function face-set-after-frame-default in faces.el:

	  ;; X resouces for the default face are applied during
	  ;; x-create-frame.
	  (and (not (eq face 'default))
	       (memq (window-system frame) '(x w32 mac)) 	 
	       (make-face-x-resource-internal face frame))

When I remove these 3 lines from faces.el and rebuild emacs, emacs starts
fine, but my face definitions are gone.

I appreciate any help. Thanks

Klaus

-- 
 --------------------------------------------------
|  Klaus Zeitler      Alcatel-Lucent               |
|  Email:             kzeitler@alcatel-lucent.com  |
 --------------------------------------------------
---
Nichts auf der Welt ist so gerecht verteilt wie der Verstand.  Denn
jedermann ist überzeugt, daß er genug davon habe. -- Rene Descartes




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

* Re: Solaris 5.8 version hangs again (X resources for faces?)
  2008-07-14 13:27 Solaris 5.8 version hangs again (X resources for faces?) Klaus Zeitler
@ 2008-07-14 14:16 ` Chong Yidong
  2008-07-14 14:56   ` Klaus Zeitler
  2008-07-15  9:26   ` Klaus Zeitler
  0 siblings, 2 replies; 7+ messages in thread
From: Chong Yidong @ 2008-07-14 14:16 UTC (permalink / raw)
  To: kzeitler; +Cc: emacs-devel

Klaus Zeitler <kzeitler@alcatel-lucent.com> writes:

> In May I reported a problem with the Solaris (5.8) version of emacs 23
> (Subject: startup hangs in select call in wait_reading_process_output)
> Since then I wasn't able to start emacs 23 up till recently, but last
> week I could start emacs again for the first time in weeks.
> Unfortunately faces from X resources were not read anymore and 2 days
> later I was back to my original problem, i.e. emacs hangs in startup.
> It seems as if both my problems have something to do with the following 3
> lines in function face-set-after-frame-default in faces.el:
>
> 	  ;; X resouces for the default face are applied during
> 	  ;; x-create-frame.
> 	  (and (not (eq face 'default))
> 	       (memq (window-system frame) '(x w32 mac)) 	 
> 	       (make-face-x-resource-internal face frame))
>
> When I remove these 3 lines from faces.el and rebuild emacs, emacs starts
> fine, but my face definitions are gone.
>
> I appreciate any help. Thanks

Could you try to pinpoint where in make-face-x-resource-internal, and
for what face, the hang occurs?




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

* Re: Solaris 5.8 version hangs again (X resources for faces?)
  2008-07-14 14:16 ` Chong Yidong
@ 2008-07-14 14:56   ` Klaus Zeitler
  2008-07-15  9:26   ` Klaus Zeitler
  1 sibling, 0 replies; 7+ messages in thread
From: Klaus Zeitler @ 2008-07-14 14:56 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

>>>>> "Chong" == Chong Yidong <cyd@stupidchicken.com> writes:
    Chong> 
    Chong> Could you try to pinpoint where in make-face-x-resource-internal, and
    Chong> for what face, the hang occurs?

When I evaluate the function below in scratch buffer with
(face-set-after-frame-default-tst (selected-frame))
I get: Wrong type argument: font, unspecified


(defun face-set-after-frame-default-tst (frame &optional parameters)
  "Initialize the frame-local faces of FRAME.
Calculate the face definitions using the face specs, custom theme
settings, X resources, and `face-new-frame-defaults'.
Finally, apply any relevant face attributes found amongst the
frame parameters in PARAMETERS and `default-frame-alist'."
  (dolist (face (nreverse (face-list)))
    (condition-case ()
	(progn
	  ;; Initialize faces from face spec and custom theme.
	  (face-spec-recalc face frame)
	  ;; X resouces for the default face are applied during
	  ;; x-create-frame.
	  (and (not (eq face 'default))
	       (memq (window-system frame) '(x w32 mac)) 	 
	       (make-face-x-resource-internal face frame))
	  ;; Apply attributes specified by face-new-frame-defaults
	  (internal-merge-in-global-face face frame))
      ;; Don't let invalid specs prevent frame creation.
      (error nil))))


Maybe this helps already. But I can try edebug tomorrow.
BTW the same happens, when I remove my Xresources file.

Thanks for your quick response.

Klaus

-- 
 --------------------------------------------------
|  Klaus Zeitler      Alcatel-Lucent               |
|  Email:             kzeitler@alcatel-lucent.com  |
 --------------------------------------------------
---
The day after tomorrow is the third day of the rest of your life.




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

* Re: Solaris 5.8 version hangs again (X resources for faces?)
  2008-07-14 14:16 ` Chong Yidong
  2008-07-14 14:56   ` Klaus Zeitler
@ 2008-07-15  9:26   ` Klaus Zeitler
  2008-07-15 19:45     ` Chong Yidong
  1 sibling, 1 reply; 7+ messages in thread
From: Klaus Zeitler @ 2008-07-15  9:26 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

>>>>> "Chong" == Chong Yidong <cyd@stupidchicken.com> writes:
    Chong> 
    Chong> Could you try to pinpoint where in make-face-x-resource-internal, and
    Chong> for what face, the hang occurs?

It's the face 'menu' that causes the error.
I've now added a font spec for the menu face and the error is gone, e.g.
Emacs.menu.attributeFont: -b&h-lucidatypewriter-medium-r-normal-sans-17-*-*-*-*-*-iso8859-1

Shouldn't the condition-case take care of the error?
And another question: Shouldn't the window-system check, i.e.
 (memq (window-system frame) '(x w32 mac))
be outside the dolist?

Klaus

-- 
 --------------------------------------------------
|  Klaus Zeitler      Alcatel-Lucent               |
|  Email:             kzeitler@alcatel-lucent.com  |
 --------------------------------------------------
---
It seems like the less a statesman amounts to, the more he loves the flag.




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

* Re: Solaris 5.8 version hangs again (X resources for faces?)
  2008-07-15  9:26   ` Klaus Zeitler
@ 2008-07-15 19:45     ` Chong Yidong
  2008-07-17  8:53       ` Klaus Zeitler
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2008-07-15 19:45 UTC (permalink / raw)
  To: kzeitler; +Cc: emacs-devel

Klaus Zeitler <kzeitler@alcatel-lucent.com> writes:

>>>>>> "Chong" == Chong Yidong <cyd@stupidchicken.com> writes:
>     Chong> 
>     Chong> Could you try to pinpoint where in make-face-x-resource-internal, and
>     Chong> for what face, the hang occurs?
>
> It's the face 'menu' that causes the error.
> I've now added a font spec for the menu face and the error is gone, e.g.
> Emacs.menu.attributeFont: -b&h-lucidatypewriter-medium-r-normal-sans-17-*-*-*-*-*-iso8859-1

This is strange.  It may be that the face code needs to handle this face
specially.

> Shouldn't the condition-case take care of the error?
> And another question: Shouldn't the window-system check, i.e.
>  (memq (window-system frame) '(x w32 mac))
> be outside the dolist?

No, because face specs and custom face attributes can be defined even in
terminals (X resources, however, cannot).




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

* Re: Solaris 5.8 version hangs again (X resources for faces?)
  2008-07-15 19:45     ` Chong Yidong
@ 2008-07-17  8:53       ` Klaus Zeitler
  2008-07-17 12:33         ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Klaus Zeitler @ 2008-07-17  8:53 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

>>>>> "Chong" == Chong Yidong <cyd@stupidchicken.com> writes:
    Chong> 
    Chong> This is strange.  It may be that the face code needs to
    Chong> handle this face specially.

Will that be taken care of or should I file a bug report?

    >> Shouldn't the condition-case take care of the error?
    >> And another question: Shouldn't the window-system check, i.e.
    >> (memq (window-system frame) '(x w32 mac))
    >> be outside the dolist?
    Chong> 
    Chong> No, because face specs and custom face attributes can be
    Chong> defined even in terminals (X resources, however, cannot).

Not sure we're talking about the same thing. I thought the frame
parameter will not change inside this function (I can't see where it's
going to change).

Klaus


-- 
 --------------------------------------------------
|  Klaus Zeitler      Alcatel-Lucent               |
|  Email:             kzeitler@alcatel-lucent.com  |
 --------------------------------------------------
---
If you cannot convince them, confuse them.  -- Harry S Truman




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

* Re: Solaris 5.8 version hangs again (X resources for faces?)
  2008-07-17  8:53       ` Klaus Zeitler
@ 2008-07-17 12:33         ` Chong Yidong
  0 siblings, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2008-07-17 12:33 UTC (permalink / raw)
  To: kzeitler; +Cc: emacs-devel

Klaus Zeitler <kzeitler@alcatel-lucent.com> writes:

>     >> Shouldn't the condition-case take care of the error?
>     >> And another question: Shouldn't the window-system check, i.e.
>     >> (memq (window-system frame) '(x w32 mac))
>     >> be outside the dolist?
>     Chong> 
>     Chong> No, because face specs and custom face attributes can be
>     Chong> defined even in terminals (X resources, however, cannot).
>
> Not sure we're talking about the same thing. I thought the frame
> parameter will not change inside this function (I can't see where it's
> going to change).

I'm not sure what you mean either.  The memq is for running
make-face-x-resource-internal.  We want to do this for each face (other
than the default face), so that face settings stored in X resources are
obeyed for the new frame.





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

end of thread, other threads:[~2008-07-17 12:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-14 13:27 Solaris 5.8 version hangs again (X resources for faces?) Klaus Zeitler
2008-07-14 14:16 ` Chong Yidong
2008-07-14 14:56   ` Klaus Zeitler
2008-07-15  9:26   ` Klaus Zeitler
2008-07-15 19:45     ` Chong Yidong
2008-07-17  8:53       ` Klaus Zeitler
2008-07-17 12:33         ` Chong Yidong

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).