Subject: bug#68762: 30.0.50; thing-at-point for an e-mail adress stops at "."

From: Robert Pluim <[email-masked]>
Date: Mon, 29 Jan 2024 10:05:17 +0100

>>>>> On Sun, 28 Jan 2024 08:47:49 +0100, Eshel Yaron <[email-masked]> said:

    Eshel> Eli Zaretskii <[email-masked]> writes:
    >>> From: Eshel Yaron <[email-masked]>
    >>> Cc: Titus Müller <[email-masked]>,  Philip Kaludercic
    >>> <[email-masked]>,  [email-masked]
    >>> Date: Sun, 28 Jan 2024 06:58:19 +0100
    >>> 
    >>> FWIW, AFAICT this is introduced by 03cfede8f0 (which fixed Bug#61519).
    >>> 
    >>> I think the real issue resides in `thing-at-point-looking-at`, though:
    >>> It stops extending the match backwards when it first encounters a
    >>> non-match.  The following change solves this for me, and keeps all the
    >>> tests happy:
    >> 
    >> Thanks.  Can you describe the main ideas of the change?

    Eshel> Sure: the current implementation searches forward first, and then back,
    Eshel> until it finds a match that contains point.  It then extends the match
    Eshel> backward character by character until it reaches a non-match.  My change
    Eshel> reverses the direction: start from some position before point and search
    Eshel> forward until you find a match that contains point.  This works better
    Eshel> since "matching a regular expression at a given spot always works from
    Eshel> beginning to end" (from Info node "(elisp) Regexp Search").

    >> Robert, any comments?

Not really. It would be nice if the test suite could be extended to
catch this.

Robert
--