Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No prompt found or ‘comint-prompt-regexp’ not set properly #2

Open
llcc opened this issue Mar 1, 2019 · 3 comments
Open

No prompt found or ‘comint-prompt-regexp’ not set properly #2

llcc opened this issue Mar 1, 2019 · 3 comments

Comments

@llcc
Copy link

llcc commented Mar 1, 2019

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

@ndwarshuis
Copy link
Owner

Two things to check:

  1. Is the value of comint-prompt-regexp set? (mine is "^")
  2. 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 return nil)

@llcc
Copy link
Author

llcc commented Mar 1, 2019

Hi @ndwarshuis

  1. comint-prompt-regexp returns "^" as yours.
  2. *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.

@ndwarshuis
Copy link
Owner

haven't solved this yet but found several problems:

  1. 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 the sqlite-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.
  2. It is possible to override the expected prompt with a regular expression "^" (instead of "^sqlite> ") by changing the sql-product-alist variable. 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants