[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Global bar to display global information

From: Jérémy Compostella
Subject: Re: Global bar to display global information
Date: Sun, 21 Aug 2011 17:50:54 +0200
User-agent: Gnus/5.110017 (No Gnus v0.17) Emacs/23.2 (gnu/linux)

Stefan, and others,

I made some tries with the " *Minibuffer-0*" buffer and I got some very
encouraging results. Indeed, I am now able to display information like
date/time, current activity or my jabber status in a fashion I like :) I
have tried this with Emacs 23.2.1 and the Emacs trunk and it works the
same way.

For example, the following line of code will display the date and time
when the echo area is unused:

  (defun display-status ()
    (with-current-buffer " *Minibuf-0*"
      (delete-region (point-min) (point-max))
      (insert (format-time-string "%Hh%M %d/%m/%Y" (current-time)))
      (put-text-property (point-min) (point-max) 'face 'bold)))
  (run-at-time t 60 'display-status)

My implementation do more than that but is not generic enough to be
published now.

Yet, the displayed information is not completely stable. What I mean is
that if I move the cursor in another buffer, the echo area is sometimes
cleared. It's a little bit annoying. How could I fix this without
advising several cursor displacement function ?

Thanks for helping me,

Sent from my Emacs

reply via email to

[Prev in Thread] Current Thread [Next in Thread]