在emacs框架渲染之后,如何运行命令? [英] How do I run a command just after the emacs frame has been rendered?

查看:176
本文介绍了在emacs框架渲染之后,如何运行命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在试图找出如何使用Emacs代码浏览器(ECB),并且您可以使用的其中一件事情是设置ecb-windows-width来决定ecb窗口的宽度。问题是这个顺序:


  1. 框架弹出屏幕。

  2. ecb-activate被调用,根据ecb-windows-width缩放。

  3. default-frame-alist参数踢进,框架调整大小。

问题是,由于此顺序,ecb窗口的宽度在框架调整大小之前设置,然后不会缩放。



所以我想运行ecb-redraw-layout(或者理想地只是ecb-activate),但是它必须在#3之后发生。否则,某种ecb-dynamic-width-scale选项也会起作用。



对于什么值得,ecb-auto-activate不起作用,所以我可以

解决方案

看起来我发现了一个解决方法。


  1. 将ecb-fix-window-size设置为true。

  2. 加载框架时,会调用ecb-activate ecb窗口与帧大小成比例缩放。

  3. 然后,default-frame-alist踢入,框架调整大小,但ecb窗口的大小固定不变。

由于您根据首先出现的默认框架大小来设置宽度,所以不太了解,而不是您实际使用的大小。但是哦,好的。


I'm trying to figure out how to use Emacs Code Browser (ECB) and one of the things you can do with it is set ecb-windows-width to decide how wide the ecb windows are. The problem is this sequence:

  1. Frame pops up on screen.
  2. ecb-activate gets called, scaled according to ecb-windows-width.
  3. default-frame-alist parameters kick in, frame gets resized.

The problem is that due to this order the width of the ecb window is set before the frame gets resized, and then doesn't get scaled.

So I'd like to run ecb-redraw-layout (or ideally just ecb-activate), but it has to happen after #3. Otherwise, some sort of ecb-dynamic-width-scale option would also work.

For what it's worth, ecb-auto-activate doesn't work, so I can't find out if that would solve it.

解决方案

It looks like I've found a workaround.

  1. Set ecb-fix-window-size to true.
  2. When the frame loads, ecb-activate is called and the ecb windows are scaled proportionally to the frame size.
  3. Then default-frame-alist kicks in and frame gets resized, but the ecb windows have a fixed size and don't get scaled.

Quite hackish because you're setting the width according to the default frame size that comes up first, not the size you actually use. But oh well.

这篇关于在emacs框架渲染之后,如何运行命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆