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

re: dtk-debug and tts logs

I remembered incorrectly.
Looking at the docs once again, dtk-debug was  set up 
only to view output from the speaker process, not to log the
input sent to it.

A simple way to enable logging of what is beign sent to the tts
process would be to advice process-send-string, check the value
of the process argument, and log the second argument to a desired
location if the process in question is the speaker process.
Here is a piece fo untested skeleton code to start with:

(defadvice process-send-string (before tts-debug pre act comp)
  "Check process argument, and if it is our process,
  then log it."
  (let ((process (ad-get-arg 0))
        (argument (ad-get-arg 1))
        (log nil)))
  (when (eq dtk-speaker-process  process)
    (setq log (get-buffer-create  tts-debug-buffer))
      (set-buffer log)
      (goto-char (point-max))
      (insert argument)

Best Regards,

Email:  raman@xxxxxxxxxxx
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc

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