* More noticeable version of (message)
@ 2011-11-01 21:40 Craig Muth
2011-11-01 23:44 ` Peter Münster
2011-11-02 6:20 ` Jambunathan K
0 siblings, 2 replies; 12+ messages in thread
From: Craig Muth @ 2011-11-01 21:40 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 238 bytes --]
I often don't notice the output of lines like (message "hi"), especially
when in full-screen mode.
Any ideas? Not a huge fan of beeping because I associate that with an
error. I'm on a mac so any face/font stuff is fair game.
--Craig
[-- Attachment #2: Type: text/html, Size: 333 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-01 21:40 More noticeable version of (message) Craig Muth
@ 2011-11-01 23:44 ` Peter Münster
2011-11-02 6:20 ` Jambunathan K
1 sibling, 0 replies; 12+ messages in thread
From: Peter Münster @ 2011-11-01 23:44 UTC (permalink / raw)
To: emacs-devel
On Tue, Nov 01 2011, Craig Muth wrote:
> Any ideas? Not a huge fan of beeping because I associate that with
> an error. I'm on a mac so any face/font stuff is fair game.
There is:
(require 'notifications)
(notifications-notify ...)
(I don't know, if this works on a mac...)
--
Peter
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-01 21:40 More noticeable version of (message) Craig Muth
2011-11-01 23:44 ` Peter Münster
@ 2011-11-02 6:20 ` Jambunathan K
2011-11-03 14:04 ` Jambunathan K
1 sibling, 1 reply; 12+ messages in thread
From: Jambunathan K @ 2011-11-02 6:20 UTC (permalink / raw)
To: Craig Muth; +Cc: emacs-devel
Craig Muth <craig.muth@gmail.com> writes:
> I often don't notice the output of lines like (message "hi"),
> especially when in full-screen mode.
>
> Any ideas? Not a huge fan of beeping because I associate that with
> an error. I'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)
(message-plain
(propertize
(apply 'format fmt-string args)
'face 'font-lock-comment-face)))
(fset 'message 'message-colored)
You will see that the messages appear in comment face.
> --Craig
>
>
>
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-02 6:20 ` Jambunathan K
@ 2011-11-03 14:04 ` Jambunathan K
2011-11-03 14:53 ` Yagnesh Raghava Yakkala
0 siblings, 1 reply; 12+ messages in thread
From: Jambunathan K @ 2011-11-03 14:04 UTC (permalink / raw)
To: Craig Muth; +Cc: emacs-devel
Jambunathan K <kjambunathan@gmail.com> writes:
> Craig Muth <craig.muth@gmail.com> writes:
>
>> I often don't notice the output of lines like (message "hi"),
>> especially when in full-screen mode.
>>
>> Any ideas? Not a huge fan of beeping because I associate that with
>> an error. I'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)
> (message-plain
> (propertize
> (apply 'format fmt-string args)
> '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
(before colored-message activate)
(ad-set-arg 0 (propertize (ad-get-arg 0) 'face 'font-lock-comment-face)))
>> --Craig
>>
>>
>>
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-03 14:04 ` Jambunathan K
@ 2011-11-03 14:53 ` Yagnesh Raghava Yakkala
2011-11-03 16:23 ` Jambunathan K
0 siblings, 1 reply; 12+ messages in thread
From: Yagnesh Raghava Yakkala @ 2011-11-03 14:53 UTC (permalink / raw)
To: emacs-devel
Hi Jambunathan,
Jambunathan K <kjambunathan@gmail.com> writes:
> Jambunathan K <kjambunathan@gmail.com> writes:
>
>> Craig Muth <craig.muth@gmail.com> writes:
>>
>>> I often don't notice the output of lines like (message "hi"),
>>> especially when in full-screen mode.
>>>
>>> Any ideas? Not a huge fan of beeping because I associate that with
>>> an error. I'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)
>> (message-plain
>> (propertize
>> (apply 'format fmt-string args)
>> '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
> (before colored-message activate)
> (ad-set-arg 0 (propertize (ad-get-arg 0) 'face 'font-lock-comment-face)))
>
Noob here.
If I may I ask, is the above defadvise supposed show the
messages in font-lock-comment-face.?
after evaluating the above, a test gets me the following.
------------------
(message "test")
=>
#("test" 0 4 (face font-lock-comment-face))
------------------
>>> --Craig
>>>
>>>
>>>
--
YYR
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-03 14:53 ` Yagnesh Raghava Yakkala
@ 2011-11-03 16:23 ` Jambunathan K
2011-11-03 18:16 ` Lennart Borgman
0 siblings, 1 reply; 12+ messages in thread
From: Jambunathan K @ 2011-11-03 16:23 UTC (permalink / raw)
To: Yagnesh Raghava Yakkala; +Cc: emacs-devel
Yagnesh Raghava Yakkala <yagnesh@live.com> writes:
> Hi Jambunathan,
>
> Jambunathan K <kjambunathan@gmail.com> writes:
>
>> Jambunathan K <kjambunathan@gmail.com> writes:
>>
>>> Craig Muth <craig.muth@gmail.com> writes:
>>>
>>>> I often don't notice the output of lines like (message "hi"),
>>>> especially when in full-screen mode.
>>>>
>>>> Any ideas? Not a huge fan of beeping because I associate that with
>>>> an error. I'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)
>>> (message-plain
>>> (propertize
>>> (apply 'format fmt-string args)
>>> '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
>> (before colored-message activate)
>> (ad-set-arg 0 (propertize (ad-get-arg 0) 'face 'font-lock-comment-face)))
>>
>
> Noob here.
>
> If I may I ask, is the above defadvise supposed show the
> messages in font-lock-comment-face.?
>
> after evaluating the above, a test gets me the following.
> ------------------
> (message "test")
> =>
> #("test" 0 4 (face font-lock-comment-face))
> ------------------
When you eval by hand (using M-: or C-x C-e) the echoed message which is
fontified gets immediately replaced with the return val from message. So
the value that you see above is a stringified version of propertized
text.
Try the below snippet:
(defun hello-world ()
(interactive)
(message "hello world"))
M-x hello-world RET
>
>>>> --Craig
>>>>
>>>>
>>>>
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-03 16:23 ` Jambunathan K
@ 2011-11-03 18:16 ` Lennart Borgman
2011-11-03 22:44 ` chad
0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2011-11-03 18:16 UTC (permalink / raw)
To: Yagnesh Raghava Yakkala, emacs-devel
On Thu, Nov 3, 2011 at 17:23, Jambunathan K <kjambunathan@gmail.com> wrote:
> Yagnesh Raghava Yakkala <yagnesh@live.com> writes:
>
>> Hi Jambunathan,
>>
>> Jambunathan K <kjambunathan@gmail.com> writes:
>>
>>> Jambunathan K <kjambunathan@gmail.com> writes:
>>>
>>>> Craig Muth <craig.muth@gmail.com> writes:
>>>>
>>>>> I often don't notice the output of lines like (message "hi"),
>>>>> especially when in full-screen mode.
>>>>>
>>>>> Any ideas? Not a huge fan of beeping because I associate that with
>>>>> an error. I'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)
>>>> (message-plain
>>>> (propertize
>>>> (apply 'format fmt-string args)
>>>> '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
>>> (before colored-message activate)
>>> (ad-set-arg 0 (propertize (ad-get-arg 0) 'face 'font-lock-comment-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))))))
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-03 18:16 ` Lennart Borgman
@ 2011-11-03 22:44 ` chad
2011-11-04 0:56 ` Lennart Borgman
0 siblings, 1 reply; 12+ messages in thread
From: chad @ 2011-11-03 22:44 UTC (permalink / raw)
To: Lennart Borgman; +Cc: Yagnesh Raghava Yakkala, Emacs devel
This looks like it's designed to markup the *Messages* buffer only; is
that correct? I was going to suggest to the OP that, especially when
in fullscreen mode, he consider arranging to have a (emacs) window
showing *Messages* by default, but decided that it was a case of
telling the user to change to match the program. If you have already
automated the process of ``keep a few lines of *Messages* visible all
the time'', that might be useful beyond nXhtml users.
Thanks,
*Chad
On Nov 3, 2011, at 11:16 AM, Lennart Borgman wrote:
>
> Here is the version I am using in nXhtml: […]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-03 22:44 ` chad
@ 2011-11-04 0:56 ` Lennart Borgman
2011-11-04 9:34 ` Juri Linkov
0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2011-11-04 0:56 UTC (permalink / raw)
To: chad; +Cc: Yagnesh Raghava Yakkala, Emacs devel
No it should color both the echo area and the *Messages* buffer. Try this:
(defun hello-temp ()
(interactive)
(web-vcs-message-with-face
'font-lock-warning-face
"hello!"
))
On Thu, Nov 3, 2011 at 23:44, chad <yandros@mit.edu> wrote:
> This looks like it's designed to markup the *Messages* buffer only; is
> that correct? I was going to suggest to the OP that, especially when
> in fullscreen mode, he consider arranging to have a (emacs) window
> showing *Messages* by default, but decided that it was a case of
> telling the user to change to match the program. If you have already
> automated the process of ``keep a few lines of *Messages* visible all
> the time'', that might be useful beyond nXhtml users.
>
> Thanks,
> *Chad
>
> On Nov 3, 2011, at 11:16 AM, Lennart Borgman wrote:
>>
>> Here is the version I am using in nXhtml: […]
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-04 0:56 ` Lennart Borgman
@ 2011-11-04 9:34 ` Juri Linkov
2011-11-06 14:57 ` Juri Linkov
0 siblings, 1 reply; 12+ messages in thread
From: Juri Linkov @ 2011-11-04 9:34 UTC (permalink / raw)
To: Lennart Borgman; +Cc: chad, Yagnesh Raghava Yakkala, Emacs devel
> No it should color both the echo area and the *Messages* buffer. Try this:
Shouldn't the *Message* buffer keep properties of inserted text?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-04 9:34 ` Juri Linkov
@ 2011-11-06 14:57 ` Juri Linkov
2011-11-06 15:58 ` Lennart Borgman
0 siblings, 1 reply; 12+ messages in thread
From: Juri Linkov @ 2011-11-06 14:57 UTC (permalink / raw)
To: Lennart Borgman; +Cc: chad, Yagnesh Raghava Yakkala, Emacs devel
>> No it should color both the echo area and the *Messages* buffer. Try this:
>
> Shouldn't the *Message* buffer keep properties of inserted text?
BTW, there is a strange effect in the *Message* buffer:
1. split window: `C-x 2'
2. visit Dired in one window: `C-x d RET'
3. open the *Messages* buffer in another window: `C-x o C-h e C-x o'
4. type `w' a few times on different files in Dired. It echoes filenames
in the echo area, but the *Messages* buffer is not updated.
5. select another window with the *Messages* buffer: `C-x o'.
All previous messages suddenly are flushed to it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: More noticeable version of (message)
2011-11-06 14:57 ` Juri Linkov
@ 2011-11-06 15:58 ` Lennart Borgman
0 siblings, 0 replies; 12+ messages in thread
From: Lennart Borgman @ 2011-11-06 15:58 UTC (permalink / raw)
To: Juri Linkov; +Cc: chad, Yagnesh Raghava Yakkala, Emacs devel
On Sun, Nov 6, 2011 at 15:57, Juri Linkov <juri@jurta.org> wrote:
>>> No it should color both the echo area and the *Messages* buffer. Try this:
>>
>> Shouldn't the *Message* buffer keep properties of inserted text?
>
> BTW, there is a strange effect in the *Message* buffer:
>
> 1. split window: `C-x 2'
> 2. visit Dired in one window: `C-x d RET'
> 3. open the *Messages* buffer in another window: `C-x o C-h e C-x o'
> 4. type `w' a few times on different files in Dired. It echoes filenames
> in the echo area, but the *Messages* buffer is not updated.
> 5. select another window with the *Messages* buffer: `C-x o'.
> All previous messages suddenly are flushed to it.
Yes, the window displaying *Messages* should be updated immediately.
There is in performance problem with that.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-11-06 15:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-01 21:40 More noticeable version of (message) Craig Muth
2011-11-01 23:44 ` Peter Münster
2011-11-02 6:20 ` Jambunathan K
2011-11-03 14:04 ` Jambunathan K
2011-11-03 14:53 ` Yagnesh Raghava Yakkala
2011-11-03 16:23 ` Jambunathan K
2011-11-03 18:16 ` Lennart Borgman
2011-11-03 22:44 ` chad
2011-11-04 0:56 ` Lennart Borgman
2011-11-04 9:34 ` Juri Linkov
2011-11-06 14:57 ` Juri Linkov
2011-11-06 15:58 ` Lennart Borgman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.