From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ian Johnson Newsgroups: gmane.emacs.bugs Subject: bug#29729: [PATCH] Support French password prompts in shell Date: Fri, 15 Dec 2017 21:19:10 -0500 Message-ID: <87lgi3mn35.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1513393933 16744 195.159.176.226 (16 Dec 2017 03:12:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 16 Dec 2017 03:12:13 +0000 (UTC) To: 29729@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 16 04:12:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQ2tT-0003t8-AQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Dec 2017 04:12:07 +0100 Original-Received: from localhost ([::1]:49223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQ2ta-0000ZO-9l for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Dec 2017 22:12:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQ2tT-0000Z8-8B for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 22:12:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQ2tO-00088b-6y for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 22:12:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55848) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQ2tO-000886-2F for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 22:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eQ2tN-0001zG-NV for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 22:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ian Johnson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Dec 2017 03:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29729 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15133938957592 (code B ref -1); Sat, 16 Dec 2017 03:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Dec 2017 03:11:35 +0000 Original-Received: from localhost ([127.0.0.1]:36295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQ2sx-0001yO-CQ for submit@debbugs.gnu.org; Fri, 15 Dec 2017 22:11:35 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQ24e-0000jQ-Ef for submit@debbugs.gnu.org; Fri, 15 Dec 2017 21:19:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQ24Y-00076H-8a for submit@debbugs.gnu.org; Fri, 15 Dec 2017 21:19:31 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:60971) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eQ24Y-00075t-2c for submit@debbugs.gnu.org; Fri, 15 Dec 2017 21:19:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQ24W-0002d8-M9 for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 21:19:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQ24R-0006wG-N7 for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 21:19:28 -0500 Original-Received: from mail-io0-x235.google.com ([2607:f8b0:4001:c06::235]:34742) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQ24R-0006vh-HV for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2017 21:19:23 -0500 Original-Received: by mail-io0-x235.google.com with SMTP id n41so4528130ioe.1 for ; Fri, 15 Dec 2017 18:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=HdZ7+eZr8DUWik2wth4FkVF2jWUdFssV0CKTXrDWtSw=; b=k+h3nIujoCMGeIF8IbFs+RXOnqdD08n/TMEbnZMwALTjZicBPG7O4JnDujS/r3zLzC f3VxtgBL19HRg/38YTnEPtOhyloB/Hw+5C8JmLWtdUayQmRWXYCWj49UBLhk80AaN9hk 2KwxIyJ4RKTWqkj+RSbOGgsoRhdpV+nR1ldHG8zV5poc0hPvrxOnvka4Ccn7iwXHKJyB KYbummZTv0oXlP8jL/iAuxa8UQHqgEJB7e4SrcQoPUDXpY8glvxTuLDMNiN7W+S1408I vyD/sKl/hVl5GPqkmpJGovBJjvgeoXUIs2tk88MpCReb5WUDgtWVErkX8iWQJoRh27Cw Fi9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=HdZ7+eZr8DUWik2wth4FkVF2jWUdFssV0CKTXrDWtSw=; b=ITCv4RdIGvFCNqYw/5BhCbqy1XPLMJmSIPRCeNR3FAwyrkDiQt2a/uMjgXVyTq0LC3 W35QCLBFKGEYSs7cIUYW9dR3QTYgXm0PXfv/xjio7ageDqKwUtdImYu9Ro4PF+yb3JJt zae/E3HVtYsgREbNM2wx/S6vxas0X7pftoEZV4RktTSzA8N99NK6cQ5HTQKF5Jbw1MKU 6LgjGRKk4Gr/ICIQwD1KrNzcubQSnwBHbhH1osu+xYuWpC82qHaNyKRBYuuE/U6S2Ni9 Sj2kqWqwCXGZhFDNNE9ZLNnTuj2kuV88czwCiN+vWHkTYR0uG6ML7tTfo+yXSmFb26xM RmsA== X-Gm-Message-State: AKGB3mLe/zAa+GnAWSrgaq5tF0jRf7Ja6r3IVEaL9av2tbILXhODgxbe G9eduTIdGyvxwi+b6QWcvjSFZeK4 X-Google-Smtp-Source: ACJfBovYsXSjsGctbifZnkKwrgO6aAMjeKKo/G2HipaNdxup5/WBEEzvcUoC/lNaowIJfQA24J9nXQ== X-Received: by 10.107.130.78 with SMTP id e75mr59891iod.132.1513390762466; Fri, 15 Dec 2017 18:19:22 -0800 (PST) Original-Received: from localhost (pool-173-79-139-183.washdc.fios.verizon.net. [173.79.139.183]) by smtp.gmail.com with ESMTPSA id d14sm4522339itj.11.2017.12.15.18.19.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Dec 2017 18:19:21 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Fri, 15 Dec 2017 22:11:34 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141139 Archived-At: --=-=-= Content-Type: text/plain I noticed that French password prompts in `shell-mode' weren't detected as such by `comint-watch-for-password-prompt' due to a space between the password prompt and the colon (as in `Mot de passe :'), so I modified `comint-password-prompt-regexp' to detect this space (as well as non-breaking spaces before and after the colon, which is used by sudo). Please let me know if I missed anything, as this is my first patch. Thank you! --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-Support-French-password-prompts-in-shell.patch Content-Transfer-Encoding: quoted-printable Content-Description: Patch for French password prompt detection >From 0d6d4e79e8fe94ae2f7424c2fac1b50b49d891d6 Mon Sep 17 00:00:00 2001 From: Ian Johnson Date: Fri, 15 Dec 2017 21:03:22 -0500 Subject: [PATCH] Support French password prompts in shell French punctuation rules require a space (preferably non-breaking) before the colon, but password prompts following this rule were not identified properly by `comint-watch-for-password-prompt'. * lisp/comint.el (comint-password-prompt-regexp): support spaces (including non-breaking spaces) before and after password prompt colon. --- lisp/comint.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/comint.el b/lisp/comint.el index aa7dab28f3..414ffd0f49 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -363,7 +363,7 @@ comint-password-prompt-regexp "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)" "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?" ;; "[[:alpha:]]" used to be "for", which fails to match non-English. - "\\(?: [[:alpha:]]+ .+\\)?[:=EF=BC=9A=E1=9F=96]\\s *\\'") + "\\(?: [[:alpha:]]+ .+\\)?[\\s =C2=A0]*[:=EF=BC=9A=E1=9F=96][\\s =C2=A0= ]*\\'") "Regexp matching prompts for passwords in the inferior process. This is used by `comint-watch-for-password-prompt'." :version "26.1" --=20 2.15.1 --=-=-=--