unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: How to update modelines of all displayed buffers
Date: Sat, 17 Apr 2010 00:49:38 +0200	[thread overview]
Message-ID: <87mxx36mil.fsf@fh-trier.de> (raw)
In-Reply-To: 87y6gor07c.fsf@linux-lqcw.site

Cecil Westerhof <Cecil@decebal.nl> writes:

> I have defined the following function:
>     (defun buffer-update-mode-line ()
>       (setq buffer-mode-line (buffer-mode-line-extra))
>       (force-mode-line-update t))
>
> The function buffer-mode-line-extra gives the extra data I want to
> display in the modeline.
>
> It is called every minute with:
>     (run-with-timer 60 60 'buffer-update-mode-line)
>
> With this only the modeline of the current buffer is updated. In
> principal (force-mode-line-update t) makes all modelines updated, but
> that will only work if for every (visible) buffer buffer-mode-line is
> updated with the function buffer-mode-line-extra. Is there a way to get
> this done?

(defun displayed-buffer-list (&optional all-frames)
  (flet ((fn (buf) (get-buffer-window buf all-frames)))
    (remove-if-not #'fn (buffer-list))))

ap


      parent reply	other threads:[~2010-04-16 22:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15 19:21 How to update modelines of all displayed buffers Cecil Westerhof
2010-04-16  2:17 ` Barry Margolin
2010-04-16  7:19   ` Cecil Westerhof
2010-04-16 21:58     ` José A. Romero L.
2010-04-16 22:49 ` Andreas Politz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mxx36mil.fsf@fh-trier.de \
    --to=politza@fh-trier.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).