[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get the new frame?
From: |
Javier |
Subject: |
Re: How to get the new frame? |
Date: |
Thu, 23 Jul 2015 22:38:35 +0000 (UTC) |
User-agent: |
tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.18.6-1-ARCH (x86_64)) |
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 <btraven@nihilo.net> wrote:
> Thanks, Eli and Javier. See below
>
> On 7/23/2015 2:26 PM, Eli Zaretskii wrote:
>>> From: "B. T. Raven" <btraven@nihilo.net>
>>> 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
- Re: How to get the new frame?, (continued)
Re: How to get the new frame?, John Mastro, 2015/07/20
Message not available
- Re: How to get the new frame?, B. T. Raven, 2015/07/23
- Re: How to get the new frame?, Eli Zaretskii, 2015/07/23
- Message not available
- Re: How to get the new frame?, B. T. Raven, 2015/07/23
- Re: How to get the new frame?, Javier, 2015/07/23
- Re: How to get the new frame?, Eli Zaretskii, 2015/07/23
- Message not available
- Re: How to get the new frame?, B. T. Raven, 2015/07/23
- Re: How to get the new frame?,
Javier <=
- Re: How to get the new frame?, Eli Zaretskii, 2015/07/24
- Re: How to get the new frame?, B. T. Raven, 2015/07/24
- Re: How to get the new frame?, Eli Zaretskii, 2015/07/24
- Message not available
- Re: How to get the new frame?, Javier, 2015/07/24
Message not availableRe: How to get the new frame?, B. T. Raven, 2015/07/24
Re: How to get the new frame?, Eli Zaretskii, 2015/07/24
Re: How to get the new frame?, Robert Thorpe, 2015/07/27
Re: How to get the new frame?, Yuri Khan, 2015/07/24
Re: How to get the new frame?, Eli Zaretskii, 2015/07/24
Re: How to get the new frame?, Emanuel Berg, 2015/07/23