From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/77051 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: Mon, 21 Feb 2011 19:54:21 +0100 Message-ID: <87zkpp43s2.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> <87fwrj6j18.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1298314486 23288 80.91.229.12 (21 Feb 2011 18:54:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Feb 2011 18:54:46 +0000 (UTC) Cc: Ted Zlatanov , ding@gnus.org, emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 21 19:54:41 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 1Prau8-00011X-AA for ged-emacs-devel@m.gmane.org; Mon, 21 Feb 2011 19:54:40 +0100 Original-Received: from localhost ([127.0.0.1]:36088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Prau7-0007Ra-Lc for ged-emacs-devel@m.gmane.org; Mon, 21 Feb 2011 13:54:39 -0500 Original-Received: from [140.186.70.92] (port=57883 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pratz-0007QS-5u for emacs-devel@gnu.org; Mon, 21 Feb 2011 13:54:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pratw-0007O3-LJ for emacs-devel@gnu.org; Mon, 21 Feb 2011 13:54:30 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:55199) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Pratv-0007NI-P4 for emacs-devel@gnu.org; Mon, 21 Feb 2011 13:54:28 -0500 Original-Received: (qmail invoked by alias); 21 Feb 2011 18:54:23 -0000 Original-Received: from p57BB866C.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.134.108] by mail.gmx.net (mp061) with SMTP; 21 Feb 2011 19:54:23 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+EE9UZis2Eq3r6Lc2LG+cTscEN72EGPNfL45k0q1 BoQLeRy7AB6W8t In-Reply-To: (Tom Tromey's message of "Sun, 20 Feb 2011 11:37:21 -0700") 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.23 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:136331 gmane.emacs.gnus.general:77051 Archived-At: Tom Tromey 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.