[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make-progress-reporter suggestions: 'modeline and customizable progr
From: |
Michael Albinus |
Subject: |
Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters |
Date: |
Mon, 21 Feb 2011 19:54:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Tom Tromey <address@hidden> 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.
- auth-source-search: annoying messages, Miles Bader, 2011/02/16
- Re: auth-source-search: annoying messages, Ted Zlatanov, 2011/02/17
- Re: auth-source-search: annoying messages, Michael Albinus, 2011/02/17
- Message not available
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Tom Tromey, 2011/02/18
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Ted Zlatanov, 2011/02/18
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Michael Albinus, 2011/02/20
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Michael Albinus, 2011/02/20
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Tom Tromey, 2011/02/20
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters,
Michael Albinus <=
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Ted Zlatanov, 2011/02/22
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Lars Ingebrigtsen, 2011/02/23
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Michael Albinus, 2011/02/23
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Ted Zlatanov, 2011/02/23
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Michael Albinus, 2011/02/23
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Chong Yidong, 2011/02/23
- RE: make-progress-reporter suggestions: 'modeline and customizableprogress-reporter--pulse-characters, Drew Adams, 2011/02/23
- Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters, Ted Zlatanov, 2011/02/23
- Global indicators (was: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters), Julien Danjou, 2011/02/23
- Re: Global indicators, Chong Yidong, 2011/02/23