如何使Emacs启动更快? [英] How can I make Emacs start-up faster?

查看:112
本文介绍了如何使Emacs启动更快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Emacs v.22(控制台版本,远程使用 PuTTY 或本地与 Konsole )作为Linux上的主要文本编辑器。每次启动它需要一段时间才能加载,可能几乎一秒钟,虽然我没有定时。我倾向于打开和关闭Emacs,因为我使用 Bash 命令行文件/目录操作和编译。

I use Emacs v. 22 (the console version, either remotely with PuTTY or locally with Konsole) as my primary text editor on Linux. It takes a while to load up each time I start it though, probably almost a second, although I never timed it. I tend to open and close Emacs a lot, because I'm more comfortable using the Bash command-line for file/directory manipulation and compiling.

如何加快启动时间?

推荐答案

除了,我建议使用服务器模式下的Emacs 。您可以向您的dotemacs添加(server-start),并运行 emacsclient 而不是 emacs 每当您要在Emacs中打开文件。这样一来,您必须支付Emacs的加载费用,之后客户立即弹出。

In addition to Adam Rosenfield's solution, I recommend to use Emacs in server mode. You may add (server-start) to your dotemacs, and run emacsclient instead of emacs whenever you want to open file in Emacs. That way you have to pay the loading cost of Emacs only once, after then clients pop up immediately.

修改

你是对的,v22不会创建一个新的框架。创建一个shell脚本来做这个窍门:

You're right, v22 does not create a new frame. Create a shell script that do the trick:

#!/bin/bash
# Argument: filename to open in new Emacs frame
/usr/bin/emacsclient -e '(let ((default-directory "`pwd`/")) (select-frame (make-frame)) (find-file "'$1'"))'

这篇关于如何使Emacs启动更快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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