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

incremental search feedback




Some time ago Dr. Raman published the patch below to provide feedback
as you hit backspace within incremental search.  Since then, I've been
applying it to the Debian package.  I notice this code is not present
in version 15.  Should I still be applying the patch?

	   - Jim Van Zandt


--- emacspeak-15.orig/lisp/emacspeak-advice.el
+++ emacspeak-15/lisp/emacspeak-advice.el
@@ -2950,6 +2950,26 @@
    (file-name-sans-extension
     (ad-get-arg 0))))
 ;;}}}
+
+;;Add the following defadvice form to your emacs init files --
+;;alternatively, just add it into file emacspeak-advice.el 
+;;and you should get feedback as you hit backspace within
+;;incremental search.
+
+(defadvice isearch-delete-char (after emacspeak pre act)
+  "Speak the search hit.
+  Produce auditory icons if possible. "
+  (dtk-speak isearch-string)
+  (when (sit-for 0.5)
+    (emacspeak-auditory-icon 'search-hit)
+    (ems-set-personality-temporarily 
+     (point) 
+     (if  isearch-forward 
+         (- (point) (length isearch-string ))
+       (+ (point) (length isearch-string )))
+     'harry
+     (emacspeak-speak-line nil ))))
+
 (provide 'emacspeak-advice)
 ;;{{{ end of file
 

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
subject of "unsubscribe" or "help"


Emacspeak Files | Subscribe | Unsubscribe | Search