unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* What is the proper way to set the default font these days?
@ 2009-06-06 14:58 Deniz Dogan
  2009-06-06 19:11 ` Stefan Monnier
  2009-06-07  3:00 ` Miles Bader
  0 siblings, 2 replies; 49+ messages in thread
From: Deniz Dogan @ 2009-06-06 14:58 UTC (permalink / raw)
  To: Emacs-Devel devel

Hi

Since I started using Emacs 23, I've been having some problems with
Emacs (the windowed UI, is this called Emacs-GTK mayhap?) in
combination with the XMonad window manager.  To put it short, there is
some problem with Emacs' timing between setting the font and telling
the window manager how big the frame is (or maybe the other way
around, I don't know X).

I can't explain it any better than with a screen shot:
http://img40.imageshack.us/img40/7521/200906061652201280x800s.png

In earlier versions of Emacs 23, I managed to solve the problem by
setting the font in .Xdefaults, but now not even that works.  I am not
sure which revision this was "broken" in and to be honest, I just want
to know how I can work around it.

Any help is appreciated.

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-06-06 14:58 What is the proper way to set the default font these days? Deniz Dogan
@ 2009-06-06 19:11 ` Stefan Monnier
  2009-06-07  0:25   ` Deniz Dogan
  2009-06-07  3:00 ` Miles Bader
  1 sibling, 1 reply; 49+ messages in thread
From: Stefan Monnier @ 2009-06-06 19:11 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: Emacs-Devel devel

> Since I started using Emacs 23, I've been having some problems with
> Emacs (the windowed UI, is this called Emacs-GTK mayhap?) in
> combination with the XMonad window manager.  To put it short, there is
> some problem with Emacs' timing between setting the font and telling
> the window manager how big the frame is (or maybe the other way
> around, I don't know X).

Does this problem only affect the first frame created?
I.e. does it also happen after C-x 5 2?


        Stefan




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

* Re: What is the proper way to set the default font these days?
  2009-06-06 19:11 ` Stefan Monnier
@ 2009-06-07  0:25   ` Deniz Dogan
  0 siblings, 0 replies; 49+ messages in thread
From: Deniz Dogan @ 2009-06-07  0:25 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs-Devel devel

2009/6/6 Stefan Monnier <monnier@iro.umontreal.ca>:
>> Since I started using Emacs 23, I've been having some problems with
>> Emacs (the windowed UI, is this called Emacs-GTK mayhap?) in
>> combination with the XMonad window manager.  To put it short, there is
>> some problem with Emacs' timing between setting the font and telling
>> the window manager how big the frame is (or maybe the other way
>> around, I don't know X).
>
> Does this problem only affect the first frame created?
> I.e. does it also happen after C-x 5 2?
>
>
>        Stefan
>

Using just "emacs", it seems to happen only for the first frame.
However, using "emacs --daemon" and then "emacsclient -c", it does
*not* happen for the first frame.

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-06-06 14:58 What is the proper way to set the default font these days? Deniz Dogan
  2009-06-06 19:11 ` Stefan Monnier
@ 2009-06-07  3:00 ` Miles Bader
  2009-06-07 12:44   ` David De La Harpe Golden
  1 sibling, 1 reply; 49+ messages in thread
From: Miles Bader @ 2009-06-07  3:00 UTC (permalink / raw)
  To: emacs-devel

Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:
> In earlier versions of Emacs 23, I managed to solve the problem by
> setting the font in .Xdefaults, but now not even that works.  I am not
> sure which revision this was "broken" in and to be honest, I just want
> to know how I can work around it.

One thing which annoys me is that Emacs seems to ignore .Xdefaults if
there's anything in the server's xrdb database -- and recent versions of
gnome, put crap in the xrdb database without being asked to.

So to properly start emacs, I first need to do "xrdb -remove" in a
shell.

-miles

-- 
Acquaintance, n. A person whom we know well enough to borrow from, but not
well enough to lend to.





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

* Re: What is the proper way to set the default font these days?
  2009-06-07  3:00 ` Miles Bader
@ 2009-06-07 12:44   ` David De La Harpe Golden
  2009-06-08  5:22     ` Miles Bader
  0 siblings, 1 reply; 49+ messages in thread
From: David De La Harpe Golden @ 2009-06-07 12:44 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

Miles Bader wrote:
> One thing which annoys me is that Emacs seems to ignore .Xdefaults if
> there's anything in the server's xrdb database -- and recent versions of
> gnome, put crap in the xrdb database without being asked to.
>

?  It was my understanding (which could be flawed) that applications 
never look at .Xdefaults, it's up to you to do an

xrdb -merge .Xdefaults

That happens once at login time automatically*, and if gnome or kde 
overwrite stuff post that time (as you say gnome does and kde can be 
optionally configured to, to partially apply your kde theme to non-kde 
applications, something that never works right of course, but in the kde 
case you can at least turn it off...), then it's up to you to re-merge ?


* Usually by a script in e.g. (debian):
/etc/X11/Xsession.d/30x11-common_xresources







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

* Re: What is the proper way to set the default font these days?
  2009-06-07 12:44   ` David De La Harpe Golden
@ 2009-06-08  5:22     ` Miles Bader
  2009-06-08 14:21       ` Stephen J. Turnbull
                         ` (2 more replies)
  0 siblings, 3 replies; 49+ messages in thread
From: Miles Bader @ 2009-06-08  5:22 UTC (permalink / raw)
  To: David De La Harpe Golden; +Cc: emacs-devel

David De La Harpe Golden <david@harpegolden.net> writes:
> ?  It was my understanding (which could be flawed) that applications
> never look at .Xdefaults, it's up to you to do an
>
> xrdb -merge .Xdefaults

No, ~/.Xdefaults is read directly by applications, without using the
server's database (which is what xrdb manipulates).

I like using it because I often used to forget to re-run xrdb after
making a change, and using .Xdefaults allows me to omit that step.

The "rules" (by my observation) are a bit bizarre:  If there's
_anything_ in the server's database, even entries for an unrelated
application, then ~/.Xdefaults is completely ignored, and only entries
from the server database are used; otherwise ~/.Xdefaults is used.

[Gnome's interfering entries aren't related to Emacs at all, it just
puts some random crap in there, but that's enough to screw up Emacs
too.]

You'd think it would be more useful to automagically _merge_ the server
database with the contents of ~/.Xdefaults, but that's not what the X
libraries do.

Anyway, thanks for the tip on getting Gnome to stop screwing things up;
I'll try it...

Thanks,

-Miles

-- 
"Don't just question authority,
Don't forget to question me."
-- Jello Biafra




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

* Re: What is the proper way to set the default font these days?
  2009-06-08  5:22     ` Miles Bader
@ 2009-06-08 14:21       ` Stephen J. Turnbull
  2009-06-08 14:59         ` Deniz Dogan
  2009-06-08 22:03       ` Johan Bockgård
  2009-06-12 17:14       ` James Cloos
  2 siblings, 1 reply; 49+ messages in thread
From: Stephen J. Turnbull @ 2009-06-08 14:21 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel, David De La Harpe Golden

Miles Bader writes:

 > David De La Harpe Golden <david@harpegolden.net> writes:
 > > ?  It was my understanding (which could be flawed) that applications
 > > never look at .Xdefaults, it's up to you to do an
 > >
 > > xrdb -merge .Xdefaults
 > 
 > No, ~/.Xdefaults is read directly by applications,

A behavior deprecated as of X11R5 in favor of using xrdb, which is
handled on the server side.

I guess there's nothing wrong with depending on Emacs reading
.Xdefaults if you want to (except for the fact that GNOME will not
respect your wishes), but that behavior has been obsolete for a long
time.

 > The "rules" (by my observation) are a bit bizarre:  If there's
 > _anything_ in the server's database, even entries for an unrelated
 > application, then ~/.Xdefaults is completely ignored, and only entries
 > from the server database are used; otherwise ~/.Xdefaults is used.

That's is indeed the defined behavior.  Specifically, Xlib reads
~/.Xdefaults if and only if *no resources at set at all* in the
RESOURCE_MANAGER property on the server's root window.

 > You'd think it would be more useful to automagically _merge_ the server
 > database with the contents of ~/.Xdefaults, but that's not what the X
 > libraries do.

The intent was to encourage users to migrate to the modern style,
which uniformly applies to remote clients as well as local ones (which
obviously the .Xdefaults file can't, since it's read by the client).

Why not just put

(lambda () (shell-command "xrdb -merge ~/.Xresources"))

on your save hook in xrdb buffers?





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

* Re: What is the proper way to set the default font these days?
  2009-06-08 14:21       ` Stephen J. Turnbull
@ 2009-06-08 14:59         ` Deniz Dogan
  2009-06-08 15:50           ` Chong Yidong
  0 siblings, 1 reply; 49+ messages in thread
From: Deniz Dogan @ 2009-06-08 14:59 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: David De La Harpe Golden, emacs-devel, Miles Bader

2009/6/8 Stephen J. Turnbull <stephen@xemacs.org>:
> Miles Bader writes:
>
>  > David De La Harpe Golden <david@harpegolden.net> writes:
>  > > ?  It was my understanding (which could be flawed) that applications
>  > > never look at .Xdefaults, it's up to you to do an
>  > >
>  > > xrdb -merge .Xdefaults
>  >
>  > No, ~/.Xdefaults is read directly by applications,
>
> A behavior deprecated as of X11R5 in favor of using xrdb, which is
> handled on the server side.
>
> I guess there's nothing wrong with depending on Emacs reading
> .Xdefaults if you want to (except for the fact that GNOME will not
> respect your wishes), but that behavior has been obsolete for a long
> time.
>
>  > The "rules" (by my observation) are a bit bizarre:  If there's
>  > _anything_ in the server's database, even entries for an unrelated
>  > application, then ~/.Xdefaults is completely ignored, and only entries
>  > from the server database are used; otherwise ~/.Xdefaults is used.
>
> That's is indeed the defined behavior.  Specifically, Xlib reads
> ~/.Xdefaults if and only if *no resources at set at all* in the
> RESOURCE_MANAGER property on the server's root window.
>
>  > You'd think it would be more useful to automagically _merge_ the server
>  > database with the contents of ~/.Xdefaults, but that's not what the X
>  > libraries do.
>
> The intent was to encourage users to migrate to the modern style,
> which uniformly applies to remote clients as well as local ones (which
> obviously the .Xdefaults file can't, since it's read by the client).
>
> Why not just put
>
> (lambda () (shell-command "xrdb -merge ~/.Xresources"))
>
> on your save hook in xrdb buffers?
>
>
>
>

So if we go back to the original question... What is the proper way to
set the font? :)

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-06-08 14:59         ` Deniz Dogan
@ 2009-06-08 15:50           ` Chong Yidong
  2009-06-08 16:17             ` Stephen J. Turnbull
  2009-06-08 22:15             ` What is the proper way to set the default font these days? Chad Brown
  0 siblings, 2 replies; 49+ messages in thread
From: Chong Yidong @ 2009-06-08 15:50 UTC (permalink / raw)
  To: Deniz Dogan
  Cc: Miles Bader, Stephen J. Turnbull, emacs-devel,
	David De La Harpe Golden

Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:

> So if we go back to the original question... What is the proper way to
> set the font? :)

I put

Emacs.Font: Monospace 9

in my .Xresources file.  That works with no problems.




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

* Re: What is the proper way to set the default font these days?
  2009-06-08 15:50           ` Chong Yidong
@ 2009-06-08 16:17             ` Stephen J. Turnbull
  2009-06-08 16:19               ` Chong Yidong
  2009-06-08 22:15             ` What is the proper way to set the default font these days? Chad Brown
  1 sibling, 1 reply; 49+ messages in thread
From: Stephen J. Turnbull @ 2009-06-08 16:17 UTC (permalink / raw)
  To: Chong Yidong
  Cc: David De La Harpe Golden, Miles Bader, emacs-devel, Deniz Dogan

Chong Yidong writes:

 > I put
 > 
 > Emacs.Font: Monospace 9
 > 
 > in my .Xresources file.  That works with no problems.

Shouldn't that be

Emacs.Font: Monospace-9






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

* Re: What is the proper way to set the default font these days?
  2009-06-08 16:17             ` Stephen J. Turnbull
@ 2009-06-08 16:19               ` Chong Yidong
  2009-06-08 16:28                 ` Deniz Dogan
  0 siblings, 1 reply; 49+ messages in thread
From: Chong Yidong @ 2009-06-08 16:19 UTC (permalink / raw)
  To: Stephen J. Turnbull
  Cc: David De La Harpe Golden, Miles Bader, emacs-devel, Deniz Dogan

"Stephen J. Turnbull" <stephen@xemacs.org> writes:

> Chong Yidong writes:
>
>  > I put
>  > 
>  > Emacs.Font: Monospace 9
>  > 
>  > in my .Xresources file.  That works with no problems.
>
> Shouldn't that be
>
> Emacs.Font: Monospace-9

Emacs recognizes both.  The former is in the GTK format, and the latter
is in the Fontconfig format.




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

* Re: What is the proper way to set the default font these days?
  2009-06-08 16:19               ` Chong Yidong
@ 2009-06-08 16:28                 ` Deniz Dogan
  2009-06-08 16:50                   ` Chong Yidong
  2009-06-10  9:17                   ` Deniz Dogan
  0 siblings, 2 replies; 49+ messages in thread
From: Deniz Dogan @ 2009-06-08 16:28 UTC (permalink / raw)
  To: Chong Yidong
  Cc: David De La Harpe Golden, Stephen J. Turnbull, emacs-devel,
	Miles Bader

2009/6/8 Chong Yidong <cyd@stupidchicken.com>:
> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>
>> Chong Yidong writes:
>>
>>  > I put
>>  >
>>  > Emacs.Font: Monospace 9
>>  >
>>  > in my .Xresources file.  That works with no problems.
>>
>> Shouldn't that be
>>
>> Emacs.Font: Monospace-9
>
> Emacs recognizes both.  The former is in the GTK format, and the latter
> is in the Fontconfig format.
>

Unfortunately, neither of the two methods work.  They did work in an
earlier version of Emacs 23, but that was a few months ago.  Anyways,
what I really would like to know is whether this is an Emacs bug or an
XMonad bug.  Any ideas?

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-06-08 16:28                 ` Deniz Dogan
@ 2009-06-08 16:50                   ` Chong Yidong
  2009-06-10  9:17                   ` Deniz Dogan
  1 sibling, 0 replies; 49+ messages in thread
From: Chong Yidong @ 2009-06-08 16:50 UTC (permalink / raw)
  To: Deniz Dogan
  Cc: David De La Harpe Golden, Stephen J. Turnbull, emacs-devel,
	Miles Bader

Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:

> Unfortunately, neither of the two methods work.  They did work in an
> earlier version of Emacs 23, but that was a few months ago.  Anyways,
> what I really would like to know is whether this is an Emacs bug or an
> XMonad bug.  Any ideas?

Sounds like an XMonad bug to me.  The best way to figure out is to
revert to an earlier version of Emacs 23, and see which change
introduced this problem; if you find that the earlier versions now all
have the problem, that means it's XMonad that's changed.




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

* Re: What is the proper way to set the default font these days?
  2009-06-08  5:22     ` Miles Bader
  2009-06-08 14:21       ` Stephen J. Turnbull
@ 2009-06-08 22:03       ` Johan Bockgård
  2009-06-12 17:14       ` James Cloos
  2 siblings, 0 replies; 49+ messages in thread
From: Johan Bockgård @ 2009-06-08 22:03 UTC (permalink / raw)
  To: emacs-devel

Miles Bader <miles@gnu.org> writes:

> I like using it because I often used to forget to re-run xrdb after
> making a change, and using .Xdefaults allows me to omit that step.

    XENVIRONMENT
       This must point to a file containing X resources. The default is
       $HOME/.Xdefaults-<hostname>.  Unlike /usr/lib/X11/Xresources, it
       is consulted each time an X application starts.






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

* Re: What is the proper way to set the default font these days?
  2009-06-08 15:50           ` Chong Yidong
  2009-06-08 16:17             ` Stephen J. Turnbull
@ 2009-06-08 22:15             ` Chad Brown
  2009-06-08 22:40               ` David Reitter
  2009-06-09  3:04               ` Eli Zaretskii
  1 sibling, 2 replies; 49+ messages in thread
From: Chad Brown @ 2009-06-08 22:15 UTC (permalink / raw)
  To: Emacs-Devel devel

>> So if we go back to the original question... What is the proper way  
>> to
>> set the font? :)
>
> Emacs.Font: Monospace 9
>
> in my .Xresources file.  That works with no problems.

I am curious:  is there a way to do a similar thing under non-X  
systems like macosx or win32?

*chad





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

* Re: What is the proper way to set the default font these days?
  2009-06-08 22:15             ` What is the proper way to set the default font these days? Chad Brown
@ 2009-06-08 22:40               ` David Reitter
  2009-06-09  0:42                 ` Miles Bader
  2009-06-09  3:04               ` Eli Zaretskii
  1 sibling, 1 reply; 49+ messages in thread
From: David Reitter @ 2009-06-08 22:40 UTC (permalink / raw)
  To: Chad Brown; +Cc: Emacs-Devel devel

On Jun 8, 2009, at 6:15 PM, Chad Brown wrote:
> I am curious:  is there a way to do a similar thing under non-X  
> systems like macosx or win32?


The Nextstep port (for OS X) had a way to emulate X resources, which  
has since been removed because it didn't actually add enough useful  
functionality to merit the overhead.  The right way to set a default  
font is IMHO to customize the `default' face in one way or the other.

You can also give a command line argument when actually running a  
terminal:

Emacs.app/Contents/MacOS/Emacs -fn Lucida\ Grande

However, this is of limited practical use because in normal use (at  
least in OS X - not sure about Nextstep in GNU/Linux environments) you  
wouldn't start the executable that way (even from a terminal).

I've never seen the kind of issues in NS (or Carbon, for that matter)  
that the OP encountered in the screenshot.





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

* Re: What is the proper way to set the default font these days?
  2009-06-08 22:40               ` David Reitter
@ 2009-06-09  0:42                 ` Miles Bader
  2009-06-10 22:07                   ` Stefan Monnier
  0 siblings, 1 reply; 49+ messages in thread
From: Miles Bader @ 2009-06-09  0:42 UTC (permalink / raw)
  To: emacs-devel

David Reitter <david.reitter@gmail.com> writes:
>> I am curious:  is there a way to do a similar thing under non-X 
>> systems like macosx or win32?
>
> The Nextstep port (for OS X) had a way to emulate X resources, which has
> since been removed because it didn't actually add enough useful
> functionality to merit the overhead.  The right way to set a default
> font is IMHO to customize the `default' face in one way or the other.

I agree, but at least on X, that leads to annoying frame-thrashing on
startup.

[Of course, such frame-thrashing is just stupid, and we really should
delay mapping the initial frame to avoid it, but nonetheless it's the
current reality...]

-Miles

-- 
Ich bin ein Virus. Mach' mit und kopiere mich in Deine .signature.





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

* Re: What is the proper way to set the default font these days?
  2009-06-08 22:15             ` What is the proper way to set the default font these days? Chad Brown
  2009-06-08 22:40               ` David Reitter
@ 2009-06-09  3:04               ` Eli Zaretskii
  1 sibling, 0 replies; 49+ messages in thread
From: Eli Zaretskii @ 2009-06-09  3:04 UTC (permalink / raw)
  To: Chad Brown; +Cc: emacs-devel

> From: Chad Brown <yandros@MIT.EDU>
> Date: Mon, 8 Jun 2009 15:15:25 -0700
> 
> > Emacs.Font: Monospace 9
> >
> > in my .Xresources file.  That works with no problems.
> 
> I am curious:  is there a way to do a similar thing under non-X  
> systems like macosx or win32?

On MS-Windows, you should be able to put such settings into the
Registry.  See the Emacs manual for the details.




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

* Re: What is the proper way to set the default font these days?
  2009-06-08 16:28                 ` Deniz Dogan
  2009-06-08 16:50                   ` Chong Yidong
@ 2009-06-10  9:17                   ` Deniz Dogan
  2009-06-10 13:37                     ` Miles Bader
  2009-06-10 15:52                     ` Chong Yidong
  1 sibling, 2 replies; 49+ messages in thread
From: Deniz Dogan @ 2009-06-10  9:17 UTC (permalink / raw)
  To: Chong Yidong
  Cc: David De La Harpe Golden, Stephen J. Turnbull, emacs-devel,
	Miles Bader

2009/6/8 Deniz Dogan <deniz.a.m.dogan@gmail.com>:
> 2009/6/8 Chong Yidong <cyd@stupidchicken.com>:
>> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>>
>>> Chong Yidong writes:
>>>
>>>  > I put
>>>  >
>>>  > Emacs.Font: Monospace 9
>>>  >
>>>  > in my .Xresources file.  That works with no problems.
>>>
>>> Shouldn't that be
>>>
>>> Emacs.Font: Monospace-9
>>
>> Emacs recognizes both.  The former is in the GTK format, and the latter
>> is in the Fontconfig format.
>>
>
> Unfortunately, neither of the two methods work.  They did work in an
> earlier version of Emacs 23, but that was a few months ago.  Anyways,
> what I really would like to know is whether this is an Emacs bug or an
> XMonad bug.  Any ideas?
>
> --
> Deniz Dogan
>

Having talked to some people on the XMonad mailing list, it seems that
it is probably Emacs that has the bug in this case. I'm starting Emacs
using "emacs -Q" with .Xdefaults and .Xresources completely empty and
even then things are off! Could it be anything else on my computer
breaking this? This is when using a fresh CVS checkout.

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-06-10  9:17                   ` Deniz Dogan
@ 2009-06-10 13:37                     ` Miles Bader
  2009-06-10 14:08                       ` Deniz Dogan
  2009-06-10 15:52                     ` Chong Yidong
  1 sibling, 1 reply; 49+ messages in thread
From: Miles Bader @ 2009-06-10 13:37 UTC (permalink / raw)
  To: emacs-devel

Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:
> Having talked to some people on the XMonad mailing list, it seems that
> it is probably Emacs that has the bug in this case. I'm starting Emacs
> using "emacs -Q" with .Xdefaults and .Xresources completely empty and
> even then things are off! Could it be anything else on my computer
> breaking this? This is when using a fresh CVS checkout.

Can you provide an exact recipe for recreating the problem?

As .Xresources is merely used to initialize the server's resource
database, are you sure that's happening?

Try the following:

   cd /tmp
   xrdb -remove
   echo 'Emacs*Font: Monospace 9' | xrdb
   HOME=/tmp emacs -Q &

-Miles

-- 
"Though they may have different meanings, the cries of 'Yeeeee-haw!' and
 'Allahu akbar!' are, in spirit, not actually all that different."





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

* Re: What is the proper way to set the default font these days?
  2009-06-10 13:37                     ` Miles Bader
@ 2009-06-10 14:08                       ` Deniz Dogan
  0 siblings, 0 replies; 49+ messages in thread
From: Deniz Dogan @ 2009-06-10 14:08 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

2009/6/10 Miles Bader <miles@gnu.org>:
> Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:
>> Having talked to some people on the XMonad mailing list, it seems that
>> it is probably Emacs that has the bug in this case. I'm starting Emacs
>> using "emacs -Q" with .Xdefaults and .Xresources completely empty and
>> even then things are off! Could it be anything else on my computer
>> breaking this? This is when using a fresh CVS checkout.
>
> Can you provide an exact recipe for recreating the problem?
>
> As .Xresources is merely used to initialize the server's resource
> database, are you sure that's happening?
>
> Try the following:
>
>   cd /tmp
>   xrdb -remove
>   echo 'Emacs*Font: Monospace 9' | xrdb
>   HOME=/tmp emacs -Q &
>
> -Miles

Thank you for the straight-forward instructions! However, this was
unsuccessful as well. It's not the exact same problem, but it's still
off, not displaying the echo area or the modeline.

Screenshot:
http://img229.imageshack.us/img229/4117/200906101606201280x800s.png

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-06-10  9:17                   ` Deniz Dogan
  2009-06-10 13:37                     ` Miles Bader
@ 2009-06-10 15:52                     ` Chong Yidong
  2009-06-10 15:59                       ` Deniz Dogan
  2009-06-29 11:44                       ` gtk toolbar bug (was Re: What is the proper way to set the default font these days?) Bruce Stephens
  1 sibling, 2 replies; 49+ messages in thread
From: Chong Yidong @ 2009-06-10 15:52 UTC (permalink / raw)
  To: Deniz Dogan
  Cc: David De La Harpe Golden, Stephen J. Turnbull, emacs-devel,
	Miles Bader

Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:

> Having talked to some people on the XMonad mailing list, it seems that
> it is probably Emacs that has the bug in this case.

What's the reasoning behind this conclusion?

It sounds like you have two separate issues: (i) font setting in X
resources not being recognized, and (ii) incorrect window sizing.  It's
plausible that (ii) is an Emacs bug, since interaction with window
managers is a tricky issue; one thing you can try is to compile Emacs
without GTK support, and see if that makes a difference.

But as for (i), I find it hard to imagine how this can be an Emacs bug.
On typical systems (such as Gnome desktops), Emacs has no problem
detecting X resources.  It seems more likely that either Xmonad or
something else on your system is screwing up the xrdb.  If you specify X
resources for, say, xterm, are they applied correctly?  For example:

xterm*font:-misc-fixed-medium-*-*-*-14-*-*-*-*-*-*-*




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

* Re: What is the proper way to set the default font these days?
  2009-06-10 15:52                     ` Chong Yidong
@ 2009-06-10 15:59                       ` Deniz Dogan
  2009-06-29 11:44                       ` gtk toolbar bug (was Re: What is the proper way to set the default font these days?) Bruce Stephens
  1 sibling, 0 replies; 49+ messages in thread
From: Deniz Dogan @ 2009-06-10 15:59 UTC (permalink / raw)
  To: Chong Yidong
  Cc: David De La Harpe Golden, Stephen J. Turnbull, emacs-devel,
	Miles Bader

2009/6/10 Chong Yidong <cyd@stupidchicken.com>:
> Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:
>
>> Having talked to some people on the XMonad mailing list, it seems that
>> it is probably Emacs that has the bug in this case.
>
> What's the reasoning behind this conclusion?
>
> It sounds like you have two separate issues: (i) font setting in X
> resources not being recognized, and (ii) incorrect window sizing.
> [...]
> But as for (i), I find it hard to imagine how this can be an Emacs bug.
> [...]

I apologize. I should have been more clear about the fact that setting
the font in .Xdefaults works just fine, but the window sizing doesn't.

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-06-09  0:42                 ` Miles Bader
@ 2009-06-10 22:07                   ` Stefan Monnier
  2009-06-11  0:25                     ` Miles Bader
  0 siblings, 1 reply; 49+ messages in thread
From: Stefan Monnier @ 2009-06-10 22:07 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

> I agree, but at least on X, that leads to annoying frame-thrashing on
> startup.

> [Of course, such frame-thrashing is just stupid, and we really should
> delay mapping the initial frame to avoid it, but nonetheless it's the
> current reality...]

I believe you can avoid the frame thrashing now, by using the
emacs-daemon ;-)


        Stefan





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

* Re: What is the proper way to set the default font these days?
  2009-06-10 22:07                   ` Stefan Monnier
@ 2009-06-11  0:25                     ` Miles Bader
  0 siblings, 0 replies; 49+ messages in thread
From: Miles Bader @ 2009-06-11  0:25 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I agree, but at least on X, that leads to annoying frame-thrashing on
>> startup.
>
> I believe you can avoid the frame thrashing now, by using the
> emacs-daemon ;-)

Hmmm, that works (at first glance anyway).
[Using the command:  emacsclient -a '' -c -n]

I do notice a few issues:

  (1) Mode-line contains an "@", apparently meaning "emacsclient-invoked"

      When using this method of startup, _everything_ is
      emacsclient-invoked, so the "@" indicator is pointless

      Pointless indicators are annoying regardless, but this one is
      especially annoying because a mode-line "@" is _also_ used by
      tramp to indicate that the cwd of a buffer is "remote" (and that's
      the sense I'm used to, so seeing "@" in the mode-line triggers
      "uh-oh" instincts).

      It seems that it should be used more judiciously -- e.g., only for
      frames corresponding to files or for which -n wasn't specified.

      I don't know the exact formulation, but anyway, something that
      actually makes it useful instead of distracting.

      Maybe the potential confusion with tramp usage is also worth
      addressing.

  (2) The startup message "When done with this frame, type C-x 5 0" is
      vaguely irritating -- again, it seems aimed at "short-lived"
      invocations.

  (3) I'm not sure what I think about being able to delete the last
      frame; I guess I'd get used to it since it doesn't lose state...

-Miles

-- 
Once, adj. Enough.





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

* Re: What is the proper way to set the default font these days?
  2009-06-08  5:22     ` Miles Bader
  2009-06-08 14:21       ` Stephen J. Turnbull
  2009-06-08 22:03       ` Johan Bockgård
@ 2009-06-12 17:14       ` James Cloos
  2009-06-12 21:00         ` Stefan Monnier
  2009-06-15  3:29         ` Miles Bader
  2 siblings, 2 replies; 49+ messages in thread
From: James Cloos @ 2009-06-12 17:14 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel, David De La Harpe Golden

>>>>> "Miles" == Miles Bader <miles@gnu.org> writes:

Miles> The "rules" (by my observation) are a bit bizarre: If there's
Miles> _anything_ in the server's database, even entries for an
Miles> unrelated application, then ~/.Xdefaults is completely ignored,
Miles> and only entries from the server database are used; otherwise
Miles> ~/.Xdefaults is used.

After the above, then ~/.Xdefaults-$HOSTNAME is always read.

The idea is that ~/.Xdefaults-$HOSTNAME is for settings which are
specific to one client machine and the server's database for settings
which are specific to one server.  Reading ~/.Xdefaults is a backup
measure for the cases where the user does not have a $HOME on the
server.

Obviously this distinction is more useful when one has multiple boxen
with a shared /home (eg by nfs) and uses X over tcp.  (That was a very
common setup when the coding was done.)

This logic is in libX11, for those who'd like to read the src.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6




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

* Re: What is the proper way to set the default font these days?
  2009-06-12 17:14       ` James Cloos
@ 2009-06-12 21:00         ` Stefan Monnier
  2009-06-15  3:29         ` Miles Bader
  1 sibling, 0 replies; 49+ messages in thread
From: Stefan Monnier @ 2009-06-12 21:00 UTC (permalink / raw)
  To: James Cloos; +Cc: David De La Harpe Golden, emacs-devel, Miles Bader

> Reading ~/.Xdefaults is a backup measure for the cases where the user
> does not have a $HOME on the server.

Originally it was simply for settings which are specific to the client
rather than to the server (e.g. ~/.Xdefaults could contain filenames,
whereas having them in the xrdb database wouldn't make much sense).
Nowadays this would also make a lot of sense for font names since
fontconfig and friends handle fonts on the client side, so the server
can't know which fonts are avail to which clients.


        Stefan




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

* Re: What is the proper way to set the default font these days?
  2009-06-12 17:14       ` James Cloos
  2009-06-12 21:00         ` Stefan Monnier
@ 2009-06-15  3:29         ` Miles Bader
  2009-07-01 22:35           ` Deniz Dogan
  1 sibling, 1 reply; 49+ messages in thread
From: Miles Bader @ 2009-06-15  3:29 UTC (permalink / raw)
  To: James Cloos; +Cc: David De La Harpe Golden, emacs-devel

James Cloos <cloos@jhcloos.com> writes:
> Miles> The "rules" (by my observation) are a bit bizarre: If there's
> Miles> _anything_ in the server's database, even entries for an
> Miles> unrelated application, then ~/.Xdefaults is completely ignored,
> Miles> and only entries from the server database are used; otherwise
> Miles> ~/.Xdefaults is used.
>
> After the above, then ~/.Xdefaults-$HOSTNAME is always read.
>
> The idea is that ~/.Xdefaults-$HOSTNAME is for settings which are
> specific to one client machine and the server's database for settings
> which are specific to one server.  Reading ~/.Xdefaults is a backup
> measure for the cases where the user does not have a $HOME on the
> server.
>
> Obviously this distinction is more useful when one has multiple boxen
> with a shared /home (eg by nfs) and uses X over tcp.  (That was a very
> common setup when the coding was done.)

Sure, but... now it's not.

The whole thing feels very kludgey, like they had some clever ideas
about generalizing things, but didn't spend much time trying to _debug_
those ideas to catch potential downsides and get rid of the rough edges.

[Sadly, much of the X infrastructure feels like that...]

-miles

-- 
"Suppose we've chosen the wrong god. Every time we go to church we're
just making him madder and madder." -- Homer Simpson




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

* gtk toolbar bug  (was Re: What is the proper way to set the default font these days?)
  2009-06-10 15:52                     ` Chong Yidong
  2009-06-10 15:59                       ` Deniz Dogan
@ 2009-06-29 11:44                       ` Bruce Stephens
  2009-06-29 17:49                         ` Deniz Dogan
  1 sibling, 1 reply; 49+ messages in thread
From: Bruce Stephens @ 2009-06-29 11:44 UTC (permalink / raw)
  To: emacs-devel

Chong Yidong <cyd@stupidchicken.com> writes:

> Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:
>
>> Having talked to some people on the XMonad mailing list, it seems that
>> it is probably Emacs that has the bug in this case.
>
> What's the reasoning behind this conclusion?
>
> It sounds like you have two separate issues: (i) font setting in X
> resources not being recognized, and (ii) incorrect window sizing.  It's
> plausible that (ii) is an Emacs bug, since interaction with window
> managers is a tricky issue; one thing you can try is to compile Emacs
> without GTK support, and see if that makes a difference.

For (ii), GTK does make a difference.  I built using
--with-x-toolkit=lucid, and "emacs -Q" shows no problem (I can see a
toolbar and the minibuffer).  With gtk, I see the toolbar, but the frame
is obviously too tall and I don't see the minibuffer.

It is as though the frame is being displayed correctly without the
toolbar, and then the toolbar is just added moving the rest down,
without the proper interaction with the window manager to readjust the
size.

[...]





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

* Re: gtk toolbar bug (was Re: What is the proper way to set the  default font these days?)
  2009-06-29 11:44                       ` gtk toolbar bug (was Re: What is the proper way to set the default font these days?) Bruce Stephens
@ 2009-06-29 17:49                         ` Deniz Dogan
  2009-06-29 19:30                           ` gtk toolbar bug Bruce Stephens
  0 siblings, 1 reply; 49+ messages in thread
From: Deniz Dogan @ 2009-06-29 17:49 UTC (permalink / raw)
  To: Bruce Stephens; +Cc: emacs-devel

2009/6/29 Bruce Stephens <bruce.stephens@isode.com>:
> Chong Yidong <cyd@stupidchicken.com> writes:
>
>> Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:
>>
>>> Having talked to some people on the XMonad mailing list, it seems that
>>> it is probably Emacs that has the bug in this case.
>>
>> What's the reasoning behind this conclusion?
>>
>> It sounds like you have two separate issues: (i) font setting in X
>> resources not being recognized, and (ii) incorrect window sizing.  It's
>> plausible that (ii) is an Emacs bug, since interaction with window
>> managers is a tricky issue; one thing you can try is to compile Emacs
>> without GTK support, and see if that makes a difference.
>
> For (ii), GTK does make a difference.  I built using
> --with-x-toolkit=lucid, and "emacs -Q" shows no problem (I can see a
> toolbar and the minibuffer).  With gtk, I see the toolbar, but the frame
> is obviously too tall and I don't see the minibuffer.
>
> It is as though the frame is being displayed correctly without the
> toolbar, and then the toolbar is just added moving the rest down,
> without the proper interaction with the window manager to readjust the
> size.
>
> [...]
>
>
>
>

Finally someone who managed to reproduce it other than me! I have this
exact problem! Any solutions around?

-- 
Deniz Dogan




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

* Re: gtk toolbar bug
  2009-06-29 17:49                         ` Deniz Dogan
@ 2009-06-29 19:30                           ` Bruce Stephens
  2009-06-29 21:37                             ` Bruce Stephens
  0 siblings, 1 reply; 49+ messages in thread
From: Bruce Stephens @ 2009-06-29 19:30 UTC (permalink / raw)
  To: emacs-devel

Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:

> 2009/6/29 Bruce Stephens <bruce.stephens@isode.com>:

[...]

>> It is as though the frame is being displayed correctly without the
>> toolbar, and then the toolbar is just added moving the rest down,
>> without the proper interaction with the window manager to readjust the
>> size.
>>
>> [...]

> Finally someone who managed to reproduce it other than me! I have this
> exact problem! Any solutions around?

My apologies.  I thought I'd said I could see the problem (though
perhaps only on the xmonad mailing list, which wouldn't help Emacs, of
course).

Anyway, I hope the information that it occurs with gtk but not with
lucid might suggest what's happening.

In the meantime I don't have any suggestions other than the obvious
ones: build with lucid (or some other toolkit other than gtk), turn off
toolbars, don't use xmonad, don't worry too much about it (the problem
resolves itself when the frame is resized).




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

* Re: gtk toolbar bug
  2009-06-29 19:30                           ` gtk toolbar bug Bruce Stephens
@ 2009-06-29 21:37                             ` Bruce Stephens
  2009-06-30 14:42                               ` Jan Djärv
  0 siblings, 1 reply; 49+ messages in thread
From: Bruce Stephens @ 2009-06-29 21:37 UTC (permalink / raw)
  To: emacs-devel

Bruce Stephens <bruce.stephens@isode.com> writes:

[...]

> Anyway, I hope the information that it occurs with gtk but not with
> lucid might suggest what's happening.

This seems to fix it for me.  (I offer this more as further information
that might suggest a proper resolution than as a proposed patch;
presumably the function call is there for a good reason.)

--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -733,7 +733,7 @@ xg_frame_set_char_size (f, cols, rows)
      Turn wm hints (min/max size and size increments) of temporarly.
      It interferes too much, when for example adding or removing the
      menu/tool bar.  */
-  x_wm_size_hint_off (f);
+  /*  x_wm_size_hint_off (f);*/
   gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
                      pixelwidth, pixelheight);




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

* Re: gtk toolbar bug
  2009-06-29 21:37                             ` Bruce Stephens
@ 2009-06-30 14:42                               ` Jan Djärv
  2009-07-01 14:10                                 ` Jan Djärv
  0 siblings, 1 reply; 49+ messages in thread
From: Jan Djärv @ 2009-06-30 14:42 UTC (permalink / raw)
  To: Bruce Stephens; +Cc: emacs-devel

Thanks for the hint. It solves this particular problem, but introduces others.
I can see the problem, I'm working on a solution now.

	Jan D.


Bruce Stephens skrev:
> Bruce Stephens <bruce.stephens@isode.com> writes:
> 
> [...]
> 
>> Anyway, I hope the information that it occurs with gtk but not with
>> lucid might suggest what's happening.
> 
> This seems to fix it for me.  (I offer this more as further information
> that might suggest a proper resolution than as a proposed patch;
> presumably the function call is there for a good reason.)
> 
> --- a/src/gtkutil.c
> +++ b/src/gtkutil.c
> @@ -733,7 +733,7 @@ xg_frame_set_char_size (f, cols, rows)
>       Turn wm hints (min/max size and size increments) of temporarly.
>       It interferes too much, when for example adding or removing the
>       menu/tool bar.  */
> -  x_wm_size_hint_off (f);
> +  /*  x_wm_size_hint_off (f);*/
>    gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
>                       pixelwidth, pixelheight);
> 





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

* Re: gtk toolbar bug
  2009-06-30 14:42                               ` Jan Djärv
@ 2009-07-01 14:10                                 ` Jan Djärv
  2009-07-01 15:25                                   ` Bruce Stephens
  0 siblings, 1 reply; 49+ messages in thread
From: Jan Djärv @ 2009-07-01 14:10 UTC (permalink / raw)
  To: Bruce Stephens, deniz.a.m.dogan; +Cc: emacs-devel

Hello.

Can you please test Emacs now?  I figure it is faster than me installing Xmonad.

Thanks,

	Jan D.

Jan Djärv skrev:
> Thanks for the hint. It solves this particular problem, but introduces 
> others.
> I can see the problem, I'm working on a solution now.
> 
>     Jan D.
> 
> 
> Bruce Stephens skrev:
>> Bruce Stephens <bruce.stephens@isode.com> writes:
>>
>> [...]
>>
>>> Anyway, I hope the information that it occurs with gtk but not with
>>> lucid might suggest what's happening.
>>
>> This seems to fix it for me.  (I offer this more as further information
>> that might suggest a proper resolution than as a proposed patch;
>> presumably the function call is there for a good reason.)
>>
>> --- a/src/gtkutil.c
>> +++ b/src/gtkutil.c
>> @@ -733,7 +733,7 @@ xg_frame_set_char_size (f, cols, rows)
>>       Turn wm hints (min/max size and size increments) of temporarly.
>>       It interferes too much, when for example adding or removing the
>>       menu/tool bar.  */
>> -  x_wm_size_hint_off (f);
>> +  /*  x_wm_size_hint_off (f);*/
>>    gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
>>                       pixelwidth, pixelheight);
>>
> 
> 





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

* Re: gtk toolbar bug
  2009-07-01 14:10                                 ` Jan Djärv
@ 2009-07-01 15:25                                   ` Bruce Stephens
  0 siblings, 0 replies; 49+ messages in thread
From: Bruce Stephens @ 2009-07-01 15:25 UTC (permalink / raw)
  To: Jan Djärv; +Cc: emacs-devel, deniz.a.m.dogan

Jan Djärv <jan.h.d@swipnet.se> writes:

> Hello.
>
> Can you please test Emacs now?

Thanks, I believe you've fixed the problem.  It works fine for me now.

[...]





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

* Re: What is the proper way to set the default font these days?
  2009-06-15  3:29         ` Miles Bader
@ 2009-07-01 22:35           ` Deniz Dogan
  2009-07-02  6:44             ` Jan Djärv
  0 siblings, 1 reply; 49+ messages in thread
From: Deniz Dogan @ 2009-07-01 22:35 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel, James Cloos, David De La Harpe Golden

Using the latest CVS checkout, I think I have been able to more
precisely point out what is going wrong on my computer with XMonad and
Emacs. All of the following instructions happen without anything in
.Xdefaults (.Xresources doesn't exist).

I start Emacs like one normally does, with .emacs removing fringes,
the scrollbar, the menubar and the toolbar. This comes up:
http://pici.se/pictures/pXCGsmQpd.png

Then I modify ~/.emacs, commenting out any removal of fringes, etc.
http://pici.se/pictures/avxrLUQYn.png

It should be pretty clear looking at the pictures that the "offset" in
the first picture is caused from not "updating" the sizes or whatever
after having evaluated ~/.emacs. How do I force this?

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-07-01 22:35           ` Deniz Dogan
@ 2009-07-02  6:44             ` Jan Djärv
  2009-07-02  7:45               ` Deniz Dogan
  2009-07-02  7:54               ` Jan Djärv
  0 siblings, 2 replies; 49+ messages in thread
From: Jan Djärv @ 2009-07-02  6:44 UTC (permalink / raw)
  To: Deniz Dogan
  Cc: David De La Harpe Golden, emacs-devel, James Cloos, Miles Bader

Deniz Dogan skrev:
> Using the latest CVS checkout, I think I have been able to more
> precisely point out what is going wrong on my computer with XMonad and
> Emacs. All of the following instructions happen without anything in
> .Xdefaults (.Xresources doesn't exist).
> 
> I start Emacs like one normally does, with .emacs removing fringes,
> the scrollbar, the menubar and the toolbar. This comes up:
> http://pici.se/pictures/pXCGsmQpd.png
> 
> Then I modify ~/.emacs, commenting out any removal of fringes, etc.
> http://pici.se/pictures/avxrLUQYn.png
> 
> It should be pretty clear looking at the pictures that the "offset" in
> the first picture is caused from not "updating" the sizes or whatever
> after having evaluated ~/.emacs. How do I force this?
> 

Emacs relies on the window manager/X server to send ConfigureNotify events 
when the size changes.  Somehow it is missing some events or events are not 
being sent.  The way to force it is to resize the frame a bit.
Does this happen if you start Emacs normally and then by invoking the proper 
commands by hand, remove toolbar and so on?

	Jan D.





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

* Re: What is the proper way to set the default font these days?
  2009-07-02  6:44             ` Jan Djärv
@ 2009-07-02  7:45               ` Deniz Dogan
  2009-07-02  8:23                 ` Jan Djärv
  2009-07-02  7:54               ` Jan Djärv
  1 sibling, 1 reply; 49+ messages in thread
From: Deniz Dogan @ 2009-07-02  7:45 UTC (permalink / raw)
  To: Jan Djärv
  Cc: David De La Harpe Golden, emacs-devel, James Cloos, Miles Bader

2009/7/2 Jan Djärv <jan.h.d@swipnet.se>:
> Deniz Dogan skrev:
>>
>> Using the latest CVS checkout, I think I have been able to more
>> precisely point out what is going wrong on my computer with XMonad and
>> Emacs. All of the following instructions happen without anything in
>> .Xdefaults (.Xresources doesn't exist).
>>
>> I start Emacs like one normally does, with .emacs removing fringes,
>> the scrollbar, the menubar and the toolbar. This comes up:
>> http://pici.se/pictures/pXCGsmQpd.png
>>
>> Then I modify ~/.emacs, commenting out any removal of fringes, etc.
>> http://pici.se/pictures/avxrLUQYn.png
>>
>> It should be pretty clear looking at the pictures that the "offset" in
>> the first picture is caused from not "updating" the sizes or whatever
>> after having evaluated ~/.emacs. How do I force this?
>>
>
> Emacs relies on the window manager/X server to send ConfigureNotify events
> when the size changes.  Somehow it is missing some events or events are not
> being sent.  The way to force it is to resize the frame a bit.
> Does this happen if you start Emacs normally and then by invoking the proper
> commands by hand, remove toolbar and so on?

If I remove them "manually" after startup, the problem doesn't occur.
What's weird is still like I said before that everything worked fine
in a previous version of Emacs 23. Unfortunately, figuring out in
which exact revision this problem started occurring is rather
cumbersome, especially for me since I know very little about CVS.

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-07-02  6:44             ` Jan Djärv
  2009-07-02  7:45               ` Deniz Dogan
@ 2009-07-02  7:54               ` Jan Djärv
  2009-07-02  8:02                 ` Deniz Dogan
  2009-07-21 15:14                 ` Bruce Stephens
  1 sibling, 2 replies; 49+ messages in thread
From: Jan Djärv @ 2009-07-02  7:54 UTC (permalink / raw)
  To: Deniz Dogan
  Cc: Miles Bader, emacs-devel, James Cloos, David De La Harpe Golden

Jan Djärv skrev:
> Deniz Dogan skrev:
>> Using the latest CVS checkout, I think I have been able to more
>> precisely point out what is going wrong on my computer with XMonad and
>> Emacs. All of the following instructions happen without anything in
>> .Xdefaults (.Xresources doesn't exist).
>>
>> I start Emacs like one normally does, with .emacs removing fringes,
>> the scrollbar, the menubar and the toolbar. This comes up:
>> http://pici.se/pictures/pXCGsmQpd.png
>>
>> Then I modify ~/.emacs, commenting out any removal of fringes, etc.
>> http://pici.se/pictures/avxrLUQYn.png
>>
>> It should be pretty clear looking at the pictures that the "offset" in
>> the first picture is caused from not "updating" the sizes or whatever
>> after having evaluated ~/.emacs. How do I force this?
>>
> 
> Emacs relies on the window manager/X server to send ConfigureNotify 
> events when the size changes.  Somehow it is missing some events or 
> events are not being sent.  The way to force it is to resize the frame a 
> bit.
> Does this happen if you start Emacs normally and then by invoking the 
> proper commands by hand, remove toolbar and so on?
> 

Never mind, I found the error. Emacs kind of assumes the window manager will 
eventually honor a resize request Emacs does.  XMonad breaks this assumtion.
Try it now.

	Jan D.





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

* Re: What is the proper way to set the default font these days?
  2009-07-02  7:54               ` Jan Djärv
@ 2009-07-02  8:02                 ` Deniz Dogan
  2009-07-02 10:38                   ` Jan Djärv
  2009-07-21 15:14                 ` Bruce Stephens
  1 sibling, 1 reply; 49+ messages in thread
From: Deniz Dogan @ 2009-07-02  8:02 UTC (permalink / raw)
  To: Jan Djärv
  Cc: Miles Bader, emacs-devel, James Cloos, David De La Harpe Golden

2009/7/2 Jan Djärv <jan.h.d@swipnet.se>:
> Jan Djärv skrev:
>>
>> Deniz Dogan skrev:
>>>
>>> Using the latest CVS checkout, I think I have been able to more
>>> precisely point out what is going wrong on my computer with XMonad and
>>> Emacs. All of the following instructions happen without anything in
>>> .Xdefaults (.Xresources doesn't exist).
>>>
>>> I start Emacs like one normally does, with .emacs removing fringes,
>>> the scrollbar, the menubar and the toolbar. This comes up:
>>> http://pici.se/pictures/pXCGsmQpd.png
>>>
>>> Then I modify ~/.emacs, commenting out any removal of fringes, etc.
>>> http://pici.se/pictures/avxrLUQYn.png
>>>
>>> It should be pretty clear looking at the pictures that the "offset" in
>>> the first picture is caused from not "updating" the sizes or whatever
>>> after having evaluated ~/.emacs. How do I force this?
>>>
>>
>> Emacs relies on the window manager/X server to send ConfigureNotify events
>> when the size changes.  Somehow it is missing some events or events are not
>> being sent.  The way to force it is to resize the frame a bit.
>> Does this happen if you start Emacs normally and then by invoking the
>> proper commands by hand, remove toolbar and so on?
>>
>
> Never mind, I found the error. Emacs kind of assumes the window manager will
> eventually honor a resize request Emacs does.  XMonad breaks this assumtion.
> Try it now.

Unfortunately, still no cigar. I really wish I could help out more
with this than just tell you whether it "works" or not... :/

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-07-02  7:45               ` Deniz Dogan
@ 2009-07-02  8:23                 ` Jan Djärv
  2009-07-02  9:19                   ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 49+ messages in thread
From: Jan Djärv @ 2009-07-02  8:23 UTC (permalink / raw)
  To: Deniz Dogan
  Cc: Miles Bader, emacs-devel, James Cloos, David De La Harpe Golden

Deniz Dogan skrev:
> If I remove them "manually" after startup, the problem doesn't occur.
> What's weird is still like I said before that everything worked fine
> in a previous version of Emacs 23. Unfortunately, figuring out in
> which exact revision this problem started occurring is rather
> cumbersome, especially for me since I know very little about CVS.
> 

This particular behaviour was introduced by a patch made in May.  It was to 
solve another problem (bug 2401).  I think I have them both covered now.

	Jan D.





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

* Re: What is the proper way to set the default font these days?
  2009-07-02  8:23                 ` Jan Djärv
@ 2009-07-02  9:19                   ` YAMAMOTO Mitsuharu
  2009-07-02 10:59                     ` Jan Djärv
  0 siblings, 1 reply; 49+ messages in thread
From: YAMAMOTO Mitsuharu @ 2009-07-02  9:19 UTC (permalink / raw)
  To: Jan Djärv
  Cc: David De La Harpe Golden, Miles Bader, emacs-devel, James Cloos,
	Deniz Dogan

>>>>> On Thu, 02 Jul 2009 10:23:32 +0200, Jan Djärv <jan.h.d@swipnet.se> said:

>> If I remove them "manually" after startup, the problem doesn't
>> occur.  What's weird is still like I said before that everything
>> worked fine in a previous version of Emacs 23. Unfortunately,
>> figuring out in which exact revision this problem started occurring
>> is rather cumbersome, especially for me since I know very little
>> about CVS.

> This particular behaviour was introduced by a patch made in May.  It
> was to solve another problem (bug 2401).  I think I have them both
> covered now.

Could you also take a look at the Bug#2980 (invisible frame) case that
was supposed to be fixed by the patch in May?  Also, there seems to be
a debug code remaining in xg_frame_resized.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




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

* Re: What is the proper way to set the default font these days?
  2009-07-02  8:02                 ` Deniz Dogan
@ 2009-07-02 10:38                   ` Jan Djärv
  2009-07-02 11:58                     ` Deniz Dogan
  0 siblings, 1 reply; 49+ messages in thread
From: Jan Djärv @ 2009-07-02 10:38 UTC (permalink / raw)
  To: Deniz Dogan
  Cc: David De La Harpe Golden, emacs-devel, James Cloos, Miles Bader

Deniz Dogan skrev:
> 
> Unfortunately, still no cigar. I really wish I could help out more
> with this than just tell you whether it "works" or not... :/
> 

It works with XMonad for me.  Can you attach your .emacs?  Did you cvs update 
properly?

	Jan D.






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

* Re: What is the proper way to set the default font these days?
  2009-07-02  9:19                   ` YAMAMOTO Mitsuharu
@ 2009-07-02 10:59                     ` Jan Djärv
  2009-07-02 12:31                       ` Jan Djärv
  0 siblings, 1 reply; 49+ messages in thread
From: Jan Djärv @ 2009-07-02 10:59 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu
  Cc: Deniz Dogan, Miles Bader, emacs-devel, James Cloos,
	David De La Harpe Golden

YAMAMOTO Mitsuharu skrev:
>>>>>> On Thu, 02 Jul 2009 10:23:32 +0200, Jan Djärv <jan.h.d@swipnet.se> said:
> 
>>> If I remove them "manually" after startup, the problem doesn't
>>> occur.  What's weird is still like I said before that everything
>>> worked fine in a previous version of Emacs 23. Unfortunately,
>>> figuring out in which exact revision this problem started occurring
>>> is rather cumbersome, especially for me since I know very little
>>> about CVS.
> 
>> This particular behaviour was introduced by a patch made in May.  It
>> was to solve another problem (bug 2401).  I think I have them both
>> covered now.
> 
> Could you also take a look at the Bug#2980 (invisible frame) case that
> was supposed to be fixed by the patch in May?  

This is now broken again.  But the assumtion of the lisp code is wrong. In the 
case of XMonad, it will simply ignore any resize request and not send any 
ConfigureNotify events, not even when the frame becomes visible again (after 
all, the window sizes hasn't changed).  So if we assume the frame is 10x20, we 
will draw at the wrong place.

We could handle unmapped windows specially and when they get mapped, ask the X 
server for the size and handle it from there.

> Also, there seems to be
> a debug code remaining in xg_frame_resized.

Removed, thanks.

	Jan D.





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

* Re: What is the proper way to set the default font these days?
  2009-07-02 10:38                   ` Jan Djärv
@ 2009-07-02 11:58                     ` Deniz Dogan
  0 siblings, 0 replies; 49+ messages in thread
From: Deniz Dogan @ 2009-07-02 11:58 UTC (permalink / raw)
  To: Jan Djärv
  Cc: David De La Harpe Golden, emacs-devel, James Cloos, Miles Bader

2009/7/2 Jan Djärv <jan.h.d@swipnet.se>:
> Deniz Dogan skrev:
>>
>> Unfortunately, still no cigar. I really wish I could help out more
>> with this than just tell you whether it "works" or not... :/
>>
>
> It works with XMonad for me.  Can you attach your .emacs?  Did you cvs
> update properly?
>
>        Jan D.

Sorry, I just found an old (set-default-font ...) in ~/.emacs, which
was the cause of the strange behavior. It works now, thanks a bunch!

-- 
Deniz Dogan




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

* Re: What is the proper way to set the default font these days?
  2009-07-02 10:59                     ` Jan Djärv
@ 2009-07-02 12:31                       ` Jan Djärv
  0 siblings, 0 replies; 49+ messages in thread
From: Jan Djärv @ 2009-07-02 12:31 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu
  Cc: Deniz Dogan, Miles Bader, emacs-devel, James Cloos,
	David De La Harpe Golden

Jan Djärv skrev:
> YAMAMOTO Mitsuharu skrev:
>>>>>>> On Thu, 02 Jul 2009 10:23:32 +0200, Jan Djärv 
>>>>>>> <jan.h.d@swipnet.se> said:
>>
>>>> If I remove them "manually" after startup, the problem doesn't
>>>> occur.  What's weird is still like I said before that everything
>>>> worked fine in a previous version of Emacs 23. Unfortunately,
>>>> figuring out in which exact revision this problem started occurring
>>>> is rather cumbersome, especially for me since I know very little
>>>> about CVS.
>>
>>> This particular behaviour was introduced by a patch made in May.  It
>>> was to solve another problem (bug 2401).  I think I have them both
>>> covered now.
>>
>> Could you also take a look at the Bug#2980 (invisible frame) case that
>> was supposed to be fixed by the patch in May?  
> 
> This is now broken again.  But the assumtion of the lisp code is wrong. 
> In the case of XMonad, it will simply ignore any resize request and not 
> send any ConfigureNotify events, not even when the frame becomes visible 
> again (after all, the window sizes hasn't changed).  So if we assume the 
> frame is 10x20, we will draw at the wrong place.
> 
> We could handle unmapped windows specially and when they get mapped, ask 
> the X server for the size and handle it from there.

2980 is OK again.  This XMonad sure is a strange window manager, it does 
nothing like one expects it to.

	Jan D.






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

* Re: What is the proper way to set the default font these days?
  2009-07-02  7:54               ` Jan Djärv
  2009-07-02  8:02                 ` Deniz Dogan
@ 2009-07-21 15:14                 ` Bruce Stephens
  2009-07-21 18:48                   ` Jan Djärv
  1 sibling, 1 reply; 49+ messages in thread
From: Bruce Stephens @ 2009-07-21 15:14 UTC (permalink / raw)
  To: emacs-devel

Jan Djärv <jan.h.d@swipnet.se> writes:

[...]

> Never mind, I found the error. Emacs kind of assumes the window
> manager will eventually honor a resize request Emacs does.  XMonad
> breaks this assumtion.
> Try it now.

These fixes don't appear to be on the 23 release branch, so (presuming
that's the case) 23.1 will still be broken (in a minor way, admittedly).

That's a perfectly reasonable decision to make (especially if the issue
only affects xmonad), but was it a decision or were the changes just not
applied by accident?




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

* Re: What is the proper way to set the default font these days?
  2009-07-21 15:14                 ` Bruce Stephens
@ 2009-07-21 18:48                   ` Jan Djärv
  2009-07-21 19:10                     ` Bruce Stephens
  0 siblings, 1 reply; 49+ messages in thread
From: Jan Djärv @ 2009-07-21 18:48 UTC (permalink / raw)
  To: Bruce Stephens; +Cc: emacs-devel



Bruce Stephens skrev:
> Jan Djärv <jan.h.d@swipnet.se> writes:
> 
> [...]
> 
>> Never mind, I found the error. Emacs kind of assumes the window
>> manager will eventually honor a resize request Emacs does.  XMonad
>> breaks this assumtion.
>> Try it now.
> 
> These fixes don't appear to be on the 23 release branch, so (presuming
> that's the case) 23.1 will still be broken (in a minor way, admittedly).
> 
> That's a perfectly reasonable decision to make (especially if the issue
> only affects xmonad), but was it a decision or were the changes just not
> applied by accident?
> 

It was a decision.  It isn't a regression from Emacs 22 AFAIK.

	Jan D.




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

* Re: What is the proper way to set the default font these days?
  2009-07-21 18:48                   ` Jan Djärv
@ 2009-07-21 19:10                     ` Bruce Stephens
  0 siblings, 0 replies; 49+ messages in thread
From: Bruce Stephens @ 2009-07-21 19:10 UTC (permalink / raw)
  To: emacs-devel

Jan Djärv <jan.h.d@swipnet.se> writes:

[...]

> It was a decision.  It isn't a regression from Emacs 22 AFAIK.

I think it is a regression.  At least, I don't see the problem with
emacs22-gtk 22.3+1-1 from Debian, and I don't see any relevant
Debian-specific patches in this area.




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

end of thread, other threads:[~2009-07-21 19:10 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-06 14:58 What is the proper way to set the default font these days? Deniz Dogan
2009-06-06 19:11 ` Stefan Monnier
2009-06-07  0:25   ` Deniz Dogan
2009-06-07  3:00 ` Miles Bader
2009-06-07 12:44   ` David De La Harpe Golden
2009-06-08  5:22     ` Miles Bader
2009-06-08 14:21       ` Stephen J. Turnbull
2009-06-08 14:59         ` Deniz Dogan
2009-06-08 15:50           ` Chong Yidong
2009-06-08 16:17             ` Stephen J. Turnbull
2009-06-08 16:19               ` Chong Yidong
2009-06-08 16:28                 ` Deniz Dogan
2009-06-08 16:50                   ` Chong Yidong
2009-06-10  9:17                   ` Deniz Dogan
2009-06-10 13:37                     ` Miles Bader
2009-06-10 14:08                       ` Deniz Dogan
2009-06-10 15:52                     ` Chong Yidong
2009-06-10 15:59                       ` Deniz Dogan
2009-06-29 11:44                       ` gtk toolbar bug (was Re: What is the proper way to set the default font these days?) Bruce Stephens
2009-06-29 17:49                         ` Deniz Dogan
2009-06-29 19:30                           ` gtk toolbar bug Bruce Stephens
2009-06-29 21:37                             ` Bruce Stephens
2009-06-30 14:42                               ` Jan Djärv
2009-07-01 14:10                                 ` Jan Djärv
2009-07-01 15:25                                   ` Bruce Stephens
2009-06-08 22:15             ` What is the proper way to set the default font these days? Chad Brown
2009-06-08 22:40               ` David Reitter
2009-06-09  0:42                 ` Miles Bader
2009-06-10 22:07                   ` Stefan Monnier
2009-06-11  0:25                     ` Miles Bader
2009-06-09  3:04               ` Eli Zaretskii
2009-06-08 22:03       ` Johan Bockgård
2009-06-12 17:14       ` James Cloos
2009-06-12 21:00         ` Stefan Monnier
2009-06-15  3:29         ` Miles Bader
2009-07-01 22:35           ` Deniz Dogan
2009-07-02  6:44             ` Jan Djärv
2009-07-02  7:45               ` Deniz Dogan
2009-07-02  8:23                 ` Jan Djärv
2009-07-02  9:19                   ` YAMAMOTO Mitsuharu
2009-07-02 10:59                     ` Jan Djärv
2009-07-02 12:31                       ` Jan Djärv
2009-07-02  7:54               ` Jan Djärv
2009-07-02  8:02                 ` Deniz Dogan
2009-07-02 10:38                   ` Jan Djärv
2009-07-02 11:58                     ` Deniz Dogan
2009-07-21 15:14                 ` Bruce Stephens
2009-07-21 18:48                   ` Jan Djärv
2009-07-21 19:10                     ` Bruce Stephens

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