From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: force-mode-line-update ALL argument Date: Sun, 23 May 2010 14:16:27 +0200 Message-ID: <4BF91C9B.4020404@gmx.at> References: <4BF79AE5.6010007@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274617011 21496 80.91.229.12 (23 May 2010 12:16:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 May 2010 12:16:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: MON KEY Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 23 14:16:45 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OGA6l-0001zG-3r for ged-emacs-devel@m.gmane.org; Sun, 23 May 2010 14:16:43 +0200 Original-Received: from localhost ([127.0.0.1]:40394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGA6k-00041P-2l for ged-emacs-devel@m.gmane.org; Sun, 23 May 2010 08:16:42 -0400 Original-Received: from [140.186.70.92] (port=51969 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGA6d-00041I-Kn for emacs-devel@gnu.org; Sun, 23 May 2010 08:16:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGA6a-0003SR-Ce for emacs-devel@gnu.org; Sun, 23 May 2010 08:16:35 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:57058) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OGA6Z-0003SC-Sg for emacs-devel@gnu.org; Sun, 23 May 2010 08:16:32 -0400 Original-Received: (qmail invoked by alias); 23 May 2010 12:16:29 -0000 Original-Received: from 62-47-45-2.adsl.highway.telekom.at (EHLO [62.47.45.2]) [62.47.45.2] by mail.gmx.net (mp068) with SMTP; 23 May 2010 14:16:29 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/RZ3Zj4K7Rx2CEwbPZguvb4/siqJBvSO/Wc6s4po UOWn5jvqjXilZx User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125108 Archived-At: >> What makes you conclude that a `set-buffer' on the value returned by >> `other-buffer' causes updating the modeline > > I trust (my assummption) that it does. > I have no way to _visually_ confirm this. Its Kantian Emacsology :P The entire idea is that `set-buffer' should not have an effect on the mode line, only `set-window-buffer' should. >> of a buffer that maybe has neither been changed nor displayed? > > The return value of `other-buffer' is not affected by whether it has been > changed but it does affect it. It does affect what? >> What is a non-visible buffer on a frame? > > Precisely that. > >> When a buffer is visible it is on a frame. >> When a buffer is not visible it is on no frame. > >>From :FILE src/buffer.c > > /* Switch to buffer B temporarily for redisplay purposes. > This avoids certain things that don't need to be done within > redisplay. */ set_buffer_temp doesn't enter here. > /* Move the assoc for buffer BUF to the front of buffer-alist. Since > we do this each time BUF is selected visibly, the more recently > selected buffers are always closer to the front of the list. This > means that other_buffer is more likely to choose a relevant buffer. > */ record_buffer doesn't enter here either. > /* Set the current buffer to B. > > We previously set windows_or_buffers_changed here to invalidate > global unchanged information in beg_unchanged and end_unchanged. > This is no longer necessary because we now compute unchanged > information on a buffer-basis. Every action affecting other > windows than the selected one requires a select_window at some > time, and that increments windows_or_buffers_changed. */ This must be the clue ;-) In fact, this change 1999-09-02 Gerd Moellmann * buffer.c (set_buffer_internal): Never set windows_or_buffers_changed. completely defeats the purpose of (if all (with-current-buffer (other-buffer))) in `force-mode-line-update' and the ALL argument has no effect. When the current buffer is shown in some window, the following snippet from Fset_buffer_modified_p XSETBUFFER (buffer, current_buffer); window = Fget_buffer_window (buffer, Qt); if (WINDOWP (window)) { ++update_mode_lines; asserts that _all_ modelines are updated. If the current buffer is not shown in any window, other modelines are not updated even if the ALL argument has been set. Now, usually the current buffer is shown in the selected window, so this went by unnoticed ever since that. > Good luck! :) Thanks, martin