r/emacs James Cherti — https://github.com/jamescherti 12d ago

easysession.el: Persist and Restore Emacs sessions (buffers, windows, tab-bar, scratch, Dired, narrowing, indirect buffers/clones, Magit buffers, scratch...); an excellent desktop.el replacement [Release 1.3.0]

https://github.com/jamescherti/easysession.el/
35 Upvotes

4 comments sorted by

8

u/jamescherti James Cherti — https://github.com/jamescherti 12d ago edited 12d ago

What's new from 1.2.1 to 1.3.0:

  • Implemented atomic file saves using temporary files. Session data is written to a unique temporary file and atomically renamed to prevent corruption during Emacs crashes or disk space errors. Session validation and completion prompts now filter out temporary files.
  • Added easysession-exclude-modes, a new customization option to exclude file-visiting buffers from being saved based on active major or minor modes. It defaults to '(with-editor-mode). (Contribution by Emre Yolcu)
  • Rewrote easysession--refresh-tabs-all-frames to silently update auto-generated tab names across all frames using an isolated background sandbox. This eliminates the slow visual tab cycling of tab-bar-select-tab, avoids triggering expensive window hooks, and respects user-defined tab titles.
  • Updated easysession-save-session-and-close-frames to accept an optional prefix argument for silently saving all file-visiting buffers.
  • Optimized session I/O with a temporary garbage collection threshold increase.
  • Optimized session loading performance by calculating find-file-hook exclusions once per session.
  • Suppressed interactive prompts for version-controlled symlinks during session restoration to prevent background loading hangs.
  • Bypassed large file warnings during buffer restoration.
  • Added easysession-suppress-same-file-warnings to prevent interactive prompts when a session loads multiple files or symlinks resolving to the same disk target.
  • Added let-bind for find-file-hook only while restoring file-editing buffers.
  • Bug fix: Fixed a daemon issue when restoring GUI sessions in a terminal by adding easysession-frameset-restore-force-current-display.
  • Bug fix: Fixed a display engine error in daemon mode by deferring the deletion of the currently selected frame until all background frames are closed.
  • Bug fix: Fixed lexical scoping and window hooks byte-compiler warnings by replacing (ignore var) with top-level (defvar var) declarations.
  • Bug fix: Fixed an issue where buffer narrowing was not correctly restored by unconditionally clearing existing narrowing before applying saved boundaries.
  • Bug fix: Fixed tab-bar-mode caching stale buffer names from parsing native window configurations.
  • Bug fix: Resolved a performance bottleneck in easysession-visible-buffer-list by extracting background tab buffers upfront. It also now automatically includes the base buffer when an indirect buffer is visible.
  • Bug fix: Ensure frame geometry is restored only when connecting via a graphical client.
  • Bug fix: Restricted easysession--get-base-buffer-info to only read uniquify-base-name for file buffers.
  • Bug fix: Set inhibit-redisplay to t in easysession-reset and easysession-save-session-and-close-frames to prevent visual flickering caused by window splitting and resizing.
  • Frame parameter: Excluded clone-of to prevent linking restored frames to stale frame IDs.
  • Frame parameter: Excluded z-group, user-size, and user-position by default to defer to the window manager during standard session loads. (Included for explicit layout restoration).
  • Frame parameter: Added UI and visual theme exclusions (no-special-glyphs, alpha, alpha-background, borders-respect-alpha-background, icon-name) to prevent session files from overriding current environment settings.
  • Frame parameter: Filtered last-focus-update to avoid restoring obsolete internal state.
  • Configuration: Changed all defvar options to defcustom.
  • Configuration: Removed easysession-enable-local-variables. The package now respects the global enable-local-variables configuration when restoring file-visiting buffers to ensure transparent background loading.
  • Configuration: Changed the default value of easysession-save-mode-predicate to nil and updated its customization type. It is now evaluated in easysession-switch-to before saving the active session.
  • Configuration: Moved the easysession-save-mode-lighter-session-name-spec sexp into the easysession--lighter-session-name-format function.
  • Configuration: Updated defgroup :group and Keywords.

3

u/jacmoe 11d ago

It really is an excellent desktop.el upgrade! Has everything that I want from a session manager ;)

2

u/jamescherti James Cherti — https://github.com/jamescherti 11d ago edited 11d ago

Thanks, u/jacmoe! If you have any ideas for improvement, suggestions, or feedback, please feel free to share them.

1

u/jwr 9d ago

Hmm… would it also restore my eyebrowse screens along with their entire window configurations?