Re: [PATCH] Fix M-x tmda-pending for new script output

Bob Rogers <[email protected]> Wed, 30 Jan 2008 23:13:10 -0500
Newsgroups gmane.mail.spam.tmda.devel
Message-ID <[email protected]>
   From: Stephen Warren <[email protected]>
   Date: Wed, 30 Jan 2008 20:28:40 -0700

   Bob Rogers wrote:
   >    After upgrading from 1.1.4 to 1.1.12, I noticed that the tmda-pending
   > script now drops the ".msg" from the message file name in "terse"
   > output.  Unfortunately, this breaks M-x tmda-pending, which relies on
   > the ".msg" suffix to recognize the name.  The attached patch to tmda.el
   > fixes the problem, in a way that allows both styles of output to be
   > parsed.

   I'm not sure the new regex is correct . . .

   Instead, I think the new regex should accept:

   accepts "a sequence of 0-9 or ." optionally followed by ".msg"

   which I guess might be coded as this, although I'm not familiar with 
   Emacs's exact regex syntax:

   "\\([0-9.]+\\(.msg\\)?\\)[\t ]"

Yes, that will work, and is more precise than what I suggested, though
(strictly speaking) you need "\\." to match just a dot.  But since
"[0-9.]+" will also cover it, you might as well drop the second dot
altogether.

   I tend to avoid captures in Emacs regexps because they look pretty
messy, but in this case it seems to require more explanation than it's
worth.

					-- Bob