From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: threads and kill-buffer Date: Fri, 07 Sep 2012 10:44:58 -0400 Message-ID: References: <87a9x55xvd.fsf@fleche.redhat.com> <5046D668.4010105@yandex.ru> <50471EEB.9030405@gmx.at> <837gs8e8n7.fsf@gnu.org> <50484E88.4080804@gmx.at> <83lignd1o8.fsf@gnu.org> <5048B623.9050802@gmx.at> <83ehmfciag.fsf@gnu.org> <5048C98A.4070303@gmx.at> <5048DF46.9000003@gmx.at> <5049C3DE.6020403@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347029120 6739 80.91.229.3 (7 Sep 2012 14:45:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2012 14:45:20 +0000 (UTC) Cc: tromey@redhat.com, Eli Zaretskii , dmantipov@yandex.ru, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 07 16:45:21 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9zo4-0000rb-6G for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2012 16:45:16 +0200 Original-Received: from localhost ([::1]:42027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9zo1-000345-3p for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2012 10:45:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9znv-00031k-6s for emacs-devel@gnu.org; Fri, 07 Sep 2012 10:45:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9znq-00035i-Bw for emacs-devel@gnu.org; Fri, 07 Sep 2012 10:45:07 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:59093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9znq-00032x-7k; Fri, 07 Sep 2012 10:45:02 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q87Eiwk4000716; Fri, 7 Sep 2012 10:44:58 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id CE8C0B4085; Fri, 7 Sep 2012 10:44:58 -0400 (EDT) In-Reply-To: <5049C3DE.6020403@gmx.at> (martin rudalics's message of "Fri, 07 Sep 2012 11:52:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153149 Archived-At: >>> And if, at the time it gets killed, *Backtrace* appears in a window >>> managed by thread A what do I see after it has been killed? >> Some other buffer: a window cannot display a killed buffer. > So killing a buffer will change the current buffer when it's displayed > in a window and leave it unchanged otherwise. Would we really like such > behavior? No, killing a buffer will undisplay it from wherever it is displayed (as is the case now). But this has no influence of what `current-buffer' is. IOW: currently kill-buffer does: 1- undisplay the buffer. 2- change current-buffer if needed. 3- set buffer-name to nil (and remove from buffer-list). 4- throw away some internal data (like the buffer's text). So one way to handle the problem with threading is that kill-buffer doesn't do 2 and 4 any more, instead 4 is delayed to the moment when the buffer is not current anywhere any more (could be detected by the GC, for example). Stefan