unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: 67600@debbugs.gnu.org
Subject: bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp'
Date: Sun, 03 Dec 2023 12:52:04 +0000	[thread overview]
Message-ID: <87v89fh2iz.fsf@posteo.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

Tags: patch


I noticed this recently when trying to extract a link to an mailing list
of mine hosted on SourceHut.

In GNU Emacs 30.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0, Xaw scroll bars) of 2023-11-25 built on icterid
Repository revision: 78eb99c72c6834a9161fc4e3f3cef3fc6bdffefd
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --with-imagemagick --with-x-toolkit=lucid
 --with-native-compilation=aot --with-tree-sitter 'CFLAGS=-O2
 -march=native -mtune=native -pipe''


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-dashes-to-thing-at-point-email-regexp.patch --]
[-- Type: text/patch, Size: 998 bytes --]

From 1caf9c71b7b0ad4a31a9318932b242f7a46183f5 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sun, 3 Dec 2023 13:49:07 +0100
Subject: [PATCH] Add dashes 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 dashes, 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


[-- Attachment #3: Type: text/plain, Size: 23 bytes --]


-- 
Philip Kaludercic

             reply	other threads:[~2023-12-03 12:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-03 12:52 Philip Kaludercic [this message]
2023-12-03 13:14 ` bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp' Eli Zaretskii
2023-12-12  7:21   ` Philip Kaludercic
2023-12-12 12:06     ` Eli Zaretskii
2023-12-12 12:21       ` Visuwesh
2023-12-12 12:27         ` Eli Zaretskii
2023-12-12 12:41           ` Visuwesh
2023-12-12 13:08             ` Eli Zaretskii
2023-12-12 13:23               ` Visuwesh
2023-12-12 13:35                 ` Eli Zaretskii
2023-12-12 14:25                   ` Visuwesh
2023-12-16 10:41       ` Philip Kaludercic
2023-12-16 13:38         ` Eli Zaretskii
2023-12-16 14:50           ` Philip Kaludercic
2023-12-16 14:59             ` Eli Zaretskii
2023-12-17 12:11               ` Philip Kaludercic

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=87v89fh2iz.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=67600@debbugs.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).