From: "T.V. Raman" <tv.raman.tv@gmail.com>
To: Dmitri Paduchikh <dpaduchikh@gmail.com>, emacs-devel@gnu.org
Subject: Request: Use message instead of message_with_string for user visible output?
Date: Sun, 27 Oct 2013 15:07:05 -0700 [thread overview]
Message-ID: <CADkJX2j+3VvqRoom5Wxsa1mGPTKLQmyh8-4EkTj-RVK=cfZ+6Q@mail.gmail.com> (raw)
In-Reply-To: <87ob6byfug.fsf@dpaduchikh.invalid>
I've advised self-insert-command to produce auditory output for
read-only cases.
Note that once upon a time (see emacspeak code base) emacspeak
actually replaced self-insert-command with its own
implementation. In newer versions, I dont do that any more
because I can use the relevant post hook; however, that also
lost us the auditory feedback when the buffer is read-only or
when the text has read-only property set. My personal preference
would be to not to muck with command-error-function -- I played
with it a bit last week -- it feels like too heavy a hammer, and
at the end of the day might also produce too much output.
Note that emacs packages are in general not well-disciplined with
when they call error vs signal -- and often use error or signal
to provide user-feedback e.g. emacs itself when you hit
end-of-buffer -- or the VM mail reader when you hit end-of-folder.
--
Best Regards,
--raman
On 10/26/13, Dmitri Paduchikh <dpaduchikh@gmail.com> wrote:
> 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
>
next prev parent reply other threads:[~2013-10-27 22:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-26 16:11 Request: Use message instead of message_with_string for user visible output? T.V. Raman
2013-10-26 16:21 ` Eli Zaretskii
2013-10-26 16:33 ` T.V. Raman
2013-10-26 19:47 ` Dmitri Paduchikh
2013-10-27 22:07 ` T.V. Raman [this message]
2013-10-28 2:06 ` Richard Stallman
2013-10-28 8:04 ` Jarek Czekalski
2013-10-28 18:53 ` Johan Bockgård
2013-10-29 1:27 ` T.V. Raman
2013-10-29 1:26 ` T.V. Raman
2013-10-26 17:16 ` Drew Adams
2013-10-26 18:41 ` Stefan Monnier
2013-10-27 22:03 ` T.V. Raman
2013-10-29 20:54 ` Stefan Monnier
2013-10-30 9:17 ` T.V. Raman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADkJX2j+3VvqRoom5Wxsa1mGPTKLQmyh8-4EkTj-RVK=cfZ+6Q@mail.gmail.com' \
--to=tv.raman.tv@gmail.com \
--cc=dpaduchikh@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.