Re: send-hook ~t and autoedit
On Wed, Jan 09, 2002 at 09:46:32PM -0600, Knute wrote: Don't you have to define a default hook in the config file before you call the send-hook so that mutt knows what it needs to look at first? I have: set default_hook=~t %s send-hook . set record=+sent Is there another default hook? -Hanpseter
Re: send-hook ~t and autoedit
On Thu, 10 Jan 2002, Hanspeter Roth wrote: On Wed, Jan 09, 2002 at 09:46:32PM -0600, Knute wrote: Don't you have to define a default hook in the config file before you call the send-hook so that mutt knows what it needs to look at first? I have: set default_hook=~t %s send-hook . set record=+sent Is there another default hook? -Hanpseter Try this: send-hook . 'set record=+sent' -- Knute You live, You die. Enjoy the interval! -- Clarence
Re: send-hook ~t and autoedit
On Thu, Jan 10, 2002 at 09:13:07AM -0600, Knute wrote: Try this: send-hook . 'set record=+sent' I already tried this. It seems only to be effective at the To: prompt at the initial send-menu if autoedit is unset. But it seems to have no effect in the compose menu. Aliases are reevaluated in the compose menu however. -Hanspeter
Re: send-hook ~t and autoedit
On Thu, Jan 10, 2002 at 07:50:25PM +0100, Hanspeter Roth wrote: I already tried this. It seems only to be effective at the To: prompt at the initial send-menu if autoedit is unset. But it seems to have no effect in the compose menu. It's because there is a chicken-and-egg problem. send-hook changes settings apropos to the generation of the reply/forward, such as whether to include the message, its encoding, etc. Unless you specify the addresses prior to editing the message, Mutt can't go back and alter the message according to the settings you want.
Re: send-hook ~t and autoedit
On Tue, 08 Jan 2002, Hanspeter Roth wrote: It seems to me send-hook ~t is not working with autoedit and edit_headers set. Only the answer from the initial send-menu seems to be considered. Changes from the invoked editor and the compose menu don't seem to have any effect. This is a bug, isn't it? -Hanspeter Don't you have to define a default hook in the config file before you call the send-hook so that mutt knows what it needs to look at first? -- Knute You live, You die. Enjoy the interval! -- Clarence
Re: send-hook ~t and autoedit
On Jan 8, Hanspeter Roth wrote: It seems to me send-hook ~t is not working with autoedit and edit_headers set. This is a bug, isn't it? Why should it be considered a bug? Autoedit per definition skips the send-menu, and as the recipient is still unknown when you enter the editor, send-hooks naturally cannot work. So if you want to use send-hooks, you have to unset autoedit, period. Sometimes you just can't have it both ways, and have to choose. Holger
Re: send-hook ~t and autoedit
On Tue, Jan 08, 2002 at 06:03:19PM +0200, Holger Lillqvist wrote: On Jan 8, Hanspeter Roth wrote: It seems to me send-hook ~t is not working with autoedit and edit_headers set. This is a bug, isn't it? Why should it be considered a bug? Autoedit per definition skips the send-menu, and as the recipient is still unknown when you enter the editor, send-hooks naturally cannot work. So if you want to use send-hooks, you have to unset autoedit, period. Sometimes you just can't have it both ways, and have to choose. Ok if I turn autoedit off and if I change the recipient during the editing session or after the editing session in the compose menu the hooks for the recipient after the initial send-menu are still aplied!? This seems ugly to me. Why not reevaluate the send-hooks after the editing session and after changing the recipient in the compose menu? -Hanspeter
Re: send-hook ~t and autoedit
On Jan 8, Hanspeter Roth wrote: Why not reevaluate the send-hooks after the editing session and after changing the recipient in the compose menu? For instance, send-hooks can be used to insert different signatures matching certain addresses (inserting sigs in different languages, etc.). Re-evaluating the send-hook at exit means deleting that sig and inserting another - a rather complex operation... Holger