From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Implement functions for measuring fonts and max chars per line Date: Sun, 18 Jan 2015 17:37:41 +0200 Message-ID: <83h9voyu9m.fsf@gnu.org> References: <87k31j3g03.fsf@posteo.de> <87d27b2ugp.fsf@posteo.de> <87zjaeo7eg.fsf@posteo.de> <874mrp46ns.fsf@posteo.de> <20150117153839.0de5fa7b@jabberwock.cb.piermont.com> <83k30lywa4.fsf@gnu.org> <20150117172122.0ccfba34@jabberwock.cb.piermont.com> <83iog4zrd2.fsf@gnu.org> <20150117230858.361b5307@jabberwock.cb.piermont.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1421595504 19194 80.91.229.3 (18 Jan 2015 15:38:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Jan 2015 15:38:24 +0000 (UTC) Cc: malsburg@posteo.de, emacs-devel@gnu.org To: "Perry E. Metzger" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 18 16:38:19 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YCrva-00039Q-Gr for ged-emacs-devel@m.gmane.org; Sun, 18 Jan 2015 16:38:14 +0100 Original-Received: from localhost ([::1]:33846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCrvZ-0000Oa-Nn for ged-emacs-devel@m.gmane.org; Sun, 18 Jan 2015 10:38:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCrvK-0000OV-P6 for emacs-devel@gnu.org; Sun, 18 Jan 2015 10:37:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCrvH-00088b-Hp for emacs-devel@gnu.org; Sun, 18 Jan 2015 10:37:58 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:58534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCrvH-00088S-56 for emacs-devel@gnu.org; Sun, 18 Jan 2015 10:37:55 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NID00E00PTS0I00@mtaout25.012.net.il> for emacs-devel@gnu.org; Sun, 18 Jan 2015 17:33:19 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NID005IFPVJG370@mtaout25.012.net.il>; Sun, 18 Jan 2015 17:33:19 +0200 (IST) In-reply-to: <20150117230858.361b5307@jabberwock.cb.piermont.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181404 Archived-At: > Date: Sat, 17 Jan 2015 23:08:58 -0500 > From: "Perry E. Metzger" > Cc: malsburg@posteo.de, emacs-devel@gnu.org >=20 > On Sun, 18 Jan 2015 05:42:49 +0200 Eli Zaretskii wro= te: > > > > > This all brings to mind: is there a good way now to determi= ne > > > > > what the maximum number of lines in a frame would be in a > > > > > given font on the user's display? > > > >=20 > > > > You mean window, not frame, right? > > >=20 > > > No, frame. > >=20 > > It's meaningless to ask this question about frames, since frames > > don't display text, at least not in GUI sessions. >=20 > There is a variables named default-frame-alist where I can do > things like setting 'height to an integer like "55" which > seems to indicate a frame where 55 lines of text may be viewed. That's just a (not so accurate) way of measuring frame's dimensions i= n canonical character units, that's all. > Perhaps my terminology is screwed up because of "default-frame-alis= t" > and the like, but my goal is to calculate what "55" should be rathe= r > than setting it through trial and error. Regardless, my .emacs > currently includes >=20 > (if window-system > (add-to-list 'default-frame-alist > =09=09 (cons 'height 60))) >=20 > and I'd like to compute which "height" is full height for my displa= y > (again, rather than simply figuring a number out by trial and error= ). So your actual goal is to maximize the frame's height. > > > I'd like to be able to set my default frame height to "full > > > height" for the display (filling the display from top to bottom= ) > > > -- right now I do guesswork to do this, and my .emacs breaks wh= en > > > I switch to a new display. > > > > Then you need to maximize the frame vertically. >=20 > I'm unclear on how to do that programatically either. Didn't you see what Michael wrote: > From: Michael Heerdegen > Date: Sun, 18 Jan 2015 02:01:46 +0100 >=20 > "Perry E. Metzger" writes: >=20 > > > =E2=80=98-fh=E2=80=99 > > > =E2=80=98--fullheight=E2=80=99 > > > Specify that the height should be the height of the screen= . >=20 > > Yes. What I want to do is do it programatically in elisp, not on = the >=20 > How about (set-frame-parameter nil 'fullscreen 'fullheight)? Isn't that exactly what you want?