From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: More noticeable version of (message) Date: Thu, 3 Nov 2011 19:16:01 +0100 Message-ID: References: <81zkgfyrio.fsf@gmail.com> <81wrbh480a.fsf@gmail.com> <87mxcdcl5i.fsf@live.com> <81bostqino.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1320344193 11843 80.91.229.12 (3 Nov 2011 18:16:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Nov 2011 18:16:33 +0000 (UTC) To: Yagnesh Raghava Yakkala , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 03 19:16:29 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RM1q1-0004hd-4w for ged-emacs-devel@m.gmane.org; Thu, 03 Nov 2011 19:16:29 +0100 Original-Received: from localhost ([::1]:60742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RM1q0-0001ls-7G for ged-emacs-devel@m.gmane.org; Thu, 03 Nov 2011 14:16:28 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RM1px-0001ln-NX for emacs-devel@gnu.org; Thu, 03 Nov 2011 14:16:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RM1pw-0007Rn-9D for emacs-devel@gnu.org; Thu, 03 Nov 2011 14:16:25 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:38722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RM1pv-0007Rg-Vv for emacs-devel@gnu.org; Thu, 03 Nov 2011 14:16:24 -0400 Original-Received: by faaf16 with SMTP id f16so2408320faa.0 for ; Thu, 03 Nov 2011 11:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=JPaUNCVEo+VJlG9PVzhtZVW8m6O8h9Sg2c7NRaMgvxg=; b=g+E0+L8z9DYlmQkFSRANPU+RPkQB3+12ZBk99J/vMnd5D9vh8UiQKj7UYxCFjQquuE VvuZlffLrL+KG/oSkBFjBkL9MHXeC+ZbZL4GFceAuDCIPHTIzpSyj2QVuUCveSGiuOzK 1qnrDZh/1IUFTBRQItkW+dn4LkfySV/rdwVJY= Original-Received: by 10.223.91.73 with SMTP id l9mr17998059fam.22.1320344182578; Thu, 03 Nov 2011 11:16:22 -0700 (PDT) Original-Received: by 10.152.38.198 with HTTP; Thu, 3 Nov 2011 11:16:01 -0700 (PDT) In-Reply-To: <81bostqino.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145847 Archived-At: On Thu, Nov 3, 2011 at 17:23, Jambunathan K wrote: > Yagnesh Raghava Yakkala writes: > >> Hi Jambunathan, >> >> Jambunathan K writes: >> >>> Jambunathan K writes: >>> >>>> Craig Muth writes: >>>> >>>>> I often don't notice the output of lines like=C2=A0(message "hi"), >>>>> especially when in full-screen mode. >>>>> >>>>> Any ideas? =C2=A0Not a huge fan of beeping because I associate that w= ith >>>>> an error. =C2=A0I'm on a mac so any face/font stuff is fair game. >>>> >>>> Try this: >>>> >>>> (fset 'message-plain (symbol-function 'message)) >>>> >>>> (defun message-colored (fmt-string &rest args) >>>> =C2=A0 (message-plain >>>> =C2=A0 =C2=A0(propertize >>>> =C2=A0 =C2=A0 (apply 'format fmt-string args) >>>> =C2=A0 =C2=A0 'face 'font-lock-comment-face))) >>>> >>>> (fset 'message 'message-colored) >>>> You will see that the messages appear in comment face. >>> >>> This is an elegant variation of the above. >> >>> >>> (defadvice message >>> =C2=A0 (before colored-message activate) >>> =C2=A0 (ad-set-arg 0 (propertize (ad-get-arg 0) 'face 'font-lock-commen= t-face))) Here is the version I am using in nXhtml: (defun web-vcs-message-with-face (face format-string &rest args) "Display a colored message at the bottom of the string. FACE is the face to use for the message. FORMAT-STRING and ARGS are the same as for `message'. Also put FACE on the message in *Messages* buffer." (with-current-buffer "*Messages*" (save-restriction (widen) (let* ((start (let ((here (point))) (goto-char (point-max)) (prog1 (copy-marker (if (bolp) (point-max) (1+ (point-max)))) (goto-char here)))) (msg-with-face (propertize (apply 'format format-string args) 'face face))) ;; This is for the echo area: (message "%s" msg-with-face) ;; This is for the buffer: (when (< 0 (length msg-with-face)) (goto-char (1- (point-max))) ;;(backward-char) ;;(unless (eolp) (goto-char (line-end-position))) (put-text-property start (point) 'face face))))))