[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug in `match-string` in 24.4.50.18?
From: |
Alexis |
Subject: |
Re: Possible bug in `match-string` in 24.4.50.18? |
Date: |
Mon, 26 May 2014 10:01:31 +1000 |
User-agent: |
mu4e 0.9.9.6pre3; emacs 24.4.50.18 |
Eli Zaretskii <address@hidden> writes:
>> From: Alexis <address@hidden>
>> Date: Sun, 25 May 2014 14:33:22 +1000
>>
>> (setq address "mailto:address@hidden")
>> (setq re "mailto")
>> (string-match re address)
>> (match-string 0 address)
>>
>> In 24.3, the call to `string-match` correctly returns 0, and the call to
>> `match-string` correctly returns "mailto".
>>
>> In 24.4.50.18 (more specifically, git commit
>> 08005cbfff9227ac73cbee5f3f5afa65f8c27849), the call to `string-match`
>> correctly returns 0, but the call to `match-string` consistently returns
>> "m" instead of "mailto".
>>
>> Am i doing something wrong, is there an issue with my local setup, or is
>> this a bug?
>
> I cannot reproduce this with today's trunk. Does it happen to you in
> "emacs -Q"?
It does; the above results were derived from running both 24.4.50.18 and
24.3 with the -Q option. However, putting the code inside a `let` as
suggested by Stefan does result in the correct output being produced.
Alexis.