[Top][All Lists]

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

Re: Minibuffer tray to display current time and date

From: Michael Heerdegen
Subject: Re: Minibuffer tray to display current time and date
Date: Wed, 22 Apr 2015 18:57:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Alexander Shukaev <address@hidden> writes:

> ‚ÄčThat's the thing, mode line would be too cluttered then.  In
> particular, when splits are used, there is no reason to duplicate such
> global information as current time and date.  That's why I think
> placing them into minibuffer might be a good idea.‚Äč

>From what you were saying, I think you mean to display the time in the
echo area, not the minibuffer.

That could simply be done using `message'.  One should take care of not
cluttering *Messages* and avoid erasing other messages.

I would try starting like this:

--8<---------------cut here---------------start------------->8---
  (defvar current-time-string "")
   1 1
   (lambda ()
     (let ((message-log-max nil))
       (unless (minibuffer-window-active-p (minibuffer-window))
         (when (member (current-message)
                       (list current-time-string nil))
           (message "%s" (setq current-time-string
--8<---------------cut here---------------end--------------->8---

Alignment and combining with other messages could be done too.

Just an idea, admittedly this code is not super elegant.


reply via email to

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