bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#24483: 25.1; sql-mode error due to nil prompt-cont-regexp


From: Pablo Mercader Alcántara
Subject: bug#24483: 25.1; sql-mode error due to nil prompt-cont-regexp
Date: Mon, 29 May 2017 17:10:34 -0400


Hello Nikolay Kudryavtsev ! thanks for your interest in this little problem.

I do think it is the same problem. I think that emacs tries to erase the sql prompt from the response and fails to do it. I'm getting the same problem that OP describes, when I open an interactive sql buffer and try to execute anything emacs answers with the error "Wrong type argument: stringp, nil" and no clue of the actual data. The moment in which I decided to report the bug might be while executing an stored procedure that doesn't exist, but this problem shows every time I execute ANYTHING, even a simple "select 1\ngo\n". You can see by your self that the "Wrong type argument" error is in the emacs output in my mail.

To tell you the truth I did find a little workaround, that's why I didn't bother with the problem to much. This bug is in my "todo" list but I'm a little bussy to try to understand it and make a proper repair. What I did to workaround it using the ideas provided in the mail of the OP and watching what was happening in edebug, was to modify sql-product-alist in sql.el, the "prompt-cont-regexp" in the "ms" product was not even there, so I put the property and set it to " " ( <- a blank space) and that did the trick. It now shows the results but when showing those ms-sql-server results it always eats some spaces in the first column making the rows and the head of the rows misaligned.

Also as OP said I didn't had this problem in the previous version (24.5) either.

I'm using osql, and I'm already using cp850 with it, I think that's the right encoding I should use because its what the command prompt of windows is using. Why do you think I should use cp866.

Thanks again! I hope this information helps.


2017-05-29 12:52 GMT-04:00 Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>:
Hello, Pablo.

I don't think you have the same bug as OP.

In your case it seems that you're trying to execute some stored procedure that does not exist and Emacs fails at parsing the reply.

Can you try adding:

(add-to-list 'process-coding-system-alist '("sqlcmd" . cp866))

to your init and see if anything changes. Also, you're using sqlcmd, right?

--
Best Regards,
Nikolay Kudryavtsev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]