Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!rpi.edu!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: gnu.emacs.bug Subject: Crashing Emacs in one short (let ...) Message-ID: Date: 15 Apr 89 19:46:33 GMT Sender: usenet@rpi.edu Reply-To: tale@pawl.rpi.edu Distribution: gnu Lines: 43 GNU Emacs 18.53.2 of Tue Apr 11 1989 on imagine.pawl.rpi.edu (berkeley-unix) Although I know what is causing a problem here, I think Emacs could be slightly more graceful about recovering from it. Repeat by: (let ((win (selected-window))) (pop-to-buffer "*crash*") (enlarge-window (- (screen-height) (window-height)) (select-window win))) At this point Emacs will die an ugly death, reporting that the marker does not point anywhere and that Fatal Error(6.) has occurred. The error in the lisp fragment above is in referencing a window for select-window that is no longer visible. Playing around some, I also found this caused Emacs considerable grief: (setq grief (selected-window)) => # (switch-to-buffer "*Newsgroup*") grief => # (switch-to-buffer-other-window "*post-news*") grief => # (delete-other-windows) grief => # ... hmm ... looks like it is still active. When I did this just a couple of minutes ago, I followed it with (select-window grief) and Emacs had a lot of problems with that. Somehow through it all it did not crash (though it was hardly working as it should -- correction, as I expect it to) but it took many C-g's and other miscellaneous key punching to get seemingly back to normal (now #). Trying to figure out a way to build around this in the code that led me to the first lisp segment above, I have only found (if (get-buffer-window (window-buffer win)) (select-window win)) to do the trick (though there might be another way). -- tale@rpitsmts.bitnet, tale%mts@itsgw.rpi.edu, tale@pawl.rpi.edu