From: Alexander Shukaev <haroogan@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Minibuffer tray to display current time and date
Date: Tue, 28 Apr 2015 19:27:05 +0200 [thread overview]
Message-ID: <CAKu-7WwnNMNCi68ydLxPE47-dCfuxiWvoVXrm5FK4dTFMcDbxA@mail.gmail.com> (raw)
In-Reply-To: <jwv1tj6be7v.fsf-monnier+gmane.emacs.help@gnu.org>
Sweet, Stefan. Thanks a lot. I've just installed it, and even though
it's that simple, yet does the job.
One feature I thought about is justifying it to the right. This function
should do the job:
(defun minibuffer-line-right-justified
(string)
(format (format "%d %%s" (- (window-width (minibuffer-window)) (length
string))) string))
and then:
(setq-default minibuffer-line-format
'((:eval (minibuffer-line-right-justified
(format-time-string "%R %F")))))
The problem occurs when Emacs frame is resized, for example. So probably
`minibuffer-line--update' would have to be installed as a hook or
post--advice to resizing routines. Unfortunately, I'm not sure how to do
that correctly. What do you think?
Also, it would be nice to have an ability to highlight only certain parts
of this minibuffer line. For instance, I've tried:
(setq-default minibuffer-line-format
'((:eval (propertize (format-time-string "%R")
'font-lock-face
'minibuffer-line-time))
" "
(:eval (format-time-string "%F"))))
Where `minibuffer-line-time' was my custom face, but it did not work. I
assume that this is due to the `(format-mode-line minibuffer-line-format
'minibuffer-line)' call.
Lastly,
(defgroup minibuffer-line ()
"Use the idle minibuffer window to display status information."
:group 'mode-line)
what about a new separate group `minibuffer-line'?
Kind regards,
Alexander
On Mon, Apr 27, 2015 at 2:36 AM, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
> BTW, I've just pushed a new `minibuffer-line' package to elpa.git which
> provides a new `minibuffer-line-mode' controlled by
> `minibuffer-line-format'. It defaults to displaying the hostname, date,
> and time.
>
>
> Stefan
>
>
>
next prev parent reply other threads:[~2015-04-28 17:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 16:07 Minibuffer tray to display current time and date Alexander Shukaev
2015-04-22 16:11 ` Eli Zaretskii
2015-04-22 16:17 ` Alexander Shukaev
2015-04-22 16:57 ` Michael Heerdegen
2015-04-22 17:05 ` Stefan Monnier
[not found] ` <mailman.1379.1429722347.904.help-gnu-emacs@gnu.org>
2015-04-23 0:59 ` Emanuel Berg
2015-04-23 15:15 ` Jorge A. Alfaro-Murillo
[not found] ` <mailman.1461.1429802140.904.help-gnu-emacs@gnu.org>
2015-04-23 15:43 ` Emanuel Berg
2015-04-23 18:11 ` Jorge A. Alfaro-Murillo
[not found] ` <mailman.1474.1429812715.904.help-gnu-emacs@gnu.org>
2015-04-23 22:46 ` Emanuel Berg
2015-04-24 14:13 ` tomas
2015-04-24 14:41 ` Eli Zaretskii
2015-04-24 14:57 ` Jorge A. Alfaro-Murillo
2015-04-24 16:48 ` Eli Zaretskii
2015-04-24 20:18 ` Jorge A. Alfaro-Murillo
[not found] ` <mailman.1562.1429906736.904.help-gnu-emacs@gnu.org>
2015-04-25 1:11 ` Dan Espen
2015-04-26 2:38 ` Jorge A. Alfaro-Murillo
2015-04-26 14:48 ` Eli Zaretskii
2015-04-26 15:52 ` tomas
2015-04-26 16:05 ` Eli Zaretskii
2015-04-27 0:36 ` Stefan Monnier
2015-04-28 17:27 ` Alexander Shukaev [this message]
2015-04-28 17:30 ` Eli Zaretskii
2015-04-28 17:32 ` Alexander Shukaev
2015-04-28 17:55 ` Eli Zaretskii
2015-04-29 0:53 ` Stefan Monnier
[not found] ` <mailman.1824.1430242034.904.help-gnu-emacs@gnu.org>
2015-04-28 17:58 ` Emanuel Berg
2015-04-29 0:55 ` Stefan Monnier
2015-05-01 4:49 ` Alexander Shukaev
2015-05-01 4:54 ` Alexander Shukaev
2015-05-06 10:31 ` Alexander Shukaev
2015-05-06 12:49 ` Stefan Monnier
2015-05-12 11:34 ` Alexander Shukaev
2015-05-14 19:44 ` Stefan Monnier
2015-06-25 19:18 ` Alexander Shukaev
[not found] ` <mailman.2858.1431430470.904.help-gnu-emacs@gnu.org>
2015-05-12 17:24 ` Emanuel Berg
[not found] ` <mailman.1537.1429888188.904.help-gnu-emacs@gnu.org>
2015-04-25 1:16 ` Emanuel Berg
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=CAKu-7WwnNMNCi68ydLxPE47-dCfuxiWvoVXrm5FK4dTFMcDbxA@mail.gmail.com \
--to=haroogan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).