如何在Emacs中找到我的系统的显示尺寸? [英] How do I find the display size of my system in Emacs?
问题描述
是否有一个emacs-lisp表达式返回宽度&系统屏幕的高度?
更新:我刚刚发现一个,但由于某种原因,我的GNU Emacs 23.2中没有(x-display-pixel-width)和(display-pixel-width)在Windows XP系统上。继续研究...
我在XP Pro上运行Gnu Emacs 23.2.1,功能
(x-display-pixel-width)
和
(x-display-pixel-height)
都正常工作。它们是c源的一部分,应该存在。
您可以在信任的终端之外运行emacs吗?
以下是我当前emacs的文档:
x-display-pixel-height是C源代码中的一个内置函数。 p>
(x-display-pixel-height&可选TERMINAL)
返回X显示的像素高度终奌站。
可选参数TERMINAL指定要查询的显示。
TERMINAL应为终端对象,框架或显示名称(字符串)。
如果省略或不显示,则表示所选框架的显示。
此外,我还有一个完整的方便功能库可帮助调整和移动emacs框架,如果你有兴趣。
- Chris
I use the same .emacs across multiple machines, operating systems and platforms. I would like the default frame size of Emacs upon invocation to be relative to the available screen size (e.g. 96 lines work very well on a 1600x1200 desktop screen, but on an 1280x800 laptop I need to specify no more than 68 lines).
Is there an emacs-lisp expression that returns the width & height of the system's screen?
Update: I just found a similar question, but for some reason neither (x-display-pixel-width) nor (display-pixel-width) can be found in my GNU Emacs 23.2 on Windows XP system. Continuing to research...
I'm running Gnu Emacs 23.2.1 on XP Pro, and the functions (x-display-pixel-width) and (x-display-pixel-height)
are both working just fine. They are a part of the c source, and should be present.
You CAN run emacs outside of a terminal it trust?
Here's the documentation from my current emacs:
x-display-pixel-height is a built-in function in `C source code'.
(x-display-pixel-height &optional TERMINAL)
Return the height in pixels of the X display TERMINAL. The optional argument TERMINAL specifies which display to ask about. TERMINAL should be a terminal object, a frame or a display name (a string). If omitted or nil, that stands for the selected frame's display.
Also, I have a entire library of convenience functions to help with sizing and moving the emacs frame, if you interested.
- Chris
这篇关于如何在Emacs中找到我的系统的显示尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!