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

Sage-shell:restart-sage messing with the window configuration after running pdb #57

Open
ThibautVerron opened this issue Feb 19, 2021 · 0 comments

Comments

@ThibautVerron
Copy link

Hi,

As written in the title, sage-shell:restart-sage is messing up my window configuration. Sometimes it's as simple as bringing up a code buffer, sometimes it completely moves my windows around... In most cases simply calling winner-undo is enough to return to my window configuration, but as the session goes longer the modifications get more complex and even sometimes appear to not be undoable.

I believe that it is linked to the pdb-tracking feature. Namely, it seems that the feature to kill the buffers when exiting pdb does not run when I exit pdb with C-d or with q.

But it's only part of the problem: it may happen that one wants the source code buffers to stay live after exiting the debugger (for instance if they were already live to begin with, which I believe the tracker takes care of), but still that the window configuration does not change when restarting sage.

Steps to reproduce the problem (tested with a vanilla emacs with only sage-shell-mode installed: ./emacs-sandbox.sh -O -i sage-shell-mode (https://github.com/alphapapa/emacs-sandbox.sh))

  1. M-x sage-shell:run-sage
  2. In the buffer, enter:
import pdb
1/0
pdb.pm()
u 3

3. This opens a buffer visiting interactiveshell.py. At that point, inspecting sage-shell-pdb:buffers-to-kill shows that interactiveshell.py is in the list
4. Exit pdb (either with q or C-d)
5. The buffer is not killed.
6. Change the buffer displayed in the window where interactiveshell.py is.
7. Move the point back to the sage-shell buffer, and M-x sage-shell:restart-sage
8. The window configuration is changed to display interactiveshell.py again.

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

No branches or pull requests

1 participant