From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Javier Newsgroups: gmane.emacs.help Subject: Re: How to get the new frame? Date: Thu, 23 Jul 2015 22:38:35 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <20150721004403.1229.1C8BC4D7@ahiker.mooo.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1437691233 11073 80.91.229.3 (23 Jul 2015 22:40:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jul 2015 22:40:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 24 00:40:19 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1ZIPA2-0002rQ-78 for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jul 2015 00:40:18 +0200 Original-Received: from localhost ([::1]:43023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIPA0-0001OT-W0 for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Jul 2015 18:40:17 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 166 Original-NNTP-Posting-Host: 6vJ9bD1ekW8t4acxAcHFJw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.18.6-1-ARCH (x86_64)) X-Notice: Filtered by postfilter v. 0.8.2 Original-Xref: usenet.stanford.edu gnu.emacs.help:213661 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105947 Archived-At: I don't have a windows computer at reach, so I cannot do much. In any case, some points > display-mm-dimensions-alist is a variable defined in `frame.el'. > Its value is (("t400" 304 . 190)) > Original value was nil "t400" doesn't look like a valid display name. Try (setq display-mm-dimensions-alist '(t . (304 . 190))) t without quotes means all displays, should be always valid and be enough for you unless you want to do a screen by screen individual setup. > (display-mm-width "t400") evals to Display name does not exist That tells you that "t400" is not a valid display name. What does it give? M-: (x-display-list) I'm curious to see how displays are named in Win32. It might not even work as there is no X server in Win32. > (display-mm-width) evals to 508 > (display-mm-height) evals to 318 > > but both numbers are more than 50% too big for the size of the physical > screen in mm (304 by 190) Are you using two screens like a laptop and an external monitor? Anyway, don't worry much, I'm not surprised that emacs or the OS are getting the wrong info. For the rest I cannot tell you anything. I have never used proportional fonts in emacs. Good luck with that. B. T. Raven wrote: > Thanks, Eli and Javier. See below > > On 7/23/2015 2:26 PM, Eli Zaretskii wrote: >>> From: "B. T. Raven" >>> Date: Thu, 23 Jul 2015 13:21:52 -0500 >>> >>>> Is display-monitor-attributes-list what you want? Or maybe >>>> display-mm-width and display-mm-height? Or display-pixel-width and >>>> display-pixel-height? There are more, of course. >>>> >>> >>> Thanks, Eli. I have the last four functions documented but not the first >>> (variable?) in w32 24.3. >> >> Upgrade to 24.5, the latest, and you will have the first function as >> well. >> >>> I have put: >>> >>> '(display-mm-dimensions-alist (quote (("t400" 304 . 190)))) >>> >>> in (custom-set-variables using custom but that doesn't register the >>> display monitor (14.1" diag.). >> >> I don't understand what that means, nor what you wanted to achieve, >> and how exactly did you try achieving that via >> display-mm-dimensions-alist. Please show more of your code. >> >>> Apparently the display part of the alist can be either nil, t, or a >>> string but I can't get mm or pixel height or width through those >>> functions after setting up the alist. >> >> Again, I fail to follow. Where I'm typing this, I get >> >> M-: (display-mm-height) RET => 180 > > after trying to customize I see: > > display-mm-dimensions-alist is a variable defined in `frame.el'. > Its value is (("t400" 304 . 190)) > Original value was nil > > then > > (display-mm-width "t400") evals to Display name does not exist > (display-mm-width) evals to 508 > (display-mm-height) evals to 318 > > but both numbers are more than 50% too big for the size of the physical > screen in mm (304 by 190) > >> >> What doesn't work for you? Was this the function you tried? >> >>> Btw, what is this first string in the documentation of the variable: >>> (":0.0" . (287 . 215))? >> >> The display name, only significant on X. >> >>> I was hoping that Emacs might be able to interrogate the hardware >>> somehow through the OS. >> >> It does. >> >>> In the context of my original question, is my goal somehow >>> achievable. If so, what's the recipe? >> >> Not sure what is the question, exactly. You said back then: >> >>> I use 2 frames under w32, w64, courier (monospace 8 line high) to >>> display *Calendar* and arial (proportional font) for everything else. Is >>> there any other way to accomplish this? >> >> Other than what? other than using a separate frame? Then I suggest to >> have a look at buffer-face-mode and its commands. That's what is at >> work when you click Shift-mouse-1 and select a font for the current >> buffer. > > I think I always use only two fonts (same size). I knew about > buffer-face-mode but I don't use it. Instead I tried to set up two > frames and their associated fonts once and for all in the init file. > > As far as I know the only code that affects all this are these lines: > > " > (setq initial-frame-alist '((name . "arial") (top . 370) (left . 1) > (width . 205) (height . 18))) > > ... > > (make-frame '((name . "courier") > (top . 1) (left . 1) > (width . 223) (height . 18) > (visibility . icon))) ;; nil or icon > > ... > > (custom-set-faces > ;; custom-set-faces was added by Custom. > ;; If you edit it by hand, you could mess it up, so be careful. > ;; Your init file should contain only one such instance. > ;; If there is more than one, they won't work right. > '(default ((t (:stipple nil :background "ghostwhite" :foreground > "black" :inverse-video nil :box nil :strike-through nil :overline nil > :underline nil :slant normal :weight normal :height 108 :width normal > :family "outline-arial unicode ms")))) > '(scroll-bar ((t (:background "#ffffff" :foreground "#000000"))))) > > ... and finally > > (select-frame-by-name "courier") > (set-frame-font "-outline-Courier > New-normal-r-normal-normal-*-*-96-96-c-*-iso10646-1") > > ;; the actual (present) width and height numbers are now just a vestige > of my experimenting with the two frames long time ago, dividing the > display in half roughly). What I want are two full width frames, an 8 > line monospace-font frame for *Calendar* and a 24 line proportional-font > frame both on the display at once. Now I can only do that by fiddling > with the frames manually. > > Thanks, > > Ed