Subject: bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp'

From: Philip Kaludercic <[email-masked]>
Date: Tue, 12 Dec 2023 07:21:18 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Philip Kaludercic <[email-masked]>
>> Date: Sun, 03 Dec 2023 12:52:04 +0000
>> 
>> I noticed this recently when trying to extract a link to an mailing list
>> of mine hosted on SourceHut.
>
> Looks like you are adding slashes, not dashes?

Of course, my bad:

>From ee60512a4fa5fc33e1439c680505127828708d12 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <[email-masked]>
Date: Sun, 3 Dec 2023 13:49:07 +0100
Subject: [PATCH] Add slashes to 'thing-at-point-email-regexp'

* lisp/thingatpt.el (thing-at-point-email-regexp): Allow for
a (thing-at-point 'email) query to match addresses with slashes, as
used by Sourcehut.
---
 lisp/thingatpt.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 88efbf73beb..80dc5ee60b7 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -652,7 +652,7 @@ thing-at-point-looking-at
 
 ;;   Email addresses
 (defvar thing-at-point-email-regexp
-  "<?[-+_~a-zA-Z0-9][-+_.~:a-zA-Z0-9]*@[-a-zA-Z0-9]+[-.a-zA-Z0-9]*>?"
+  "<?[-+_~a-zA-Z0-9/][-+_.~:a-zA-Z0-9/]*@[-a-zA-Z0-9]+[-.a-zA-Z0-9]*>?"
   "A regular expression probably matching an email address.
 This does not match the real name portion, only the address, optionally
 with angle brackets.")
-- 
2.39.2