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

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

问题描述

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



每次打开一个新的emacsclient,我如何获取一个lisp文件?

(这对于特定于框架的定制将是方便的。)



我假设答案是使用一些钩子,但我可以似乎找不到正确的钩子。



我期待您的回答。

解决方案

您可以向钩子'server-visit-hook 添加一个函数,这是每次调用服务器时运行的(每次调用 emacsclient )。


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

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.

I look forward to your answers.

解决方案

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天全站免登陆