org-sql
org-sql copied to clipboard
No prompt found or ‘comint-prompt-regexp’ not set properly
Thanks for your great package.
I freshly installed it and called org-sql-user-reset. It gave me this error message.
No prompt found or ‘comint-prompt-regexp’ not set properly.
System: Windows 10, Emacs 26.1
Two things to check:
- Is the value of
comint-prompt-regexpset? (mine is"^") - Is there a buffer called *SQL: Org* after running
org-sql-user-reset? If not, can you please non-interactively run(org-sql-cmd-open-connection)and send any errors that appear in *Messages*? (this function should just returnnil)
Hi @ndwarshuis
-
comint-prompt-regexpreturns"^"as yours. -
*SQL: Org*buffer exists as an empty buffer. Eval(org-sql-cmd-open-connection)produces
Login...done
comint-redirect-send-command-to-process: No prompt found or ‘comint-prompt-regexp’ not set properly
in message buffer.
haven't solved this yet but found several problems:
- starting a sqlite process buffer on windows produces no prompt (it should be "sqlite> "). The buffer appears to work fine when typing directly into it, but fails with the "No prompt found" error from OP when using any function that calls
comint-redirect-send-command-to-process' (which includes thesqlite-redirect-onefunction called fromorg-sql-cmdin this package). The error happens becausecomint-redirect-send-command-to-process` looks for the "sqlite> " prompt but cannot find it. - It is possible to override the expected prompt with a regular expression "^" (instead of "^sqlite> ") by changing the
sql-product-alistvariable. Sending commands seems to work, but they hang the entire Emacs process unless they produce output it seems. I haven't figured out why yet.
For now, the only workaround is to run this on Linux, unfortunately. Since the root cause is actually in comint (which is part of Emacs itself) I will file a bug upstream. Will keep this open though in case they suggest a hacky workaround (or I find one).