GNU bug report logs - #68762
30.0.50; thing-at-point for an e-mail adress stops at "."

Previous Next

Package: emacs;

Reported by: Titus Müller <mail <at> titusmueller.de>

Date: Sat, 27 Jan 2024 16:37:01 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 68762 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Robert Pluim <rpluim <at> gmail.com>, mail <at> titusmueller.de, philipk <at> posteo.net,
 68762 <at> debbugs.gnu.org
Subject: Re: bug#68762: 30.0.50; thing-at-point for an e-mail adress stops
 at "."
Date: Sun, 28 Jan 2024 08:47:49 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eshel Yaron <me <at> eshelyaron.com>
>> Cc: Titus Müller <mail <at> titusmueller.de>,  Philip Kaludercic
>>  <philipk <at> posteo.net>,  68762 <at> debbugs.gnu.org
>> 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?

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


> Robert, any comments?




This bug report was last modified 1 year and 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.