all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Harold Pimentel <haroldpimentel@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 8242@debbugs.gnu.org
Subject: bug#8242: Issue with help menu and set-frame-font
Date: Sun, 13 Mar 2011 11:08:08 -0700	[thread overview]
Message-ID: <8FFF9E8B-B409-45BB-A0F1-D56EB72AA88C@gmail.com> (raw)
In-Reply-To: <4D7CCA41.6010307@gmx.at>

> > I'm having an issue with set-frame-font. It is as follows:
> >
> > - I use:
> > 	(set-frame-font "Menlo-12")
> 
> Doesn't this already change the (pixel-)size of the frame?
> 

Yes. The frame appears to be shorter and a few columns more narrow.

> > - I split the current frame into two windows
> > - If I raise the help menu it goes into the opposite window, changing that buffer (this is normal)
> > - I maximize my window
> > 	- I was using maximize-frame.el, but simply making the window as large as possible until it "clicks" will suffice
> > - Now, if raise the help menu, it splits the current window vertically instead of putting the help into the other window (BUG HERE)
> > 	- If I don't change the font, I will not have this issue
> 
> Large parts of Emacs think in terms of lines and columns.  So what
> happens in my opinion is that with the default (larger, I presume) frame
> font less lines fit on one frame of the same pixel height than with the
> Menlo-12 font you want to use.
> 
> If you invoke `set-frame-font' with the second argument nil, Emacs will
> usually adjust the frame's pixel height in order to make it occupy the
> same number of lines as with the previously used font.  Hence, a
> subsequent check whether a window can be split fails just as if you
> hadn't changed the font at all, so an existing window gets reused.
> 
> But if you maximize the frame, then with the Menlo-12 font _more_ lines
> may fit into a window than with the original font.  So when you invoke
> help in the maximized frame, the test (via `split-height-threshold')
> whether an existing window can be split succeeds and a new window gets
> popped up.

You are correct! When I set split-height-threshold to a large value, I get the original, expected behavior.

> If you invoke `set-frame-font' with the second argument non-nil, Emacs
> should keep the (non-maximized) frame pixel height constant and you
> should be able to observe the splitting behavior with a non-maximized
> frame as well.

I could not verify this. I.e., when calling (set-frame-font "Menlo-12" t), I get the same behavior as before.



Thanks for your help,

Harold




  reply	other threads:[~2011-03-13 18:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-13  8:39 bug#8242: Issue with help menu and set-frame-font Harold Pimentel
2011-03-13 13:44 ` martin rudalics
2011-03-13 18:08   ` Harold Pimentel [this message]
2011-03-14  7:22     ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8FFF9E8B-B409-45BB-A0F1-D56EB72AA88C@gmail.com \
    --to=haroldpimentel@gmail.com \
    --cc=8242@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.