From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Francesco Potorti` Newsgroups: gmane.emacs.devel Subject: password prompt in comint.el Date: Wed, 17 Apr 2002 11:49:57 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1019037068 31021 127.0.0.1 (17 Apr 2002 09:51:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 17 Apr 2002 09:51:08 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16xm5j-00084E-00 for ; Wed, 17 Apr 2002 11:51:07 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16xmON-00068V-00 for ; Wed, 17 Apr 2002 12:10:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16xm5k-0006P4-00; Wed, 17 Apr 2002 05:51:08 -0400 Original-Received: from pot.cnuce.cnr.it ([146.48.83.182]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16xm4b-0006Hf-00 for ; Wed, 17 Apr 2002 05:49:58 -0400 Original-Received: from pot by pot.cnuce.cnr.it with local (Exim 3.35 #1 (Debian)) id 16xm4b-0007xX-00 for ; Wed, 17 Apr 2002 11:49:57 +0200 Original-To: Emacs developers X-fingerprint: 4B2 6187 5C3 D6B1 2E31 7666 9DF 2DC9 BE21 6115 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2696 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2696 Sometimes prompts for passwords begin with whitespace, which is annoying and ugly when comint displays them in the minibuffer. This happens for example with GPG. The following patch addresses this problem. If it is okay, I can install it. --- comint.el.~1.269.~ Wed Apr 17 10:01:58 2002 +++ comint.el Wed Apr 17 11:45:29 2002 @@ -1984,6 +1984,8 @@ process if STRING contains a password pr This function could be in the list `comint-output-filter-functions'." (when (string-match comint-password-prompt-regexp string) + (when (string-match "^[ \n\r\t\v\f\b\a]+" string) + (setq string (replace-match "" t t string))) (let ((pw (comint-read-noecho string t))) (send-invisible pw))))