The solution is much simpler than suggested by my own theories (see above).
It turns out that the intended effect of #+STARTUP hideblocks is overruled by the initial visibility setting #+STARTUP showeverything, which is now default.
So, by combining #+STARTUP hideblocks with #+STARTUP showall or (equivalently) #+STARTUP nohide, the desired effect can be ...
That gdb ninja stuff, I never got around to doing.
In hindsight, I feel I shouldn't have been running emacs 27 when brew makes 28 available.
I did a
brew install emacs --HEAD
and its been running a day without crashing.
sidenote: use-package broke after the re-install. i had to Meta-: eval some lisp to get it back up.
sidenote: the brew install broke my ...
When you enter a newline in Python mode, it calls the hook electric-indent-post-self-insert-function. This function calls (eventually) pm-indent-line-dispatcher, provided by polymode to fill the role of indent-according-to-mode.
In order for polymode to know what mode you're in, and what the appropriate indentation for that mode is, it needs to know the mode ...