-->

什么是最好的Emacs工作区插件?(What is the best Emacs workspace

2019-07-30 04:48发布

通过工作区,我的意思是 - 我要救我打开的缓冲区的状态(可能在用户指定的工作区文件),并迅速切换到另一套开放的缓冲区,如继续对有关的另一个项目文件的工作。

是否有一个Emacs的插件,它允许吗? 你会推荐哪一个?

Answer 1:

我使用的组合保存,受访的文件和工作组 。 事实上,工作组可能会做你最想通过自己的本然。

我的配置:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; workgroups for windows

(setq wg-prefix-key (kbd "C-c z")
      wg-no-confirm t
      wg-file (concat emacs-persistence-directory "workgroups")
      wg-use-faces nil
      wg-switch-on-load nil)

(defun wg-load-default ()
  "Run `wg-load' on `wg-file'."
  (interactive)
  (wg-load wg-file))

(defun wg-save-default ()
  "Run `wg-save' on `wg-file'."
  (interactive)
  (when wg-list
    (with-temp-message ""
      (wg-save wg-file))))

(with-library 'workgroups
  (define-key wg-map (kbd "C-l") 'wg-load-default)
  (define-key wg-map (kbd "C-s") 'wg-save-default)
  (workgroups-mode 1)
  (add-hook 'auto-save-hook 'wg-save-default)
  (add-hook 'kill-emacs-hook 'wg-save-default))


Answer 2:

就个人而言,我已经使用了`persp模式” :

视角为Emacs的基础上, perspective-el由Nathan魏泽鲍姆。 但观点帧之间共享+能力保存/恢复自/至文件。



Answer 3:

desktop.el将在您的情况有所帮助。

它可以从emacs的包缓冲器(从它的介绍页面复制):

保存在桌面,即 - 一些全局变量 - 与相关文件缓冲区的名单。 对于每一个缓冲区也 - 主要模式 - 默认目录 - 点 - 标记 - 标记 - 主动 - 缓冲区只读 - 一些局部变量



Answer 4:

如果您使用的是Linux / GNOME3,你可以试试这个扩展名: https://extensions.gnome.org/extension/361/emacs-manager/这个扩展可以让你通过管理多个emacs的守护进程同时在不同的项目工作,保存/恢复缓冲区的状态。



Answer 5:

广濑Yuuji的revive.el已经很好地为我工作了一段时间。 我用在revive.el的意见提出的标准配置。 该文档写得很好,恢复是非常容易使用和配置。 特别是,revive.el具有比一些重振那些更复杂一点的配置更好的支持。 如果你与广濑Yuuji的结合起来,是特别好的windows.el 。 它们是由一起工作。 windows.el能够召回窗口拆分等revive.el是建立与朝着在特定设置更深的模式集成的可扩展的眼睛。 但对于我的使用,我发现它是相当不错的开箱即用的,但我想我接下来会调整它恢复,我目前还没有安装的w3m窗口(更新:我现在做:见底部)。

这里是我的复活配置。 我有一些有益的意见,首先为windows.el然后revive.el在线:

(provide 'my-revive-config)

(require 'windows) ; use this with revive so that window splits are recallable
                   ; too

(win:startup-with-window) ; start with window 1


;;;[Key Bindings]
;;;
;;;   The default prefix key stroke for Windows is `C-c C-w'.  If it
;;; causes  you some  troubles, see  the  section  `Customizations'.
;;; Here are the default key bindings.
;;;
;;;     C-c C-w 1       Switch to window 1 (Q)
;;;     C-c C-w 2       Switch to window 2 (Q)
;;;        :
;;;     C-c C-w 9       Switch to window 9 (Q)
;;;     C-c C-w 0       Swap windows with the buffer 0 (Q)
;;;                 (Select unallocated frame(Emacs 19))
;;;     C-c C-w SPC     Switch to window previously shown (Q)
;;;     C-c C-w C-n     Switch to next window
;;;     C-c C-w C-p     Switch to previous window
;;;     C-c C-w !       Delete current window (Q)
;;;     C-c C-w C-w     Window operation menu
;;;     C-c C-w C-r     Resume menu
;;;     C-c C-w C-l     Local resume menu
;;;     C-c C-w C-s     Switch task
;;;     C-c C-w =       Show window list (Q)
;;;
;;;   The  key strokes  to  select  windows from  1    to 9 must  be
;;; frequently used, so the alternative key strokes `C-c [Num.]' are
;;; available  by default  (And  any  function  with (Q)mark can  be
;;; invoked without  C-w).  To disable these  quick key strokes, set
;;; the variable win:quick-selection to `nil' in your ~/.emacs.

(autoload 'save-current-configuration "revive" "Save status" t)
(autoload 'resume "revive" "Resume Emacs" t)
(autoload 'wipe "revive" "Wipe Emacs" t)

(define-key ctl-x-map "S" 'save-current-configuration)
(define-key ctl-x-map "F" 'resume)
(define-key ctl-x-map "K" 'wipe)

;;;
;;;[How to use]
;;;
;;;  Call `save-current-configuration' (`C-x S' if you define key as
;;; above) when you want to save current editing status and call
;;; `resume' to restore it. Numerical prefix arg to them specifies
;;; the buffer number in which the editing status will be saved.
;;; Here the buffer refers to a revive s-exp in ~/.revive.el of
;;; which there can be n
;;;
;;;     [Sample Operations]
;;;     C-u 2 C-x S     ;save status into the buffer #2
;;;     C-u 3 C-x F     ;load status from the buffer #3

这方面有别人喜欢变种复活,plus.el和GitHub上稍加修改克隆 ,但我更喜欢原来的。

更新周一,2015年1月12日:现在我可以恢复的w3m在恢复(详见并在实例特定的外观复兴revive.el文档:主要模式 - 命令ALIST默认):

(setq revive:major-mode-command-alist-private
      '(("*w3m*"    . w3m)))

请注意,你是在告诉重振w3m的缓冲区的名字。 即使你有多个标签,只有第一个需要被列举如上。

以下是我设置为恢复从以前的会话的所有标签的w3m的变量:

(setq w3m-session-load-last-sessions t)


文章来源: What is the best Emacs workspaces plugin?