unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Harold Pimentel <haroldpimentel@gmail.com>
Cc: 8242@debbugs.gnu.org
Subject: bug#8242: Issue with help menu and set-frame-font
Date: Sun, 13 Mar 2011 14:44:33 +0100	[thread overview]
Message-ID: <4D7CCA41.6010307@gmx.at> (raw)
In-Reply-To: <64B7C423-6AF7-4655-BCAE-908EF130D5B9@gmail.com>

 > 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?

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

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.

Could you try to verify these my suppositions?

martin





  reply	other threads:[~2011-03-13 13:44 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 [this message]
2011-03-13 18:08   ` Harold Pimentel
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=4D7CCA41.6010307@gmx.at \
    --to=rudalics@gmx.at \
    --cc=8242@debbugs.gnu.org \
    --cc=haroldpimentel@gmail.com \
    /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 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).