unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Francesco Potorti` <pot@gnu.org>
Subject: password prompt in comint.el
Date: Wed, 17 Apr 2002 11:49:57 +0200	[thread overview]
Message-ID: <E16xm4b-0007xX-00@pot.cnuce.cnr.it> (raw)

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))))
 \f

                 reply	other threads:[~2002-04-17  9:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E16xm4b-0007xX-00@pot.cnuce.cnr.it \
    --to=pot@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).