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

New magit-blame-quit micro-state stays on and breaks when you switch files. #3467

Closed
synic opened this issue Oct 19, 2015 · 12 comments
Closed

Comments

@synic
Copy link
Contributor

synic commented Oct 19, 2015

It doesn't turn off when you change buffers/files. After that, you cannot quit at all.

@syl20bnr
Copy link
Owner

This is a limitation of the micro-states, I don't see any satisfying solution to this problem. If we turn off the micro-state when switching the buffer then we have to quit magit-blame as well which is not very practical. We have the same issue with the time machine then.

Seems that a micro-state is not a good fit.

@synic
Copy link
Contributor Author

synic commented Oct 19, 2015

Yeah, seems to be a problem with the scroll micro state too. SPC n . and then switching buffers screws it all up.

@StreakyCobra
Copy link
Contributor

I don't know the underlying technology, so take my comment as an user point of view, and forgive my mistakes. As I just tested, it seems that a micro-state is specific to a buffer, and there can not be more than one micro-state active at the same time, even on different frames. So as soon as a buffer is changed, there is no reason to keep the micro-state open.

The question then become: Does it make sense to switch to another buffer when <micro-state-name> is active? If yes, it shouldn't be a micro-state. If no, it can be a micro-state.

For the scroll micro state, I don't really see reasons to switch to another buffer when scrolling, so it can be a micro-state. For the git blame and the time machine micro-states, users can want to switch to another buffer in some use-cases, but I think it is not the majority of cases.

So from my point of view, the better is to close a micro-state as soon as the buffer is changed, whether it is scroll, git blame or time machine. Also, git blame and time machine should be kept as micro-states because they are more useful in this form, but additionally other ways can be provided to use these functionalities in a way that allows buffers switching.

Here is my 2 cents.

@synic
Copy link
Contributor Author

synic commented Oct 19, 2015

There's no use-case for switching buffers with the scroll micro state open, other than the rather large one of "didn't turn scroll micro-state off when I switched buffers", which is exactly what happened to me.

Once in this state you cannot turn it on for your new buffer. That, to me, is a broken feature.

@StreakyCobra
Copy link
Contributor

So if micro-state gets always closed when switching buffers it should be fine, no?

@synic
Copy link
Contributor Author

synic commented Oct 19, 2015

Yes, that would work.

syl20bnr added a commit that referenced this issue Oct 20, 2015
@syl20bnr
Copy link
Owner

I pushed 7107ea5 which should fix this issue. The commit makes SPC g b idempotent so one can initiate it in a buffer, then switch to another buffer and discard the micro-state with q, when the user comes back to the magit-blame buffer he can press SPC g b again to reactivate the micro-state.

@synic
Copy link
Contributor Author

synic commented Oct 20, 2015

Actually, now SPC g b does not enter a micro-state at all anymore, d'oh. Time machine still works, though.

@robbyoconnor
Copy link
Contributor

Works for me

@synic
Copy link
Contributor Author

synic commented Oct 20, 2015

Hrmm, seems to be working for me now too. I don't know what I did
differently.

On Mon, Oct 19, 2015 at 8:41 PM robbyoconnor notifications@github.com
wrote:

Works for me


Reply to this email directly or view it on GitHub
#3467 (comment)
.

@synic
Copy link
Contributor Author

synic commented Nov 11, 2015

Should I close this?

@StreakyCobra
Copy link
Contributor

When it's Fixed in develop, it will be closed at the next release. If you want to close it in the meantime it's up to you :-)

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

No branches or pull requests

4 participants