all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Increasing the rate of modeline display
Date: Fri, 6 Mar 2015 08:20:41 -0300	[thread overview]
Message-ID: <CAAdUY-+nk8gLLY3XB-7H_aYdMOovjaF3tXSxu5v7RDi_DUTtMg@mail.gmail.com> (raw)
In-Reply-To: <83fv9io2b2.fsf@gnu.org>

> How can Emacs know that the value of the eval form changed?  It can't,
> unless it actually eval's it, can it?

Yes, I understand why the default behavior is like that. I was
wondering whether there was a simple way to change that temporarily
(e.g. have the mode-line update at least once per second).

> You will see that 'display-time', which does similar things, uses a
> timer, which changes the mode-line contents independently of Emacs
> recomputing it.

Thanks for the pointer. I've now resigned to using timers as well
(wasn't terrible, but about half the code is dedicated to that now
=/).

> What real-life use case is behind your example?

I'm writing a package that adds a spinner to the mode-line (some form
of simple ascii animation to indicate that there is an ongoing
operation). For that, I need to update the mode-line every second
(preferably twice per second), while the spinner is active.

Here is the (mostly finished) code: https://github.com/Bruce-Connor/spinner.el



  reply	other threads:[~2015-03-06 11:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAAdUY-LLaSjRgx3FXi1OdrhS6EgBkhrLknjBW5EKMdhuHAJUeA@mail.gmail.com>
2015-03-05 20:24 ` Increasing the rate of modeline display Artur Malabarba
2015-03-06  8:04   ` Eli Zaretskii
2015-03-06  8:50     ` Artur Malabarba
2015-03-06  9:12     ` Artur Malabarba
2015-03-06  9:13       ` Artur Malabarba
2015-03-06 10:20       ` Eli Zaretskii
2015-03-06 11:20         ` Artur Malabarba [this message]
2015-03-06 11:34           ` Eli Zaretskii
2015-03-06 13:24           ` Thien-Thi Nguyen

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

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

  git send-email \
    --in-reply-to=CAAdUY-+nk8gLLY3XB-7H_aYdMOovjaF3tXSxu5v7RDi_DUTtMg@mail.gmail.com \
    --to=bruce.connor.am@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.