emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request: Use message instead of message_with_string for user visible


From: Dmitri Paduchikh
Subject: Re: Request: Use message instead of message_with_string for user visible output?
Date: Sun, 27 Oct 2013 01:47:19 +0600
User-agent: Gnus/5.13 (Gnus v5.13)

T.V. Raman wrote:

> Some useful hooks to add:

[...]

> 2. A pre-insert hook on self-insert-command -- right now I cant tell
> from the emacspeak end when self-insert-command bales out because
> the current context is read-only.

Just for the record, I have proposed on the Emacspeak list to use
command-error-function for speaking read-only errors. It seems to work
well with self-insert-command and other such cases.

For speaking undefined keys there is a solution using a little trickery
from ring-bell-function:

(defun my-speak-echo-area ()
  (let ((msg (current-message)))
    (if (> (length msg) 0)
        (dtk-speak msg))))

(setq ring-bell-function
      (lambda ()
        (dtk-stop)
        (emacspeak-auditory-icon 'warn-user)
        (if (eq this-command nil)
            (run-with-idle-timer 0 nil 'my-speak-echo-area))))

Of course, it would be nice if some uniform solution existed.

-- 
With best regards
Dmitri Paduchikh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]