[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to display message persistently in echo area
From: |
Dan Davison |
Subject: |
Re: How to display message persistently in echo area |
Date: |
Mon, 11 Aug 2008 09:45:59 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Sat, Aug 09, 2008 at 08:30:59AM -0600, Kevin Rodgers wrote:
> Dan Davison wrote:
>> When I evaluate (message "the message"), "the message" remains in the
>> echo area until, for example, a key press in the current buffer.
>>
>> I'd like to be write a function that behaves like message, but for
>> which the message does not disappear when I start typing. I want it to
>> go away when I next do something that actually uses the echo area /
>> minibuffer. What strategy do people suggest for achieving this aim? Or
>> have I missed something that exists already?
>>
>> [The motivation is in ESS (Emacs Speaks Statistics) which has a nice
>> function that reminds one of function arguments in the echo
>> buffer. Unfortunately I've discovered that I can remember 3 function
>> arguments for less than a couple of seconds.]
>
> Look into how eldoc-mode does it:
>
> (add-hook 'post-command-hook 'eldoc-schedule-timer nil t)
> (add-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t))
Great, thanks a lot Kevin. That was a very useful pointer. Plus, it
turns out ess-mode is distributed with code to use eldoc, but it's
currently not turned on by default.
Dan
>
> --
> Kevin Rodgers
> Denver, Colorado, USA
>
>