<<< Date Index >>>     <<< Thread Index >>>

Re: [Mutt] #2969: new function: lock-tag-prefix



#2969: new function: lock-tag-prefix

Comment (by Lionel Elie Mamane):

 {{{
 On Thu, Oct 11, 2007 at 08:41:28AM -0000, Mutt wrote:
 >  * Mutt <fleas@xxxxxxxx> [2007-10-11 07:41 -0000]:

 >>>  What happens if the macro aborts before it reaches the
 >>>  unlock-tag-prefix?

 >>  The tag-prefix stays locked, and there is no visible cue to the
 >>  user that it is so. I don't know how to add such a visible cue.

 >  I think this can cause hard to debug problems.

 Yes. I expect someone more at east in the mutt source code would have
 no particular difficulty adding the said visual cue.

 >>> Does it work with nested macros?

 >>  I would think it does, but untested and I'm not a mutt expert.

 >  I just noted that the patches in the mentioned thread do not handle
 >  nested macros well if more than one uses
 >  <tag-push>/<tag-set-tagflag>.  :(

 In my previous statement, I had thought only of the nesting of a macro
 that does not use (un)lock-tag-prefix in a macro that uses them; it
 works in the sense that the commands in the inner macro correctly
 apply to all tagged messages. If the inside nested macro uses
 unlock-tag-prefix, then it will release the lock for the (rest of the)
 outside macro, too. This is rather straightforward to fix; here is an
 (untested) updated patch.

 This will overflow at INT_MAX-2 levels of nesting; that should cover
 most reasonable uses ;-)
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/2969#comment:>