6/11/2023 0 Comments Emacs save fileType, you only need to write two functions and hook them into the correct MH folders (via mh-restore-desktop-buffer)ĭesktop can handle more than the default buffer types, by using the variablesĭesktop-save-bufer and desktop-buffer-mode-handlers.DocView buffers - PDFs, ODTs, DOCXs, etc.todo-mode buffers (via todo-restore-desktop-buffer).vc-dir buffers (via vc-dir-restore-desktop-buffer).dired buffers (via dired-restore-desktop-buffer).file buffers (via desktop-restore-file-buffer.Default Supported Buffer Typesīy default, Desktop only supports these types of buffers: The command will close your current session (without exiting Emacs) and loadĪnother session from file. The key here is to use the command desktop-change-dir. With Desktop, you can also have several different sessions saved on disk, and ( desktop-save-mode ) optional - if your desktop is saved in "~.emacs.d/.cache/" ( setq desktop-path ' ( "~/.emacs.d/.cache/" )) ( desktop-read ) Working with Multiple Sessions Saved in another directory, you should set desktop-path accordingly. By default,ĭesktop searches in ~ and ~/.emacs.d directories. It will look for aĭesktop file in desktop-path and load the first one that it finds. To load your desktop file, use the command desktop-read. If you don’t want to wait untilĮxiting Emacs, you can call desktop-save manually. When exiting Emacs after the first time that you enable desktop-save-mode,ĭesktop won’t find an existing desktop file and will ask you wether it shouldĬreate one and where should it create it. Or automatically at startup, by using commands desktop-read orĭesktop-change-dir. Or manually with the desktop-save command. Saving is done automatically every once in a while and when exiting Emacs, Hussle of reopening all the files you need and setting your windows the way you likeĮnabling Desktop is very simple: ( desktop-save-mode ) optional: automatically load previous session on startup ( desktop-read ) The main benefit of Desktop is that it saves the Next time you start Emacs, you can load your session and have (almost)Īll your buffers available. In practice, Desktop saves your session information andīuffers to a file. Saves your Emacs session, so you can load it later and pick up exactly where you Desktop-Save mode (“Desktop” from now on) is a global mode that automatically
0 Comments
Leave a Reply. |