>On 2010-03-18, peng shao <[email protected]> wrote: > >It's the way it's supposed to work, but it is confusing. > >Folder hooks are processed as the manual says. However, the push >command pushes its arguments onto a stack and mutt's input parser >later pops those arguments off the stack to parse and execute them. >It's that pushing and popping that reverses the order of your pushed >commands. The solution is to enter those folder hooks that contain >pushes into your muttrc "upside down", like this: > > folder-hook inbox 'push :inbox' > folder-hook . 'push :default' > >It would be nice to be able to put commands into a queue rather than >onto a stack. I don't know why it is the way it is.
I'm going to take a guess at this one, but when I see stuff like this, it means the code is optimized to take the fewest cpu cycles possible vs. spending a few extra cpu cycles processing a queue. On slow CPU's, makes perfect sense. Faster cpus, users will always question with "Why???". ;-) I prefer optimized but easy to read code, with good comments. Hopefully I'm not way off topic here, but just wanted to chime in whenever I hear low-level coding talk. ;-) And, I must say, versus other open software projects, I'm really enjoying Mutt's documentation. Just some explanations could use a better choice of wording for better clarity. One being "hooks", might be better explained by the following versus the current documentation: folder-hook == "What should be done when user enters 'a folder'" send-hook == "What should be done when 'user sends' a message" ... etc ... With the current documentation, it made me initially think I could use a folder-hook, but really a send-hook was the correct command I needed. -- Roger http://rogerx.freeshell.org/
