[Top][All Lists]

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

Re: Subject line processing in Gnats 4.0

From: Milan Zamazal
Subject: Re: Subject line processing in Gnats 4.0
Date: 13 Dec 2001 23:18:12 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

>>>>> "DB" == Dirk Bergstrom <address@hidden> writes:

    DB> *) accept FW: as well as RE: -- change the subject pattern
    DB> thusly:

This is insufficient, since my mail client generates something
completely different of "FW" on forwarding and some other software
authors think it's a good idea to replace "Re:" with its "translation"
to the users' language.

    DB> *) gnats currently accepts things like "sw-foo: 1234" instead of
    DB> "sw-foo/1234".  i'm guessing that the former is an antiquated
    DB> form, since gnats doesn't emit it anymore.

I agree we could/should drop the colon form.

    DB> people don't use it, but they *do* use "PR1234".  adjust the
    DB> regex appropriately:

    DB> + "(.*(re|fwd?)[ \t]*(\\[[0-9]+\\])?:)?[ 

OK.  How about the spaces between "PR" and the number?

    DB> this will require some futher munging of code, since the stuff
    DB> that pulls out and uses <category>/<number> will have to learn
    DB> to contend with PR<number>.  since it really isn't necessary to
    DB> use category to pull up the PR, it might be best to change the
    DB> regex to save only the number, and not the category/number pair.
    DB> then we could just hack out the additional parsing code.

>>>>> "PT" == Paul Traina <address@hidden> writes:

    PT> Funny, because I *did* change the regexp to accept PR/ as a
    PT> generic category.  Did that code get lost in 4?

The current regexp contains the fragment

  ([-a-z0-9_+.]*[:/][ \t]*([0-9]+))

that matches "PR/" automatically.  Dirk's point is to include "PR"
without the slash as well.

    PT> By the way, refile-pr was written for 4.

Very well. :-)

Well, to summarize, I suggest the following:

- Not to try to match "re", "fw", etc. and simply look for a substring
  as stated below.

- Accept "\<CATEGORY/NUMBER" where CATEGORY is a valid category name and
  PR NUMBER is present in CATEGORY.

- Accept "\<PR[ \t/]*NUMBER" where "PR" must be all capitals and NUMBER
  corresponds to an existing PR number.

Would it serve the purpose in an acceptable way?


Milan Zamazal

Omigod, it's a flame war about a flame war.  You know, a meta-flame war!
                                                 Kenny Tilton in comp.lang.lisp

reply via email to

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