emacs 在 KDE 中的初始位置

发布于 2024-08-08 23:08:10 字数 663 浏览 9 评论 0原文

我使用 emacs 23.1.1 和 KDE 4.3.1。我已经设置了 (initial-frame-alist) 和 (default-frame-alist) 以使我的窗口出现在我想要的位置。但我的初始窗口没有出现在我想要的地方。

我的初始窗口出现一种字体,更改字体,更改大小,移动(到我想要的位置),然后最终重新定位到其他地方。这是我要阻止的最后一步。

我还需要检查或关闭什么?

初始框架列表的值是

((left . -1)
 (vertical-scroll-bars . right)
 (menu-bar-lines . 0)
 (tool-bar-lines . 0))

默认框架列表的值是

((cursor-color . "yellow")
 (foreground-color . "#E0F0FF")
 (background-color . "#000000")
 (width . 80)
 (height . 78)
 (top . 0)
 (left . 432)
 (vertical-scroll-bars . right)
 (menu-bar-lines . 0)
 (tool-bar-lines . 0))

嗯重复滚动条放置并关闭菜单和工具栏。我可以把它清理掉。无论如何,有什么想法吗?

I use emacs 23.1.1 with KDE 4.3.1. I have set (initial-frame-alist) and (default-frame-alist) to make my windows come up where I want. But my initial window does not come up where I want.

My initial window comes up with one font, changes font, changes size, moves (to where I want) and then finally repositions to somewhere else. It's this last move I want to prevent.

What else do I need to check or turn off?

initial-frame-alist's value is

((left . -1)
 (vertical-scroll-bars . right)
 (menu-bar-lines . 0)
 (tool-bar-lines . 0))

default-frame-alist's value is

((cursor-color . "yellow")
 (foreground-color . "#E0F0FF")
 (background-color . "#000000")
 (width . 80)
 (height . 78)
 (top . 0)
 (left . 432)
 (vertical-scroll-bars . right)
 (menu-bar-lines . 0)
 (tool-bar-lines . 0))

Hmm repeated scroll bar placement and turning off of menu and tool bars. I could clean that up. Anyway, any thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晚风撩人 2024-08-15 23:08:10

听起来 emacs 在读取配置文件之前创建初始框架,然后按照指示移动框架。 (这也是文档声明 .)您需要在创建框架之前更改此设置。这就是 X Windows 资源的用途。

(这涉及到 X 配置的细节,我永远记不起其中的细微差别,但我是这样做的。)

在我的主目录中,我有一个名为 .Xresources 的文件。我在其中设置了 emacs 字体。您需要设置您的 emacs 位置。假设您的字体为 7x12 像素并忽略菜单和滚动条。

Emacs.geometry:  560x936+0+432

现在更新您的 X 设置以反映新设置。在命令提示符下运行

$ xrdb -merge ~/.Xresources

并启动 emacs,希望它位于正确的位置。您需要调整大小以适应菜单和滚动条。该位置可能会稍微偏离,因为它可能应用于未修饰的窗口(即没有标题栏的窗口)。

在我的系统上,登录时会自动读取 ~/.Xresources。如果不适合您,请将命令添加到适当的配置文件(可能是 ~/.profile)。

以下是有关几何规范的 X Windows 文档的链接。这里有emacs 知道的资源的完整列表< /a>.

It sounds like emacs is creating the initial frame before reading your configuration file, then moving the frame as directed. (This is also what the documentation claims.) You need to change this setting before the frame is even created. That's what X Windows resources are for.

(This gets into the details of X configuration, and I can never remember the nuances, but here's how I do it.)

In my home directory, I have a file called .Xresources. In it I set my emacs font. You'll want to set your emacs position. Assuming your fonts are 7x12 pixels and ignoring menus and scroll bars.

Emacs.geometry:  560x936+0+432

Now to update your X settings to reflect the new settings. At the command prompt run

$ xrdb -merge ~/.Xresources

And launch emacs, and hopefully it will be in the correct place. You'll want to play with the size to fit in the menus and scroll bars. The position might be off slightly because it may be applied to the undecorated window (i.e. the window without the title bar).

On my system, the ~/.Xresources is read automatically on log in. If not for you, add the command to the appropriate configuration file (probably ~/.profile).

Here's a link to the X Windows docs on Geometry Specification. And here's a full list of resources that emacs knows about.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文