From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Font width and frame width Date: Sun, 15 Mar 2009 15:54:49 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1237128956 16800 80.91.229.12 (15 Mar 2009 14:55:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Mar 2009 14:55:56 +0000 (UTC) To: help-gnu-emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 15 15:57:13 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lirm4-0003gc-8i for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Mar 2009 15:57:12 +0100 Original-Received: from localhost ([127.0.0.1]:49145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lirki-0004Zr-7w for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Mar 2009 10:55:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lirjs-0004Js-Em for help-gnu-emacs@gnu.org; Sun, 15 Mar 2009 10:54:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lirjn-0004Fl-Ds for help-gnu-emacs@gnu.org; Sun, 15 Mar 2009 10:54:55 -0400 Original-Received: from [199.232.76.173] (port=53696 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lirjn-0004Fa-2t for help-gnu-emacs@gnu.org; Sun, 15 Mar 2009 10:54:51 -0400 Original-Received: from mail-fx0-f176.google.com ([209.85.220.176]:44394) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lirjm-0002GR-Ln for help-gnu-emacs@gnu.org; Sun, 15 Mar 2009 10:54:50 -0400 Original-Received: by fxm24 with SMTP id 24so3352633fxm.42 for ; Sun, 15 Mar 2009 07:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=I1HER0DhU78o+RWQYW2z9ew6Kqd5cFsDfdwKdqtC5cE=; b=d76FI82HRqRIKW9/O5xjPAgWrwwW9+H4UPa6AeutxkEaVJnrYrLSTCo6g0VaCvxwvP PRv1MB1QDWE5BfiCQ7PGpYcJ2d73SCfT6Ymtf48c7SnDiDIeKkEPrG94DdXMTf1OZy0D tn8kpTTkn6Q3CgNH62dE5qjPBqe74tNsEfcqQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=g/ZUQR1j7LfzkrPTp6eWgEGnffpqSCewKCr+wPCUItXtmhVmEsVvSTv6ENlju0AI+V +WbwYWvIvwd/q1BEYhzFYjs89/G/CF6GChN2SRE9TX+zPIejndX5NssYDj3hYPzPdjJO 9m1zQDa7eDkM/+mjLa6cJSxx8+OkE4w/5wvfk= Original-Received: by 10.223.110.211 with SMTP id o19mr2283441fap.57.1237128889260; Sun, 15 Mar 2009 07:54:49 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62931 Archived-At: How do I get the number of columns on a maximized frame? I expected the following to give me this in cols, but it does not give the same value as (frame-width). ;; Run this on a maximized frame (defun my-display-test () (let* ((display-pixel-width (display-pixel-width)) (fontname (face-attribute 'default :font)) (font-info (font-info fontname)) (font-width (aref font-info 2)) (cols (/ display-pixel-width font-width)) ) (message "frame-width: %s, cols: %s" (frame-width) cols) ))