Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ivy.el (ivy-resume): automatically resume to last resumable session #2785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kiennq
Copy link
Contributor

@kiennq kiennq commented Jan 12, 2021

Current when we try to resume to current ivy-last, sometimes it failed with The last session isn't compatible with ivy-resume.
However, we already have a list of resumable sessions stored in ivy--sessions already. That can be used to automatically determine the session to be resumed from when invoked by ivy-resume.

In this change:

  • Make ivy--sessions store the session as a stack, so the last used session will always on top
  • In case current session is not compatible with ivy-resume, use the top of ivy--sessions as the desired session.

Copy link
Collaborator

@basil-conto basil-conto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from a couple of minor nits, LGTM, thanks.

ivy.el Outdated Show resolved Hide resolved
ivy.el Outdated Show resolved Hide resolved
@kiennq
Copy link
Contributor Author

kiennq commented Jan 15, 2021

@basil-conto Is this okay to be merged?

@basil-conto
Copy link
Collaborator

Is this okay to be merged?

It looks fine to me, but that's for @abo-abo to decide, sorry.

@kiennq
Copy link
Contributor Author

kiennq commented Jan 16, 2021

I see, thanks

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.

None yet

2 participants