From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: comint-password-prompt-regexp Date: Mon, 04 May 2020 13:09:25 +0200 Message-ID: <87o8r47y8q.fsf@rub.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="31003"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 04 13:12:22 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVZ1J-0007uw-UF for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 13:12:21 +0200 Original-Received: from localhost ([::1]:44626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVZ1I-0006jV-Mv for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 07:12:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVYyY-0004Ff-OE for emacs-devel@gnu.org; Mon, 04 May 2020 07:09:30 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:59855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVYyX-0007Vb-PK for emacs-devel@gnu.org; Mon, 04 May 2020 07:09:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1588590566; bh=sLa2s1g5fjC6PwlJqz64HgqHLWHjtwHR0D88p1e/r7Q=; h=X-UI-Sender-Class:From:To:Subject:Date; b=XqkbhUm+zoY4QkA5IKy1vAN/Y2M6ali8sUCmG+pWccSUdi9HU2k+WLjce6sq+6FpQ 3RTau6maRllIDPebC3m3Z+l2hlhDL6WwfRZDJIA/Yc6twoEpJk3Cstq+rPtf7cYBz+ sNerj5vmE9ime4SJXHNJDop4foLr4X4KNx3PNyd4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-lfs84 ([92.73.74.231]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MCbIn-1jLtvJ1v19-009ixv for ; Mon, 04 May 2020 13:09:26 +0200 X-Provags-ID: V03:K1:u5Zsbw5ixGPghxBLWxN1iKjylTroMF6ae3rCKaENJ+mZSQyftNS p1jErhUMApqL3hJV90hpTQmyPmWoHGDwrdBtBoebC1odfqku+LkTsnG8X5fyhBoqG1U953C Y9XNPKMxrJk2NscZyjHcWOkPS0GRAG1vkfAkPqlW0Mfw9OpYgTP4C/R0dNf7vcv/voMGRIA kCtkD9WCswb/vyINvXcvg== X-UI-Out-Filterresults: notjunk:1;V03:K0:TSW0xGBRte4=:y79ssPTd3cv3rxHqRV8FHE BdW/Fp479B3r9AefiSsikdKZwTkMnjSIx7vkjm7r66XPoUxWbFft2VftSc0eJR33qPNArVtXl 68w3+U4Rk3ERIH6oggjEIhx3l3FQ99EmyicEzuToG6n0garvAUO85S8hIIMJf3d77YADJfYwI eGzLAnElsd29smKVf/PU5H4As4LZiUs12GsmMeVfBzGgx09GHau2cbfJISV5NEMqlH7Wysd6g Rp7eHSkf0AZEsUtUXnQeESATtD0VzigbCKs0ghvQniSx+km4tDE3ZfN86DaWGN8CD4WY4/pb/ YcFIltSXkI2yet3EmQdcZq8Eu9cc9gBBq18fPP3knLx5HSXaC6761zGH/65P6idsMiLPZyF/M LZSIBykU1haHQ3XaOahDjvg/lUe8xsP3UrvXFjUNuCAUhrLa6bcpRc+UFn1g1KytJX9XJ+Ob8 NnHGfDQ/ivHJm/8Xsh6H2RY39mch8Izq/YovC22TaogMc3kGHbbmFYSKBTGx9+mS5XjH1vkUA bJDxGHnELLpVrFj34lDJLJTkCx7PnLb8eTwNag1HRD1haXQopTybVjEBS2oQgdFmspsl9A0md U3xNxhOv+0iw9L8CjSeSCMzDR3g0c6sHwnxSEAAgPK3VxF9u4bqOhOw+9YERzV6RYeZT8Cp8z FScEdyYdLRoTSfw6xC34tv2Dj5FZteu9vAFkRzR6mfC8hAEY055bOuxyQ6m9NjqfnqVyAybCO 8WLvDHwAwA0lKa1mgE74Dfsii4s3Ctv85Z3So0P89EoOscbSftq0l1B9AzH8UO5WLtx+ArJm Received-SPF: pass client-ip=212.227.15.18; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 07:09:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, TRACKER_ID=1.306 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248807 Archived-At: On one of my systems, when using ssh in shell-mode (M-x shell), the password prompt does not appear in the minibuffer but only in the *shell* buffer directly under the ssh invocation, and the password is not hidden when it's entered. I've determined that reason is that the password prompt string passed to comint-output-filter begins with a carriage return character (^M), and when the rest of the prompt string begins with "Password" (which it can on this system), comint-password-prompt-regexp does not match it and thus comint-watch-for-password-prompt returns nil instead of calling comint-send-invisible. So far I haven't found out where the carriage return is coming from, maybe it's openssh (on the system where the carriage return occurs in the prompt string I have openssh-8.2p1, on the system where the carriage return does not occur openssh-7.9p1; if anyone knows the answer, or has a suggestion how to find out, I'd appreciate hearing it). Of course, I can just customize comint-password-prompt-regexp to match the prompt with the carriage return. But I'm asking here because, if this should be a more general issue, maybe the default value of comint-password-prompt-regexp should be changed. In bug#31075 Noam Postavsky pondered whether eshell-password-prompt-regexp should replace comint-password-prompt-regexp, noting that "the eshell regexp looks much simpler". And indeed, on the system where the carriage return occurs in the prompt string, using ssh in the Emacs shell (M-x eshell) does use the minibuffer for password input and it is hidden; and if I set comint-password-prompt-regexp to eshell-password-prompt-regexp, then I also get minibuffer hidden input in shell-mode. So should comint-password-prompt-regexp be replaced by eshell-password-prompt-regexp? Steve Berman