wbolster / emacs-python-pytest

run pytest inside emacs
BSD 3-Clause "New" or "Revised" License
147 stars 25 forks source link

Dismissable, read-only results #45

Open omgitsaheadcrab opened 3 years ago

omgitsaheadcrab commented 3 years ago

Currently the results buffer is derived from comint-mode to facilitate using the debugger. This makes the buffer less user friendly in normal use.

In the current workflow running a test opens a new editable results window, which (for me at least) is out of focus. To close it I need to switch focus C-x o and then hide that window C-x 0.

An improved situation would be if the results window took focus, much like a compilation buffer and was read-only (special-mode maybe?). This could then easily be dismissed by pressing q.

To make this work the buffer would have to toggle read-only states when writing test results and disable it when a debugger is in-use.

wbolster commented 3 years ago

i don't think there's an (easy) way to distinguish between non-interactive use and interactive use (e.g. debugger breakpoint).

re the window behaviour: i think display-buffer-alist may help here?