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

emacspeak-moz bug?



Hi Raman,

I think I've found a bug in emacspeak-moz.el

When I run emacspeak-moz-browse-current, I get the following backtrace

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p t)
  ad-Orig-comint-output-filter(#<process MozRepl> "\nWelcome to MozRepl.\n\n - If you get stuck at the \"...>\" prompt, enter a semicolon (;) at the beginning of the line to force evaluation.\n - If you get errors after every character you type, see http://github.com/bard/mozrepl/wikis/troubleshooting (short version: stop using Microsoft telnet, use netcat or putty instead)\n\nCurrent working context: chrome://browser/content/browser.xul\nCurrent input mode: syntax\n\nrepl> ")
  comint-output-filter(#<process MozRepl> "\nWelcome to MozRepl.\n\n - If you get stuck at the \"...>\" prompt, enter a semicolon (;) at the beginning of the line to force evaluation.\n - If you get errors after every character you type, see http://github.com/bard/mozrepl/wikis/troubleshooting (short version: stop using Microsoft telnet, use netcat or putty instead)\n\nCurrent working context: chrome://browser/content/browser.xul\nCurrent input mode: syntax\n\nrepl> ")
  sleep-for(0 100)
  (progn (setq inferior-moz-buffer (apply ... "MozRepl" ... nil nil)) (sleep-for 0 100) (with-current-buffer inferior-moz-buffer (inferior-moz-mode) (run-hooks ...)))
  (condition-case err (progn (setq inferior-moz-buffer ...) (sleep-for 0 100) (with-current-buffer inferior-moz-buffer ... ...)) (file-error (with-output-to-temp-buffer "*MozRepl Error*" ...) (error "Can't start MozRepl")))
  inferior-moz-start-process()
  (progn (inferior-moz-start-process) (inferior-moz-process))
  (or (if (buffer-live-p inferior-moz-buffer) (get-buffer-process inferior-moz-buffer)) (progn (inferior-moz-start-process) (inferior-moz-process)))
  inferior-moz-process()
  emacspeak-moz-eval-expression-and-browse("repl.updateADom(); repl.adom.html(1)")
  emacspeak-moz-browse-current()
  call-interactively(emacspeak-moz-browse-current t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

In looking into the cause, I found the problem is due to
comint-output-filter trying to call insert with a value of t rather than a
character or string value. 

Looking further, I found that the filter function
emacspeak-moz-accumulate_output returns t. However according to the
documentation, filter functions should either return the original output or
a form of the original output that has been filtered or processed in some
way. 

I've modified the last line of the function to just return the value passed
as the input. Not sure if this is correct or if it would be better to just
return an empty string (as the output is already accumulated in the
emacspeak-moz output buffer. I'm still just getting the package to work and
am not sure exactly what is required yet. Anyway, the modified filter
function is

(defun emacspeak-moz-accumulate-output(output)
  "Accumulate output into our Moz output buffer."
  (declare (special emacspeak-moz-output-buffer))
  (save-excursion
    (set-buffer emacspeak-moz-output-buffer)
    (goto-char (point-max))
    (insert output)
    output))

I won't send a diff/patch yet as there may be other changes. I just wanted
to alert you to this bug now and will send a patch once I've got
emacspeak-moz working.

Tim

-----------------------------------------------------------------------------
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".



If you have questions about this archive or had problems using it, please send mail to:

priestdo@cs.vassar.edu No Soliciting!

Emacspeak List Archive | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog | Search the archive