From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: sql-mode password display Date: Thu, 03 Mar 2005 12:42:17 -0700 Message-ID: <38p7kvF5qislkU1@individual.net> References: <38mf4qF5q3gudU1@individual.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1109878990 3348 80.91.229.2 (3 Mar 2005 19:43:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2005 19:43:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 03 20:43:10 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D6wBg-0003KM-Mh for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Mar 2005 20:40:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D6wUh-00035m-TL for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Mar 2005 15:00:23 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-X-Trace: individual.net OszHe1UhpyvsBKbYS2ze/w9Sasc8s6UpvYnxjdT2waOSi75iE= User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:128951 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24495 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24495 rb wrote: > Kevin Rodgers writes: >>What happens if you don't enter your password when prompted by M-x >>sql-mysql, i.e. just type RET? > > Thank you for the suggestion, > > Without password, the server rejects the connection attempt - it is > configured to require passwords. I was hoping it would prompt you and comint would DTRT. >>M-: (string-match comint-password-prompt-regexp "Enter password: ") RET >>returns nil, so I would try >> >>(setq comint-password-prompt-regexp >> "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|Kerberos \\|CVS >>\\|UNIX \\| SMB \\|^\\)[Pp]assword\\( (again)\\)?\\|pass >>phrase\\|\\(Enter\\|Repeat\\) pass ?\\(word\\|phrase\\)\\)\\( for >>[^:]+\\)?:\\s *\\'") > > that is what the value of comint-password-prompt-regexp already is, as > mentioned: Not in Emacs 21.3, where its default value fails the test that I mentioned: >>M-: (string-match comint-password-prompt-regexp "Enter password: ") RET But changing its value as above causes that test to succeed. >> > Within the shell, any other commands requiring a password (ssh, rlogin, >> > su, etc), the password is [properly] not displayed. I know. That's because their password prompts satisfy the string-match test above, so when comint-watch-for-password-prompt is called via comint-output-filter-functions it sends your password to the sql process without echoing it in the buffer. -- Kevin Rodgers