From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: make-progress-reporter suggestions: 'modeline and customizable progress-reporter--pulse-characters Date: Sun, 20 Feb 2011 12:29:39 +0100 Message-ID: <87fwrj6j18.fsf@gmx.de> References: <87ei76yi1x.fsf@lifelogs.com> <87lj1ergg5.fsf@gmx.de> <87ipwi3hjm.fsf@lifelogs.com> <87fwrmr6gf.fsf@gmx.de> <8739nm1u6n.fsf_-_@lifelogs.com> <878vxdxfzw.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1298201404 7792 80.91.229.12 (20 Feb 2011 11:30:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2011 11:30:04 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 20 12:30:00 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pr7UE-0000N6-ME for ged-emacs-devel@m.gmane.org; Sun, 20 Feb 2011 12:29:58 +0100 Original-Received: from localhost ([127.0.0.1]:52537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pr7UD-0002jd-Sn for ged-emacs-devel@m.gmane.org; Sun, 20 Feb 2011 06:29:57 -0500 Original-Received: from [140.186.70.92] (port=56779 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pr7U7-0002eQ-UM for emacs-devel@gnu.org; Sun, 20 Feb 2011 06:29:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pr7U6-00013v-LQ for emacs-devel@gnu.org; Sun, 20 Feb 2011 06:29:51 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:54347) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Pr7U6-00012n-7c for emacs-devel@gnu.org; Sun, 20 Feb 2011 06:29:50 -0500 Original-Received: (qmail invoked by alias); 20 Feb 2011 11:29:46 -0000 Original-Received: from p57BB8DAD.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.141.173] by mail.gmx.net (mp056) with SMTP; 20 Feb 2011 12:29:46 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+KONE0kZSKOMLrYgtnUNSvdv2ZInkB3BHnjYi5HS JNNoqgYibcPUM1 In-Reply-To: <878vxdxfzw.fsf@lifelogs.com> (Ted Zlatanov's message of "Fri, 18 Feb 2011 14:08:35 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136276 gmane.emacs.gnus.general:76994 Archived-At: Ted Zlatanov 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.