简体   繁体   English

保存emacs会话时保存观点

[英]saving perspectives when an emacs session is saved

I have been using perspectives package in emacs (from Nathan Weizenbaum, https://github.com/nex3/perspective-el ). 我一直在emacs使用perspectives包(来自Nathan Weizenbaum, https://github.com/nex3/perspective-el )。 I save my emacs session on exit so that it saves the existing buffers and loads them up on next start. 我在退出时保存了emacs会话,以便保存现有缓冲区并在下次启动时加载它们。 The line added in .emacs file to achieve this is : (desktop-save-mode 1) . .emacs文件中添加的用于实现此目的的行是: (desktop-save-mode 1) But it doesn't save perspectives, so that all the saved buffers open under a single perspective, when emacs is started. 但是它不会保存透视图,因此在启动emacs时,所有保存的缓冲区都在一个透视图中打开。 Is there any implementation that will achieve the saving of perspectives between emacs sessions? 是否有任何实现可以节省emacs会话之间的透视图的实现?

desktop-save-mode is provided by package desktop which comes with emacs, it is not provided by perspective.el . desktop-save-mode由emacs随附的包desktop提供,而perspective.el不提供。 Desktop mode can save and restore your buffers (with emacs 24.4 it can also save your windows and frames) but does not provide 'named window configurations'. 桌面模式可以保存和恢复缓冲区(使用emacs 24.4时,它也可以保存窗口和框架),但不提供“命名窗口配置”。 Perhaps you can use bookmarks+ for this as @Drew suggests but I have never tried it. 也许您可以按照@Drew的建议为此使用书签+,但我从未尝试过。

The package perspectives does not provide a way save and load perspectives. perspectives不提供保存和加载透视图的方式。 See this issue . 看到这个问题 As an alternative I would like to suggest you the package workgroups2 , it similar to perpective.el (it calls perspectives workgroups ) and provides that feature you want. 作为替代方案,我想向您推荐软件包workgroups2 ,它类似于perpective.el(它称为Perspectives workgroups )并提供您想要的功能。

This might be an alternative for you, depending on what you are looking for: 根据您要查找的内容,这可能是您的替代选择:

Starting with Emacs 24.4 (which will be released soon, and for which development snapshots are available), when you save an Emacs desktop (see desktop-save-mode and Bookmark+ desktop bookmarks ), you can optionally save frame, window, and buffer states. 从Emacs 24.4(即将发布,并且有可用的开发快照)开始,当您保存Emacs桌面(请参阅desktop-save-modeBookmark + 桌面书签 )时,可以选择保存框架,窗口和缓冲区状态。 Restoring a desktop then restores these as well (as far as possible). 然后,还原桌面也将还原它们(尽可能)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM