help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (match-end 0) returns 1 instead of the actual position


From: Yuan Fu
Subject: Re: (match-end 0) returns 1 instead of the actual position
Date: Fri, 23 Dec 2022 16:51:37 -0800


> On Dec 22, 2022, at 3:24 PM, Emanuel Berg <incal@dataswamp.org> wrote:
> 
> Yuan Fu wrote:
> 
>> This doesn’t happen with vanilla Emacs, but I couldn’t tell
>> which part of my config is causing it. Basically if I run
>> 
>> (looking-at "xxx")
>> (match-end 0)
>> 
>> It returns 1 instead of the end of xxx after point.
>> 
>> Is there any user option that would affect this that I’m not aware of?
>> 
>> I tried bisecting but the issue doesn’t always reproduce.
>> (It reproduce reliably when I enable all configuration, but
>> not when I comment out parts of the config ...)
> 
> ... we'll consider this a "slip", eh :)
> 
> Do the binary search algorithm of your code, Google that if
> you don't know what it refers to in this contex, when you
> understand it you'll see that you can pinpoint the bug or
> misconfiguration very easily and quickly.
> 
> You can then tell us what it was, also!

As Stefan pointed it out, it was my slip in how I ran the test. I did try 
bisecting but that didn’t turn up anything because I ran the code in the wrong 
way.

Yuan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]