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 also have an improved version of tmda-pending-refresh-buffer that
does a prettier job of reformatting the script output, and uses the
Emacs truncate-lines feature to preserve long subjects while still
getting the effect of one line per message. If you'd also like to
consider this version (which also has the ".msg" fix), I'd be happy to
send that along as well.
TIA,
-- Bob Rogers
http://rgrjr.dyndns.org/
* tmda/contrib/tmda.el:
+ (tmda-pending-refresh-buffer): Make the ".msg" at the end of the
message file name optional, as tmda-pending now drops these.
+ (tmda-pending-msg): Ditto.
Diffs between last version checked in and current workfile(s):
Index: tmda/contrib/tmda.el
===================================================================
--- tmda/contrib/tmda.el (revision 2194)
+++ tmda/contrib/tmda.el (working copy)
@@ -617,10 +617,9 @@
(let ((winwidth (1- (window-width))))
(goto-char (point-min))
(while (not (eobp))
- (cond ((looking-at ".*[0-9.]+\\.msg[\t ]")
+ (cond ((looking-at "^$\\|^-\\*-")) ; do nothing
+ ((looking-at "[\t ]*[0-9.msg]+[\t ]")
(insert "[ ] "))
- ((looking-at "^$")) ; do nothing
- ((looking-at "^-\\*- ")) ; again, do nothing
(t
(insert " ")))
(when tmda-pending-truncate-lines
@@ -639,7 +638,7 @@
(save-excursion
(beginning-of-line)
(when (looking-at "\\[.\\] ")
- (progn (re-search-forward "\\([0-9.]+msg\\)[\t ]")
+ (progn (re-search-forward "\\([0-9.msg]+\\)[\t ]")
(match-string 1)))))
(defmacro tmda-pending-command (&rest forms)
End of diffs.
_________________________________________________
tmda-workers mailing list ([email protected])
http://tmda.net/lists/listinfo/tmda-workers