From: Michael Albinus <michael.albinus@gmx.de>
To: Tom Tromey <tromey@redhat.com>
Cc: Ted Zlatanov <tzz@lifelogs.com>, ding@gnus.org, emacs-devel@gnu.org
Subject: Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters
Date: Mon, 21 Feb 2011 19:54:21 +0100 [thread overview]
Message-ID: <87zkpp43s2.fsf@gmx.de> (raw)
In-Reply-To: <m34o7ywo0u.fsf@fleche.redhat.com> (Tom Tromey's message of "Sun, 20 Feb 2011 11:37:21 -0700")
Tom Tromey <tromey@redhat.com> writes:
> Tom> How about propertizing the the mode-line so that the background color
> Tom> changes from left to right as the task progresses?
>
> Michael> That would be an invasive patch: the modeline string is known only in
> Michael> xdisp.c, and we would need to change it there.
>
> I think you could save the old mode line and replace it with an :eval
> form that calls format-mode-line and then propertizes it.
Ah, yes. I was not aware of `format-mode-line'. It also works with my
proposed patch, and the following snippet:
--8<---------------cut here---------------start------------->8---
(defun blink-mode-line ()
(let* ((pos (mod count (length mlf))))
(setq count (1+ count))
(concat (substring mlf 0 pos)
(propertize (substring mlf pos (1+ pos)) 'face '(:inverse-video t))
(substring mlf (1+ pos) (length mlf)))))
(setq count 0
pr (make-progress-reporter 'mode-line-format))
(let ((mlf (format-mode-line mode-line-format t))
(progress-reporter--pulse-characters (vector '(:eval (blink-mode-line)))))
(while t (progress-reporter-update pr)))
--8<---------------cut here---------------end--------------->8---
> I agree with Ted that it might not always be great. But I was only
> proposing it as a option, not as the only way.
Yes, it doesn't look so good.
> Tom
Best regards, Michael.
next prev parent reply other threads:[~2011-02-21 18:54 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-17 3:36 auth-source-search: annoying messages Miles Bader
2011-02-17 12:14 ` Ted Zlatanov
2011-02-17 12:30 ` Michael Albinus
2011-02-17 13:41 ` Ted Zlatanov
2011-02-17 16:06 ` Michael Albinus
2011-02-17 16:50 ` make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters (was: auth-source-search: annoying messages) Ted Zlatanov
2011-02-17 21:43 ` make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters Michael Albinus
2011-02-18 14:47 ` Tom Tromey
2011-02-18 20:08 ` Ted Zlatanov
2011-02-20 11:29 ` Michael Albinus
2011-02-20 11:33 ` Michael Albinus
2011-02-20 18:37 ` Tom Tromey
2011-02-21 18:54 ` Michael Albinus [this message]
2011-02-22 17:28 ` Ted Zlatanov
2011-02-23 8:23 ` Lars Ingebrigtsen
2011-02-23 8:46 ` Michael Albinus
2011-02-23 15:08 ` Ted Zlatanov
2011-02-23 15:59 ` Michael Albinus
2011-02-23 16:43 ` Ted Zlatanov
2011-02-23 20:56 ` Chong Yidong
2011-02-23 21:28 ` make-progress-reporter suggestions: 'modeline and customizableprogress-reporter--pulse-characters Drew Adams
2011-02-23 21:35 ` make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters Ted Zlatanov
2011-02-23 21:48 ` Global indicators (was: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters) Julien Danjou
2011-02-24 0:05 ` Global indicators Chong Yidong
2011-02-24 0:13 ` Drew Adams
2011-02-24 11:02 ` Julien Danjou
2011-02-24 11:12 ` Miles Bader
2011-02-24 11:42 ` Julien Danjou
2011-02-24 12:56 ` joakim
2011-02-25 2:41 ` Miles Bader
2011-02-24 12:37 ` David Kastrup
2011-02-24 13:56 ` Julien Danjou
2011-02-24 16:50 ` Ted Zlatanov
2011-02-23 21:53 ` make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters Eli Zaretskii
2011-02-24 16:37 ` Ted Zlatanov
2011-02-23 22:04 ` David Kastrup
2011-02-24 0:38 ` Ted Zlatanov
2011-02-24 1:27 ` make-progress-reporter suggestions: 'modeline and customizableprogress-reporter--pulse-characters Drew Adams
2011-02-24 2:01 ` make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters Chong Yidong
2011-02-24 3:15 ` Ted Zlatanov
2011-02-24 16:55 ` Stefan Monnier
2011-02-24 17:45 ` Drew Adams
2011-02-24 18:05 ` Global indicators (was: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters) Ted Zlatanov
2011-02-24 19:56 ` Global indicators Michael Albinus
2011-03-01 18:25 ` Ted Zlatanov
2011-03-28 18:44 ` Ted Zlatanov
2011-09-28 13:56 ` Ted Zlatanov
2011-09-28 14:12 ` Stefan Monnier
2011-09-29 8:52 ` Ted Zlatanov
2011-02-25 13:56 ` make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters Michael Albinus
2011-02-17 20:17 ` auth-source-search: annoying messages Stefan Monnier
2011-02-18 20:06 ` Ted Zlatanov
2011-02-18 22:04 ` Lars Ingebrigtsen
2011-02-18 22:33 ` Stefan Monnier
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=87zkpp43s2.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=tromey@redhat.com \
--cc=tzz@lifelogs.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).