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

Don't change tabs' last-used order when saving activities #92

Open
manphiz opened this issue May 19, 2024 · 1 comment
Open

Don't change tabs' last-used order when saving activities #92

manphiz opened this issue May 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working compatibility good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@manphiz
Copy link

manphiz commented May 19, 2024

Emacs version: 29.3
Activities version: 0.7

When emacs tabs are managed by activities, the last visited tab may change to some other activities managed tab, which I supposed may be due to activities autosaving during which tabs are visited and hence changed the visit history.

For example, I have 3 tabs managed by activities, and I visit tab 1 and then tab 3, and then I try to switch back to tab 1 using C-x t RET (tab-switch). If I do it quickly enough, the default tab-name would be tab 1 when I do C-x t RET interactively. But when I spend a little longer in tab 3 and then try to switch, the default tab-name may become tab 2.

I suppose this is because activities will save the states of each managed tab periodically, during which each tab would be visited and hence the tab history would be changed accordingly. Please do correct me if I'm wrong.

I guess this issue lies somewhere between a bug and a feature request. I understand that tab visit history management may not be trivial in Emacs. Still It would be great if at least last visited tab can stay unchanged so that I can type C-x t RET to switch between the last 2 visited tabs quickly.

@alphapapa
Copy link
Owner

Thanks for filing this. I've noticed something like this behavior myself, where C-x t RET RET doesn't switch to the tab I expected, but I hadn't been able to figure out why. This is likely the problem.

I'm not sure of the best way to fix it. Maybe there's a way to prevent switching tabs from affecting the list of recently used tabs (or their order in...whatever internal variable is relevant). It might require a patch to Emacs itself to permit that; some investigation is needed.

I don't expect to have time to work on this soon, so if anyone else would like to work on this, feel free. Thanks.

@alphapapa alphapapa self-assigned this May 20, 2024
@alphapapa alphapapa added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers compatibility labels May 20, 2024
@alphapapa alphapapa added this to the Future milestone May 20, 2024
@alphapapa alphapapa changed the title Make activities maintain last visited tab to have consistent tab-switch behavior Don't change tabs' last-used order when saving activities May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants