speechd-discuss
[Top][All Lists]
Advanced

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

I-Searching Efficiently with Speechd-el, Terser Prompts in General


From: Milan Zamazal
Subject: I-Searching Efficiently with Speechd-el, Terser Prompts in General
Date: Tue, 19 Aug 2008 16:08:34 +0200

>>>>> "VT" == Veli-Pekka T?til? <vtatila at gmail.com> writes:

    VT> the output is not optimal. IT breaks the heuristic of having the
    VT> most important speech first, so that you don't have to wait to
    VT> get past redundant pieces, and can minimize the time it takes to
    VT> determine that the current item is not relevant, in linearly
    VT> scanning for some piece of text.

I agree that the output of i-search is too verbose.  But I try to stick
to the principle making things as straightforward and verbose as
possible in default settings, even if it means annoying verbosity.  The
idea is to let the user exactly know what he is doing rather than
producing comfortable output so that beginners are well guided while
advanced users can customize speechd-el to omit reports about actions
they already know well.

    VT> The crucial info to me after hitting C-s or C-r is what the
    VT> search has found, I do know what I'm typing and I do know that
    VT> the mode is i-search.  Yet what I'm read back before the match
    VT> is the text "i search", that's how it sounds like, every time.

Try to use the following settings in your ~/.emacs *after* speechd-speak
is loaded:

  (setq speechd-speak-read-command-keys nil)
  (setq speechd-speak-state-changes (remq 'minor-modes 
speechd-speak-state-changes))
  (defadvice speechd-speak--message (around my-speechd-speak--message activate)
    (unless (and message 
                 (save-match-data 
                   (string-match "^I-search\\( backward\\)?: ." (ad-get-arg 
0))))
      ad-do-it))

But beware, then you may not always know what is the search string.  For
instance, consider `C-w' command in isearch.

Please note these settings are applied globally.  Isearch mode is a bit
complex and I can't find an easy way right now how to apply the settings
just to isearch mode.

    VT> Another minor problem with the incremental search is that new
    VT> prompts don't throw away previous speech. If I hit backspace
    VT> many times in an incremental search I get a hugely long speech
    VT> string. 

The settings above should fix this as well.

    VT> What I'd like in stead, would be a cut to the chase option,
    VT> throwing away all the pending speech if a key command generates
    VT> new speech before the previous has been spoken completely.

It usually works this way, I'm not sure about the isearch behavior now
without further investigation.

    VT> On a nice-to-have note, sometimes it would also be useful to
    VT> auto-read the whole sentence the occurrence was found in to get
    VT> more context, not just the occurrence and the text after it. 

It would be possible to implement this, but I'm not going to do it now.

    VT> IF this is not possible, reading the whole line would do ok,
    VT> since that's what my Win32 editor, NoteTab, does in regexp
    VT> searching and so I've gotten used to that.

There were some bugs in isearch reading.  They are now fixed in
speechd-el CVS.  Would you like to test it?

Basically, isearch functions should read whole lines now, unless
restricted by properties (see speechd-el user customizations concerning
text properties).

    VT> More broadly, I would not want to hear any messages, if I know
    VT> by keystrokes what I'm doing. SO when I undo or yank back text,
    VT> I would just like to hear the text that appeared, not prompts
    VT> like undo, or mark set, for example. Is there a quick way to do
    VT> all this?

You can extend the regular expression in the speechd-speak--message
example above to contain other messages you don't want to hear.

    VT> How do I write list literals or append to nested lists in Lisp,
    VT> though? The Lisp analogs of the Perl statements:

I'm afraid there could be a lot to explain here.  If you'd be interested
in Elisp more deeply I suggest looking at the excellent book
Introduction to Programming in Emacs Lisp
(http://www.gnu.org/software/emacs/emacs-lisp-intro/, it should be also
available as a .deb package).  Otherwise if you try to solve a
particular problem of setting something or so, write here and I'll
explain it.

Regards,

Milan Zamazal



reply via email to

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