From: Paul Eggert <eggert@cs.ucla.edu>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Experimental regexp check: repetition of empty-matching expression
Date: Fri, 19 Apr 2019 08:24:56 -0700 [thread overview]
Message-ID: <c8b5a9f5-a615-269c-9918-f0bbcdfb4c91@cs.ucla.edu> (raw)
In-Reply-To: <EA1F1FF0-069C-4EC0-A0D7-ECB1C5A0D782@acm.org>
[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]
On 4/13/19 1:09 AM, Mattias Engdegård wrote:
>
> --- a/lisp/mail/mail-extr.el
> +++ b/lisp/mail/mail-extr.el
> @@ -383,7 +383,7 @@ mail-extr-initial-pattern
> ;; Matches telephone extensions.
> (defconst mail-extr-telephone-extension-pattern
> (purecopy
> - "\\(\\([Ee]xt\\|\\|[Tt]ph\\|[Tt]el\\|[Xx]\\).?\\)? *\\+?[0-9][- 0-9]+"))
> + "\\(\\([Ee]xt\\|[Tt]ph\\|[Tt]el\\|[Xx]\\).?\\)? *\\+?[0-9][- 0-9]+"))
> ^
> Doesn't it look like the dot is meant to be escaped?
Yes, and I installed the attached patch to fix that. Thanks.
>
> --- a/lisp/net/tramp-adb.el
> +++ b/lisp/net/tramp-adb.el
> @@ -53,7 +53,7 @@ tramp-adb-method
> "When this method name is used, forward all calls to Android Debug Bridge.")
>
> (defcustom tramp-adb-prompt
> - "^\\(?:[[:digit:]]*|?\\)?\\(?:[[:alnum:]\e;[]*@?[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]"
> + "^[[:digit:]]*|?\\(?:[[:alnum:]\e;[]*@?[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]"
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
> There is a second one a bit later in the same regexp.
>
Michael already fixed this.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-mail-extr-regexp-typo-with.patch --]
[-- Type: text/x-patch; name="0001-Fix-mail-extr-regexp-typo-with.patch", Size: 1189 bytes --]
From 938a6c6fa8e8685539590df402e749428d04ca06 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 19 Apr 2019 08:23:15 -0700
Subject: [PATCH] Fix mail-extr regexp typo with ".".
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-04/msg00543.html
* lisp/mail/mail-extr.el (mail-extr-telephone-extension-pattern):
Escape the trailing optional period after an abbreviation.
---
lisp/mail/mail-extr.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index a0b9688650..c1e90c3dcb 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -383,7 +383,7 @@ mail-extr-initial-pattern
;; Matches telephone extensions.
(defconst mail-extr-telephone-extension-pattern
(purecopy
- "\\(\\([Ee]xt\\|[Tt]ph\\|[Tt]el\\|[Xx]\\).?\\)? *\\+?[0-9][- 0-9]+"))
+ "\\(\\([Ee]xt\\|[Tt]ph\\|[Tt]el\\|[Xx]\\)\\.?\\)? *\\+?[0-9][- 0-9]+"))
;; Matches ham radio call signs.
;; Help from: Mat Maessen N2NJZ <maessm@rpi.edu>, Mark Feit
--
2.20.1
prev parent reply other threads:[~2019-04-19 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 20:00 Experimental regexp check: repetition of empty-matching expression Mattias Engdegård
2019-04-13 2:47 ` Paul Eggert
2019-04-13 8:09 ` Mattias Engdegård
2019-04-19 15:24 ` Paul Eggert [this message]
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=c8b5a9f5-a615-269c-9918-f0bbcdfb4c91@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.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).