From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: Increasing the rate of modeline display Date: Fri, 6 Mar 2015 08:20:41 -0300 Message-ID: References: <83oao6o8k8.fsf@gnu.org> <83fv9io2b2.fsf@gnu.org> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1425640857 15336 80.91.229.3 (6 Mar 2015 11:20:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Mar 2015 11:20:57 +0000 (UTC) Cc: emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 06 12:20:56 2015 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 1YTqJM-00009L-6A for ged-emacs-devel@m.gmane.org; Fri, 06 Mar 2015 12:20:56 +0100 Original-Received: from localhost ([::1]:57481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTqJL-0003oZ-H9 for ged-emacs-devel@m.gmane.org; Fri, 06 Mar 2015 06:20:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTqJE-0003hz-Aq for emacs-devel@gnu.org; Fri, 06 Mar 2015 06:20:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTqJD-0001PD-Ai for emacs-devel@gnu.org; Fri, 06 Mar 2015 06:20:48 -0500 Original-Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]:41150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTqJ8-0001H9-O5; Fri, 06 Mar 2015 06:20:43 -0500 Original-Received: by lbvp9 with SMTP id p9so33893086lbv.8; Fri, 06 Mar 2015 03:20:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=gDDuXAaH8+PuHzUaznyPTqlapueclJ5qpZxqh6rG3OA=; b=AlIWGXBJiQ6tnaSegH1Pb5XUlaMA3pvV3Y1oI4sMORdkKA3MNnRiy0CJvJ5+/u0Xdw efERAsa3OVQADLs3HsiGgvl1P5LTBv4M4qv3pcboTXv2vct0eZPV7Tb36ftbA/WH3n1c 6En58bt4ih9+qcO/eAWcsmV/mxA4smcbIndyrD6Ao/nsh/2pdiVMELZiEF0o13LohdQj 0l+M0YtKfwTsZqAJqd1utgf1WyvuGKu5KcacK2FrIkTxFRSNFwGqHhUurNnCYDbyvDQK KznwUxi8fZr1TA1yGQGOJMDbB+rc1Uh/r9GZFU/VO007l6nD2H/TixJ/w+dXhTi8xayZ qYhw== X-Received: by 10.112.36.69 with SMTP id o5mr12470827lbj.59.1425640841985; Fri, 06 Mar 2015 03:20:41 -0800 (PST) Original-Received: by 10.112.207.225 with HTTP; Fri, 6 Mar 2015 03:20:41 -0800 (PST) In-Reply-To: <83fv9io2b2.fsf@gnu.org> X-Google-Sender-Auth: HiDzcuDcI_PYtXbIagY0oB8zamc X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::230 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:183695 Archived-At: > 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