mindstream icon indicating copy to clipboard operation
mindstream copied to clipboard

Loading sessions with file navigation and completion

Open countvajhula opened this issue 1 year ago • 5 comments

Recently, there was a change to save sessions under their template name instead of simply at the top level at mindstream-save-session-path.

This ended up breaking mindstream-load-session since this was still listing top level contents of mindstream-save-session-path by name. This was fixed to show the contents of every top level folder by listing the contents of each folder and then appending them all together, but the drawbacks of this approach are:

  • the user cannot navigate to paths other than mindstream-save-session-path
  • the sessions are listed as absolute paths (rather than e.g. session names) which are harder to read
  • if a session is stored in a nested path or at the top level, it isn't possible to navigate to it since we have hardcoded the listing of toplevel+1 directory contents

It could be more natural for mindstream-load-session to show a file navigation selection menu that starts at mindstream-save-session-path and allows the user to navigate to the session they want to load (which may even be outside the save session path). But if we do it this way, then it seems as though we would lose the ability to have recent completion candidates displayed, so that's a tradeoff we'd be making.

To have the best of both, we could potentially modify mindstream-load-session to be file navigation-based, and introduce a separate feature called mindstream-load-recent-session which simply lists all recent sessions by name, and maps them under the hood to their absolute paths before loading them.

countvajhula avatar Oct 24 '24 02:10 countvajhula

a separate feature called mindstream-load-recent-session which simply lists all recent sessions by name, and maps them under the hood to their absolute paths before loading them.

Would this mean recent archived (non saved) sessions could be found using mindstream-load-recent-session This would be very useful to me - I often don't save my sessions, but want to pick up something from the last few days.

Would be nice to do this via a completing command.

danielneal avatar Oct 02 '25 09:10 danielneal

Hi @danielneal ! Sorry, I only just saw this. I think you're right that mindstream-load-recent-session should include both saved as well as archived sessions. If you're feeling up to it, I'd gladly accept a PR. No pressure, if not - just, I'm not able to get to this immediately myself.

countvajhula avatar Oct 06 '25 03:10 countvajhula

It also occurred to me, I assume you are using the default config with just one active anonymous session at a time per template, and which is automatically archived on startup?

You could try enabling multiple anonymous sessions that are persisted across restarts:

:custom 
(mindstream-persist t)
(mindstream-unique nil)

This would mean that all "recent" sessions that you are still working on would remain active until you explicitly either archive them or save them.

This might fit your workflow better, as you could C-c , o (mindstream-open) to open active sessions for a given template (or even C-c , O, mindstream-open-all), which would approximate the "open recent" behavior we're talking about.

countvajhula avatar Oct 06 '25 22:10 countvajhula

Thanks for the tip - I had been wondering about whether there was something in the settings that could help and this might do just the trick, thank you!

danielneal avatar Oct 08 '25 09:10 danielneal

Of course! Multiple + persistent sessions is how I configure it, myself.

countvajhula avatar Oct 09 '25 03:10 countvajhula