emacs-devel
[Top][All Lists]
Advanced

[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: Sun, 20 Feb 2011 12:29:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Ted Zlatanov <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?

That would be an invasive patch: the modeline string is known only in
xdisp.c, and we would need to change it there.

> That would look really nice in a small area but the whole thing would be
> annoying: it's a big area (the effect is distracting when magnified) and
> the text may become illegible as the background changes.  So maybe the
> `progress-reporter--pulse-characters' can be propertized with different
> background colors instead.

The small appended patch allows alsy symbols as first argument of
`make-progress-reporter. If this argument is a string, the progress
reporter still uses the minibuffer. If the argument is a symbol (used in
`mode-line-format'), the respective part of the modeline is updated.

See the examples:

--8<---------------cut here---------------start------------->8---
;; Use harvey balls for progress.
(setq pr1 (make-progress-reporter 'mode-line-remote))
(let ((progress-reporter--pulse-characters
       '["\u25F7" "\u25F6" "\u25F5" "\u25F4"]))
  (while t (progress-reporter-update pr1)))
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
;; Let the buffer name blink.
(setq pr2 (make-progress-reporter 'mode-line-buffer-identification))
(let ((progress-reporter--pulse-characters
       (vector '(:propertize "%12b" face mode-line-buffer-id)
               '(:propertize "%12b" face font-lock-warning-face))))
    (while t (progress-reporter-update pr2)))
--8<---------------cut here---------------end--------------->8---

> Ted

Best regards, Michael.



reply via email to

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