From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Smiglarski Newsgroups: gmane.emacs.bugs Subject: bug#18240: sql-postgres does not prompt for password Date: Mon, 22 Sep 2014 09:10:11 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1411373495 18961 80.91.229.3 (22 Sep 2014 08:11:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2014 08:11:35 +0000 (UTC) To: 18240@debbugs.gnu.org, mmaug@yahoo.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 22 10:11:27 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XVyiT-00018f-3M for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Sep 2014 10:11:25 +0200 Original-Received: from localhost ([::1]:43279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVyiS-0006c9-ME for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Sep 2014 04:11:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVyiJ-0006bn-Mg for bug-gnu-emacs@gnu.org; Mon, 22 Sep 2014 04:11:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVyiC-0005wR-Fb for bug-gnu-emacs@gnu.org; Mon, 22 Sep 2014 04:11:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVyiC-0005uW-BZ for bug-gnu-emacs@gnu.org; Mon, 22 Sep 2014 04:11:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XVyi5-0003x8-N7 for bug-gnu-emacs@gnu.org; Mon, 22 Sep 2014 04:11:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Matthew Smiglarski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Sep 2014 08:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18240 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18240-submit@debbugs.gnu.org id=B18240.141137341515125 (code B ref 18240); Mon, 22 Sep 2014 08:11:01 +0000 Original-Received: (at 18240) by debbugs.gnu.org; 22 Sep 2014 08:10:15 +0000 Original-Received: from localhost ([127.0.0.1]:47952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVyhK-0003vt-Il for submit@debbugs.gnu.org; Mon, 22 Sep 2014 04:10:14 -0400 Original-Received: from mail-ig0-f193.google.com ([209.85.213.193]:39282) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XVyhI-0003vj-Rc for 18240@debbugs.gnu.org; Mon, 22 Sep 2014 04:10:13 -0400 Original-Received: by mail-ig0-f193.google.com with SMTP id h15so761232igd.8 for <18240@debbugs.gnu.org>; Mon, 22 Sep 2014 01:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=mFtMMbjwE7gpaAtkRJdh2VMXRXN+sXvtaexRrHiaotw=; b=jGIwLgB+JsG9/ovl2RWapwfoSQMB1NAY4i65lSFjt2AdKEAZKQVlCA9zK8kwhEc0Q1 8j4MPAMsXHE5wSOIaUts06xG30ylhi3a8G9BeAgv7/99doQi0QjU7FAPAt1XIU0gelga 4fftJxyr1NEwIIt17hFxQEdIGmDAacO9AZmNgq+1hJviZo2BpByo0yAZ4ufPp35Kglkj FRxyGanx314hEc0MACSw8lXNPyx+k5eC4LYqApfiKViWLXjDWxvEmHhopQETEkjF/8JA mZqR6VBJu5Cp8dn93jI9fJhQKJ1DR1OnfcC48wbHkRhsyIgcL1ch4YBtxgYiJEdljw3n tF4g== X-Received: by 10.42.30.142 with SMTP id v14mr661496icc.66.1411373411927; Mon, 22 Sep 2014 01:10:11 -0700 (PDT) Original-Received: by 10.64.223.12 with HTTP; Mon, 22 Sep 2014 01:10:11 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93613 Archived-At: This bug does not happen on the 24.3 release but does happen on 24.3.93. The problem is with sql-interactive-remove-continuation-prompt, one of the functions configured to be called by comint-output-filter. It is caused by code introduced by this git revision. commit 34499a8eb3c10db8c79a7aa87e1bbce0ae499fb6 Author: Michael Mauger Date: Tue Jul 23 20:25:53 2013 -0400 One workaround is to type the password in anyway. Another workaround is to remove some of the code with the following patch: diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 13d4178..2fd755d 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -3337,18 +3337,7 @@ to avoid deleting non-prompt output." (unless prompt-found (setq sql-output-newline-count nil oline (concat oline sql-preoutput-hold) - sql-preoutput-hold "")) - - ;; Break up output by physical lines if we haven't hit the final prompt - (unless (and (not (string= oline "")) - (string-match (sql-ends-with-prompt-re) oline) - (>= (match-end 0) (length oline))) - (setq last-nl 0) - (while (string-match "\n" oline last-nl) - (setq last-nl (match-end 0))) - (setq sql-preoutput-hold (concat (substring oline last-nl) - sql-preoutput-hold) - oline (substring oline 0 last-nl)))))) + sql-preoutput-hold ""))))) oline) This sql-interactive-remove-continuation-prompt function removes continuation prompt (the prompt sent when halfway through a command) and this improves the usability of multi-line SQL statements on the interpreter. There is another small bug with that code where the continuation line sneaks through, throwing the alignment out. By this, I mean the "template1->" prompt in the following examples: template1=> select 42; ?column? ---------- 42 (1 row) template1=> select 42; template1-> ?column? ---------- 42 (1 row) template1=> select 42, 43; template1-> ?column? | ?column? ----------+---------- 42 | 43 (1 row) That happens because of the following lines: ;; Add this text to what's left from the last pass (setq oline (concat sql-preoutput-hold oline) sql-preoutput-hold "") I hope this helps.