Re: It works if you give it a chance. [Was: Changing the reply address.]

2017-02-27 Thread Erik Christiansen
On 27.02.17 07:07, Kevin J. McCarthy wrote:
> Just to add another caution: if for some reason later on you decided to
> "set include=yes" in your .muttrc, the prompt would no longer occur and
> that leading "y" in the macro might end up sending the email!

I've taken the precaution of omitting the 'y', in favour of:
"set include=yes". (I think it's also quicker to do a d} in vim than to
respond to the include query in the generic case.)

Another data point; the reply-hook triggers fine on reply to a single
email, but tag two (even from the target sender), and it doesn't.
Checking multiple senders for a match is perhaps feature creep, I am
forced to admit. :-)

Erik


Re: It works if you give it a chance. [Was: Changing the reply address.]

2017-02-27 Thread Kevin J. McCarthy
On Mon, Feb 27, 2017 at 09:29:12PM +1100, Erik Christiansen wrote:
> On 22.02.17 18:50, Erik Christiansen wrote:
> > On 21.02.17 13:28, Kevin J. McCarthy wrote:
> > > 
> > > You'll want to use the "push" command:
> > >   reply-hook '~f x...@yyy.asn.au' \
> > >  'push z...@bigpond.com'
> > > 
> > > *However*, this kind of thing is very delicate.
> > 
> 
> With a 'y' in front of , it does actually work fine.

Great!

> My mistake was expecting the reply-hook to take effect early enough to
> affect the edit-headers. But the action occurs after leaving the
> editor.  I didn't infer that from the reply-hook text:

Note the reply-hook is executing before the editor runs, but it is only
pushing the commands onto the input buffer.  They don't get executed
until the "compose" screen comes up and reads from that input buffer (or
various prompts pop up and read from the buffer too).

> I'll put a reminder in my own notes. It's not as easy as it used to be
> to remember the details when moving rapidly from activity to activity.
> 
> So edit-to is robust enough for everyday use, it seems.

Just to add another caution: if for some reason later on you decided to
"set include=yes" in your .muttrc, the prompt would no longer occur and
that leading "y" in the macro might end up sending the email!

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


It works if you give it a chance. [Was: Changing the reply address.]

2017-02-27 Thread Erik Christiansen
On 22.02.17 18:50, Erik Christiansen wrote:
> On 21.02.17 13:28, Kevin J. McCarthy wrote:
> > 
> > You'll want to use the "push" command:
> >   reply-hook '~f x...@yyy.asn.au' \
> >  'push z...@bigpond.com'
> > 
> > *However*, this kind of thing is very delicate.
> 

With a 'y' in front of , it does actually work fine. My
mistake was expecting the reply-hook to take effect early enough to
affect the edit-headers. But the action occurs after leaving the editor.
I didn't infer that from the reply-hook text:

"19. Change Settings Based Upon Message Recipients"
...
"reply-hook is matched against the message you are replying to, instead
of the message you are sending." ...

"reply-hooks are matched before the send-hook, regardless of the order
specified in the user's configuration file."

I'll put a reminder in my own notes. It's not as easy as it used to be
to remember the details when moving rapidly from activity to activity.

So edit-to is robust enough for everyday use, it seems.

Erik