rb wrote:
> Kevin Rodgers <[EMAIL PROTECTED]> 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
_______________________________________________
Help-gnu-emacs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to