From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pablo Mercader =?UTF-8?Q?Alc=C3=A1ntara?= Newsgroups: gmane.emacs.bugs Subject: bug#24483: 25.1; sql-mode error due to nil prompt-cont-regexp Date: Mon, 29 May 2017 17:10:34 -0400 Message-ID: References: <8CBA1E8F-1C4A-4113-933F-2701EB5BF769@kleehammer.com> <32ea773d-5881-8364-1d32-0d8b03380790@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c061526390d520550b01ea6" X-Trace: blaine.gmane.org 1496092278 6182 195.159.176.226 (29 May 2017 21:11:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 May 2017 21:11:18 +0000 (UTC) Cc: 24483@debbugs.gnu.org To: Nikolay Kudryavtsev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 29 23:11:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFRwU-0001Id-9T for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 May 2017 23:11:10 +0200 Original-Received: from localhost ([::1]:50535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFRwX-00008c-R4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 May 2017 17:11:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFRwR-000072-99 for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 17:11:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFRwM-0003Ei-9l for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 17:11:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFRwM-0003Ee-53 for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 17:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFRwM-0001Fc-0F for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 17:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pablo Mercader =?UTF-8?Q?Alc=C3=A1ntara?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 May 2017 21:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24483 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24483-submit@debbugs.gnu.org id=B24483.14960922424778 (code B ref 24483); Mon, 29 May 2017 21:11:01 +0000 Original-Received: (at 24483) by debbugs.gnu.org; 29 May 2017 21:10:42 +0000 Original-Received: from localhost ([127.0.0.1]:43874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFRw2-0001Ez-98 for submit@debbugs.gnu.org; Mon, 29 May 2017 17:10:42 -0400 Original-Received: from mail-io0-f174.google.com ([209.85.223.174]:35998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFRw0-0001Em-RR for 24483@debbugs.gnu.org; Mon, 29 May 2017 17:10:41 -0400 Original-Received: by mail-io0-f174.google.com with SMTP id o12so46496856iod.3 for <24483@debbugs.gnu.org>; Mon, 29 May 2017 14:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=G2AQwEnUJ+NDtuwbB9f2XGo37mMcQ6X97ExXTDD2GQU=; b=JDTzDzURYYqF//BAL3hfj2cakb/jQWYtpqZl72KglNRRkxzcd+C5CqtrsjPi1AgNoJ bIKaH69TeGPUR5TBj/D4h10bYw76QYrNUeyJJ9HojcUHcOYdNBQ9s/Ap63NMNT9Usxhl pNZfBFU369CyktGrVoxcuab+C39lXdFehW64o3d+WlHFA+qmzPukJewxn3vV8mUCkHFQ Rh3xgw0Iac7zMJ1atXM+qBDV99kBozcHkONn3lCMoocrFQOYsearg/0OM5urS6lbLhFL 2GQTUg395/sHP0/z27dPb+icAzxKcS+ginO2n7TLRqqjWy0t5LYST4KPuIB2+Pq0H2Dg 0zhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=G2AQwEnUJ+NDtuwbB9f2XGo37mMcQ6X97ExXTDD2GQU=; b=HdUMA+RjT0pUMYqNKXMJVYv+jCD/hDmmscPh6CmchsJrDz+Qmnt8Xvc+n3uIWl4CFL EKbNs40f3judQL5QgPeTONhOVnIZkSOJW6/1nzDOuymc9oXAj5Lr7HQzXHFDiqXfVGBi TuYpQEGzJiqri3ZTOaDQHU3mrVDyl/c11ccHM5wFwJUQnSuYqtj+mMQ2FXIrezPBuQg/ rI1yuLnYbwBKuMtGKP6lAA/ziLvZvD1lDuWVRHjsSW7oqOQJAjuO/0PhqHaAwGA+/4pD FZEUv8ObjaAGsXkjRwuBKVtOdxRMUrunjIJozX4aLuzin8NSYdHRK6MTx0CvLSm+IiAk IvsQ== X-Gm-Message-State: AODbwcAn+o0vBBg8aIyjyaxngWCMIEn4WJdeXxYiKFDp/HDixBLQviHV IuQEA7RCkZBlvmGTkqZ3H3gDLhb+PA== X-Received: by 10.107.62.139 with SMTP id l133mr15459119ioa.213.1496092235072; Mon, 29 May 2017 14:10:35 -0700 (PDT) Original-Received: by 10.107.10.142 with HTTP; Mon, 29 May 2017 14:10:34 -0700 (PDT) In-Reply-To: <32ea773d-5881-8364-1d32-0d8b03380790@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133011 Archived-At: --94eb2c061526390d520550b01ea6 Content-Type: text/plain; charset="UTF-8" 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 > > --94eb2c061526390d520550b01ea6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hello Nikolay Kudryavtsev ! thank= s for your interest in this little problem.

I do think it is t= he 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 descr= ibes, when I open an interactive sql buffer and try to execute anything ema= cs 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 bu= g might be while executing an stored procedure that doesn't exist, but = this problem shows every time I execute ANYTHING, even a simple "selec= t 1\ngo\n". You can see by your self that the "Wrong type argumen= t" 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 b= other 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. W= hat I did to workaround it using the ideas provided in the mail of the OP a= nd watching what was happening in edebug, was to modify sql-product-alist i= n 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 firs= t 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 alre= ady 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 i= nformation helps.


2017-05-29 12:52 GMT-04:00 Nikolay Kud= ryavtsev <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 procedu= re that does not exist and Emacs fails at parsing the reply.

Can you try adding:

(add-to-list 'process-coding-system-alist '("sqlcmd" . cp= 866))

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

--
Best Regards,
Nikolay Kudryavtsev


--94eb2c061526390d520550b01ea6--