Skip to content

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

Open
kiennq wants to merge 1 commit intoabo-abo:masterfrom
kiennq:bug/ivy-resume
Open

ivy.el (ivy-resume): automatically resume to last resumable session#2785
kiennq wants to merge 1 commit intoabo-abo:masterfrom
kiennq:bug/ivy-resume

Conversation

@kiennq
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread ivy.el Outdated
Comment thread ivy.el Outdated
@kiennq
Copy link
Copy Markdown
Contributor Author

kiennq commented Jan 15, 2021

@basil-conto Is this okay to be merged?

@basil-conto
Copy link
Copy Markdown
Collaborator

Is this okay to be merged?

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

@kiennq
Copy link
Copy Markdown
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.

2 participants