I have a very strange problem...

This weekend I finally got around to upgrading my very old mutt,
0.95.6i, to 1.2.5.  I read README.UPGRADE, changed my lists command to
subscribe, and fixed an odd little regex problem in my alternates
command.  It seems to be working pretty well, with one glaring exception.

I have a series of macros of this form:
  macro generic \eE ":source ~/.mutt/headers.efo\r"
  macro generic \eW ":source ~/.mutt/headers.wbrs\r"

... and so on and on.

The files loaded by these macros all look like:
| unmy_hdr *
| my_hdr Organization: WBRS 100.1 FM, Waltham MA
| my_hdr X-URL: http://www.wbrs.org/
| my_hdr From: Ofer Inbar <[EMAIL PROTECTED]>
| set status_format="-%r- %f: [EMAIL PROTECTED] ---[Msgs:%?M?%M/?%m%?n? New:%n?%?d? 
|Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b? 
|%l]---(%s%?S?/%S?)-%>-(%P)---"
| set signature="~/Sig/wbrs.sig"

Each file clears all previous my_hdr definitions, loads a header set
and defines the signature file for a new "role", and alters my status
line so I can see which role header set is currently loaded.

This worked perfectly in 0.95.6i.  Now that I've upgraded to 1.2.5,
though, it only works part of the time.  All of these escape macros
are listed when I hit ?, but if I actually try to use them, sometimes
they work, and sometimes they appear to just do nothing at all.
Often, if I try one and it does nothing, if I just try it again one or
two times, it works.  The odds of success seem to be different for
each macro.  For example, my esc-E macro works roughly 50% of the
time, while my esc-P macro seems to work fewer than 1 out of 10 tries.

I tried watching mutt's activity with truss, and I see that it does
read my keystrokes.  Sometimes, it opens and reads the headers file.
Other times, it just doesn't.  Here's the truss output when it does
nothing:

poll(0xEFFFC460, 1, 600000)                     = 1
poll(0xEFFFC378, 1, 10000)                      = 1
read(3, "1B", 1)                                = 1
poll(0xEFFFC460, 1, 100)                        = 1
poll(0xEFFFC378, 1, 10000)                      = 1
read(3, " P", 1)                                = 1
poll(0xEFFFC3F8, 1, 0)                          = 0
stat("/home/cos/Mail/mbox", 0xEFFFE620)         = 0
time()                                          = 997659834
time()                                          = 997659834
stat("/home/cos/Mail/mbox", 0xEFFFE508)         = 0
stat("/var/mail//cos", 0xEFFFE690)              = 0
time()                                          = 997659834
time()                                          = 997659834
poll(0xEFFFC460, 1, 600000)     (sleeping...)

Here's another attempt at loading the same header set (esc-P), that
did succeed.  This was with the exact same mutt process as the
previous example, and the same truss process watching it:

poll(0xEFFFC460, 1, 600000)     (sleeping...)
poll(0xEFFFC460, 1, 600000)                     = 1
poll(0xEFFFC378, 1, 10000)                      = 1
read(3, "1B", 1)                                = 1
poll(0xEFFFC460, 1, 100)                        = 0
poll(0xEFFFC460, 1, 600000)                     = 1
poll(0xEFFFC378, 1, 10000)                      = 1
read(3, " P", 1)                                = 1
open("/home/cos/.mutt/headers.poly", O_RDONLY)  = 5
fstat64(5, 0xEFFFDE28)                          = 0
ioctl(5, TCGETA, 0xEFFFDDB4)                    Err#25 ENOTTY
read(5, " u n m y _ h d r   *\n m".., 8192)     = 284
read(5, 0x00236794, 8192)                       = 0
llseek(5, 0, SEEK_CUR)                          = 284
close(5)                                        = 0
stat("/home/cos/Mail/mbox", 0xEFFFE620)         = 0
time()                                          = 997659950
time()                                          = 997659950
time()                                          = 997659950
  ...
time()                                          = 997659950
time()                                          = 997659950
stat("/home/cos/Mail/postponed", 0xEFFFDEB0)    = 0
stat("/home/cos/Mail/postponed", 0xEFFFD6D0)    = 0
time()                                          = 997659950
time()                                          = 997659950
write(1, "1B [ 3 4 h1B [ ? 2 5 h1B".., 99)      = 99
poll(0xEFFFC460, 1, 600000)                     = 1
poll(0xEFFFC378, 1, 10000)                      = 1
read(3, "1B", 1)                                = 1
poll(0xEFFFC460, 1, 100)                        = 1
poll(0xEFFFC378, 1, 10000)                      = 1
read(3, " R", 1)                                = 1
poll(0xEFFFC3F8, 1, 0)                          = 0
stat("/home/cos/Mail/mbox", 0xEFFFE620)         = 0
time()                                          = 997659952
time()                                          = 997659952
time()                                          = 997659952
time()                                          = 997659952
poll(0xEFFFC460, 1, 600000)     (sleeping...)

This is on a Solaris 2.6 box, mutt built using 2.95.2 19991024.
My configure line for mutt was:
 ./configure  --with-slang=/src/slang-1.4.0 --enable-pop --enable-imap 
--with-ssl=/usr/local/ssl --with-charmaps

One other possible culprit is that the slang I'm using appears to be
newer than my old mutt 0.95.6i build, so that must've been built with
a different slang.  I've also noticed that my esc-/ command (search
backwards) very consistently does absolutely nothing, which may also
be related.  That, too, worked perfectly well in mutt 0.95.6i.

  --  Cos (Ofer Inbar)  --  [EMAIL PROTECTED] http://cos.polyamory.org/
  --  WBRS (100.1 FM)   --      [EMAIL PROTECTED] http://www.wbrs.org/
   "This may seem a bit weird, but that's okay, because it is weird."
        -- Larry Wall in perlref(1) man page, Perl 5.001

Reply via email to