From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miguel Guedes Newsgroups: gmane.emacs.help Subject: Re: Apply faces to string output to mini-buffer Date: 24 May 2013 08:38:13 GMT Message-ID: <519f26f5$0$35155$862e30e2@ngroups.net> References: <519df490$0$33340$862e30e2@ngroups.net> <519efa33$0$32272$862e30e2@ngroups.net> <519f0907$0$36255$862e30e2@ngroups.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1369406583 8517 80.91.229.3 (24 May 2013 14:43:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 May 2013 14:43:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 24 16:43:03 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UftCw-0004eb-DD for geh-help-gnu-emacs@m.gmane.org; Fri, 24 May 2013 16:43:02 +0200 Original-Received: from localhost ([::1]:47127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UftCw-0006V5-0i for geh-help-gnu-emacs@m.gmane.org; Fri, 24 May 2013 10:43:02 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!usenet.blueworldhosting.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.readnews.com!s09-01.readnews.com!not-for-mail Original-X-Trace: DXC=L\9dNccb1SA_Lgc?434\PKG^cGF?V7mID]G0e@Sk_WTB\KSWKcAGbbDOk0<7meNZoIBVOE4Chkm=HBXXXWM[BEjIPSnE?_G8JeOgBL<2e9`ebN Original-X-Complaints-To: abuse@blocknews.net Original-Newsgroups: gnu.emacs.help User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Original-Lines: 23 Original-NNTP-Posting-Host: 72ab8a7b.ngroups.net Original-Xref: usenet.stanford.edu gnu.emacs.help:198753 X-Mailman-Approved-At: Fri, 24 May 2013 10:42:46 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91025 Archived-At: On Fri, 24 May 2013 09:40:50 +0200, Stephen Berman wrote: > > The function `message' returns the printed representation of the > message, so when you evaluate it in the minibuffer, this return value > overwrites the propertized message, which is displayed in the echo area > (which coincides with the minibuffer) as a side effect (on my machine I > can see it briefly before it is overwritten). If you embed the message > sexp in another function, it returns to the caller, so it doesn't > overwrite the propertized message in the echo area. E.g., if you > evaluate this: > > (defun my-foo () > (interactive) > (message "%s" (propertize "foo" 'face '(:foreground "red")))) > > and then type `M-x my-foo', you'll see a red "foo" (without quotes) in > the echo area. I would never have got that. Thank you for the explanation & solution, Stephen! -- Miguel