Emacs:在启动时从上次会话重新打开缓冲区? [英] Emacs: reopen buffers from last session on startup?

查看:19
本文介绍了Emacs:在启动时从上次会话重新打开缓冲区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我每天启动 emacs 并打开与前一天打开的完全相同的文件.有什么我可以添加到 init.el 文件的东西,以便它重新打开我上次退出 emacs 时使用的所有缓冲区?

Every day I start up emacs and open the exact same files I had open the day before. Is there something I can add to init.el file so it will reopen all the buffers I was using when I last quit emacs?

推荐答案

您可以使用 Emacs 桌面库:

您可以手动保存桌面命令 M-x 桌面保存.你可以还可以自动保存退出 Emacs 时的桌面,以及自动恢复上次Emacs 启动时保存的桌面:使用自定义缓冲区(请参阅 Easy定制)来设置桌面保存模式到 t 以备将来使用会话,或在您的~/.emacs 文件:

You can save the desktop manually with the command M-x desktop-save. You can also enable automatic saving of the desktop when you exit Emacs, and automatic restoration of the last saved desktop when Emacs starts: use the Customization buffer (see Easy Customization) to set desktop-save-mode to t for future sessions, or add this line in your ~/.emacs file:

 (desktop-save-mode 1)

这篇关于Emacs:在启动时从上次会话重新打开缓冲区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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