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

Have the History widget display a separate history for each console #7155

Open
bcolsen opened this issue May 20, 2018 · 5 comments
Open

Have the History widget display a separate history for each console #7155

bcolsen opened this issue May 20, 2018 · 5 comments

Comments

@bcolsen
Copy link
Member

bcolsen commented May 20, 2018

Currently the history is mixed for all open consoles it would make the most sense if the history was separated for each console.

From a use case prospective I think this isn't a good idea to have the history mixed and it would be better and simpler to have IPython take care of the history entirely as per the changes in #7141. We can just take what the console gives for it's history and not worry about it...it works great. This would require us to have one history tab per console, but luckily the history widget already has tabs implemented.

Currently, If you change between tabs and run commands in each the history gives you a mess of code that is most likely unassociated and you can tell what commands were executed in each console. The up arrow history at the ipython prompt keeps the history separate and when both sessions are closed the two histories are appended into the main history one console after the other so the code is still in blocks that are still associated.

The hardest part would be to synchronize the tab switching between the consoles and the history.

@ccordoba12 suggest to use a QStackedWidget like the variable explorer does instead of tabs

@ccordoba12 ccordoba12 added this to the v4.0betaX milestone May 20, 2018
@CAM-Gerlach CAM-Gerlach changed the title Have the History widget dislpay a separate history for each console Have the History widget display a separate history for each console May 20, 2018
@impact27
Copy link
Contributor

It would be quite easy to do, If you replace "iPython history" in register_client by the name of the console, you have a new tab with the correct name.
The tab are not automatically switched but this should not be a big problem.
The only issue I would see is that the log loaded from the file would be the same for all log tabs.

@ccordoba12
Copy link
Member

The only issue I would see is that the log loaded from the file would be the same for all log tabs.

Yeah, this is ugly. That's why (perhaps) it's better to show a single history instead of many tabs.

@impact27
Copy link
Contributor

Alternatively, 1 tab for the "old" history and many for the new histories?

@bcolsen
Copy link
Member Author

bcolsen commented May 24, 2018

@impact27 I think the idea is a redesigned history widget without tabs but using QStackedWidgets. In this way the history widget only shows the history of the currently displayed console. This would be similar to the way the variable explorer works currently.

@ccordoba12
Copy link
Member

Yes, that's the idea. The fact that after a restart the history of all consoles will be mixed up and exactly the same makes me prefer this alternative over the one of one history tab per console.

@ccordoba12 ccordoba12 modified the milestones: v4.0betaX, Not sorted Oct 11, 2018
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

3 participants