Skip to content

Save session every time a buffer gets opened/closed#128

Open
jbmestelan wants to merge 4 commits intoparkouss:masterfrom
jbmestelan:save_session
Open

Save session every time a buffer gets opened/closed#128
jbmestelan wants to merge 4 commits intoparkouss:masterfrom
jbmestelan:save_session

Conversation

@jbmestelan
Copy link
Copy Markdown
Contributor

As mentioned in #119, it happens that a webmacs instance ends unexpectedly. It is then a minor annoyance to also lose the state of the session (which is reset to the start of the last session). With this commit, webmacs saves the session every time a buffer gets opened or closed.

It might not be the right way of doing things; in which case, I will gladly to listen to suggestions.

@jbmestelan
Copy link
Copy Markdown
Contributor Author

I realize that the part which saves on 'load' fails, and have disabled it. I am looking into it now. Sorry, this is a patch I had had aside for some time; it deserves better testing.

@parkouss
Copy link
Copy Markdown
Owner

I like the idea, but maybe it should be an option to automatically save session on each load?

@jbmestelan
Copy link
Copy Markdown
Contributor Author

Commit 72e9c53 adds a condition on the variable save_session_on_buffer_event. Also updates session on buffer close. The part which updates on 'load' looks correct to me, after commit e38af03.

@jbmestelan
Copy link
Copy Markdown
Contributor Author

Does the change correspond to what you had in mind? I have been using this modified version since then, and find it to behave OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants