pan-users
[Top][All Lists]
Advanced

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

Re: [Pan-users] Select Headers with RE in the Subject/Author Entryfield?


From: Duncan
Subject: Re: [Pan-users] Select Headers with RE in the Subject/Author Entryfield?
Date: Fri, 12 Jun 2015 22:20:08 +0000 (UTC)
User-agent: Pan/0.140 (Chocolate Salty Balls; GIT af87825)

Andrew Nile posted on Fri, 12 Jun 2015 15:47:24 +0100 as excerpted:

> On 12 June 2015 at 13:59, Duncan
> <address@hidden> wrote:
>> [...] It may be that the code deliberately shuts off parsing in this
>> case, and "forgets" to turn it back on again,
>> thus leaving the process stuck until toggled.
> 
> I reckon this is probably the right answer. I've found the code where
> Pan attempts to make sense of the regex entered into the search box
> [text-match.cc:202], and it seems to have three states:
> 
> NEED_COMPILE - a regex is entered & needs looking at
> COMPILED - a looked at regex is successfully filtered
> ERR - a looked at regex seems to be invalid
> 
> NEED_COMPILE turns into COMPILED nicely enough and back when finished.
> But when ERR happens, nothing resets it to NEED_COMPILE and it won't
> check again until toggled.
> 
> As there's only 0.5 seconds to enter a regex, even a valid but partially
> typed one will end up in an ERR state.

That's exactly the scenario I was trying to describe, except not really 
reading code I couldn't simply read it and describe what it was doing, in 
the beautiful way you did.  Thanks.  And the patch is a very nice bonus. 
=:^)

Question: Is that code used for just the subject/author search regex 
matching, or is it used in the group regex matching and scoring regex 
matching as well?  If it's used in all three places the patch's effect on 
log-spamming could be much worse than if it's used in just the one.


-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




reply via email to

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