如何在启动 emacsclient 后自动评估某些 lisp 代码? [英] How to automatically evaluate certain lisp code after starting an emacsclient?

查看:18
本文介绍了如何在启动 emacsclient 后自动评估某些 lisp 代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在启动 Emacs 时,会评估 init.el(或 .emacs.el).但是,在启动 emacsclient 时,不会评估类似的 lisp 代码.

When starting Emacs, init.el (or .emacs.el) is evaluated. However, when starting emacsclient, no similar lisp code is evaluated.

如何在每次打开新的 emacsclient 时获取要评估的 lisp 文件?

How can I get a lisp file to be evaluated every time I open a new emacsclient?

(这对于框架特定的自定义很方便.)

(This would be handy for frame specific customizations.)

我认为答案是使用一些钩子,但我似乎找不到要使用的正确钩子.

I assume the answer is to use some hook, but I can't seem to find the correct hook to use.

期待您的回答.

推荐答案

可以在钩子 'server-visit-hook 中添加一个函数,该函数在每次调用服务器时运行(每次调用 emacsclient 的时间).

You can add a function to the hook 'server-visit-hook, which is run every time the server is called (every time you call emacsclient).

这篇关于如何在启动 emacsclient 后自动评估某些 lisp 代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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