From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jos=E9_A=2E_Romero_L=2E?= Newsgroups: gmane.emacs.help Subject: Re: How to update modelines of all displayed buffers Date: Fri, 16 Apr 2010 14:58:39 -0700 (PDT) Organization: http://groups.google.com Message-ID: <92b697e6-c48d-480b-b629-9514b9996276@c21g2000yqk.googlegroups.com> References: <87y6gor07c.fsf@linux-lqcw.site> <87fx2vvp8r.fsf@linux-lqcw.site> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273007966 14678 80.91.229.12 (4 May 2010 21:19:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 21:19:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 04 23:19:25 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@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 1O9PWR-0001m4-6F for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 23:19:19 +0200 Original-Received: from localhost ([127.0.0.1]:32884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9PWQ-00058n-C0 for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 17:19:18 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!c21g2000yqk.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: 89.78.68.41 Original-X-Trace: posting.google.com 1271455119 22511 127.0.0.1 (16 Apr 2010 21:58:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 16 Apr 2010 21:58:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c21g2000yqk.googlegroups.com; posting-host=89.78.68.41; posting-account=mkEKGAoAAACAV2vhv5r9WHXWqsdL_niD User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:177730 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73178 Archived-At: On 16 Kwi, 09:19, Cecil Westerhof wrote: (...) > > (defun update-mode-line-all-buffers () > > =A0 (save-current-buffer > > =A0 =A0 (dolist (b (buffer-list)) > > =A0 =A0 =A0 (set-buffer b) > > =A0 =A0 =A0 (buffer-update-mode-line)))) > > This does all buffers. Is it possible to do it only for displayed > buffers? (...) You could try something like this: (mapc (lambda (b) (set-buffer b) (buffer-update-mode-line)) (delete-dups (mapcar 'window-buffer (apply 'append (mapcar 'window-list (frame-list)))))) though if you refactored your buffer-update-mode-line to accept the buffer as parameter you could write this a bit more elegantly: (mapc 'buffer-update-mode-line (delete-dups (mapcar 'window-buffer (apply 'append (mapcar 'window-list (frame-list)))))) Cheers, -- Jos=E9 A. Romero L. escherdragon at gmail "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed)