unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to display message persistently in echo area
@ 2008-08-08 14:29 Dan Davison
  2008-08-09 14:30 ` Kevin Rodgers
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Davison @ 2008-08-08 14:29 UTC (permalink / raw)
  To: help-gnu-emacs mailing list

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.]

Thanks,

Dan




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to display message persistently in echo area
       [not found] <mailman.16105.1218205784.18990.help-gnu-emacs@gnu.org>
@ 2008-08-08 15:25 ` Tim X
  2008-08-08 18:12   ` Dan Davison
  0 siblings, 1 reply; 6+ messages in thread
From: Tim X @ 2008-08-08 15:25 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Davison <davison@stats.ox.ac.uk> writes:

> 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.]
>
maybe minibuffer-message-timeout will help

,----[ C-h v minibuffer-message-timeout RET ]
| minibuffer-message-timeout is a variable defined in `C source code'.
| Its value is 2
| 
| Documentation:
| *How long to display an echo-area message when the minibuffer is active.
| If the value is not a number, such messages don't time out.
| 
| [back]
`----

Tim


-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to display message persistently in echo area
  2008-08-08 15:25 ` Tim X
@ 2008-08-08 18:12   ` Dan Davison
  2008-08-08 18:34     ` Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Davison @ 2008-08-08 18:12 UTC (permalink / raw)
  To: help-gnu-emacs

On Sat, Aug 09, 2008 at 01:25:57AM +1000, Tim X wrote:
> Dan Davison <davison@stats.ox.ac.uk> writes:
> 
> > 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.]
> >
> maybe minibuffer-message-timeout will help
> 
> ,----[ C-h v minibuffer-message-timeout RET ]
> | minibuffer-message-timeout is a variable defined in `C source code'.
> | Its value is 2
> | 
> | Documentation:
> | *How long to display an echo-area message when the minibuffer is active.
> | If the value is not a number, such messages don't time out.
> | 
> | [back]
> `----

AIUI minibuffer-message-timeout controls the following situation:

C-x b C-f [you were about to choose a buffer, but now there's a
message saying 'End of buffer' -- how long is that thing going to be
in the way for if I just sit here and do nothing?]

If I set it to some non-number then the message will stay around
forever, but only if the minibuffer is active. However if I start
typing then AIUI the minibuffer will not be active, and so the variable
doesn't seem to help me.

Dan

p.s. When I evaluate  (setq minibuffer-message-timeout 1), the following appears in the echo area:

1 (#o1, #x1)

What does that notation mean?

> 
> Tim
> 
> 
> -- 
> tcross (at) rapttech dot com dot au




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to display message persistently in echo area
  2008-08-08 18:12   ` Dan Davison
@ 2008-08-08 18:34     ` Peter Dyballa
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2008-08-08 18:34 UTC (permalink / raw)
  To: Dan Davison; +Cc: help-gnu-emacs


Am 08.08.2008 um 20:12 schrieb Dan Davison:

> 1 (#o1, #x1)
>
> What does that notation mean?

Looks like decimal, octal, and hexadecimal display (presentation) of  
the number 1 (one).

--
Greetings

   Pete

To most people solutions mean finding the answers. But to chemists  
solutions
are things that are still all mixed up.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to display message persistently in echo area
  2008-08-08 14:29 How to display message persistently in echo area Dan Davison
@ 2008-08-09 14:30 ` Kevin Rodgers
  2008-08-11  8:45   ` Dan Davison
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Rodgers @ 2008-08-09 14:30 UTC (permalink / raw)
  To: help-gnu-emacs

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))

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to display message persistently in echo area
  2008-08-09 14:30 ` Kevin Rodgers
@ 2008-08-11  8:45   ` Dan Davison
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Davison @ 2008-08-11  8:45 UTC (permalink / raw)
  To: help-gnu-emacs

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
>
>




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-08-11  8:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 14:29 How to display message persistently in echo area Dan Davison
2008-08-09 14:30 ` Kevin Rodgers
2008-08-11  8:45   ` Dan Davison
     [not found] <mailman.16105.1218205784.18990.help-gnu-emacs@gnu.org>
2008-08-08 15:25 ` Tim X
2008-08-08 18:12   ` Dan Davison
2008-08-08 18:34     ` Peter Dyballa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).