Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!weiner From: weiner@novavax.UUCP (Bob Weiner) Newsgroups: comp.emacs Subject: Problem with buffer object life in GNU Emacs Lisp Message-ID: <1414@novavax.UUCP> Date: 5 Aug 89 02:47:55 GMT Organization: Nova University, Fort Lauderdale, FL Lines: 28 If you do something like: (setq rmail-summary-buffer (get-buffer "RMAIL-summary")) and then kill the actual summary buffer, rmail-summary-buffer will now reference a 'killed buffer' object. Typical code uses get-buffer to check if such a buffer exists, if it does not, get-buffer usually returns nil. The global reference rmail-summary-buffer prevents the object from being garbage collected so (get-buffer "RMAIL-summary") still returns a non-nil value and your conditional code fails. But if you try to do anything with typical operations on this killed buffer you get errors, as you would expect. If one made rmail-summary-buffer reference the buffer name instead of the buffer object, there would be no problem, but often referencing the object is preferred. Is there a function such as 'get-non-killed-buffer' which solves this problem or something else that I am missing? This is all based on GNU Emacs 18.52. Thanks for any help. -- Bob Weiner, Motorola, Inc., USENET: ...!gatech!uflorida!novavax!weiner (407) 738-2087 -- Bob Weiner, Motorola, Inc., USENET: ...!gatech!uflorida!novavax!weiner (407) 738-2087