Mutt -> Compose -> Some kind of alert?

David Woodfall dave at dawoodfall.net
Fri Oct 5 04:42:51 UTC 2018


On Friday 5 October 2018 07:15,
Alex Sa <097115+mutt at gmail.com> put forth the proposition:
> On 10/5/18, Timothy Rice <timothy.rice at unimelb.edu.au> wrote:
> > I think what you are asking is, if the To: field matches a particular
> > pattern, then can the CC: field by populated automatically?
>
> No, Timothy :)
>
> As I've said in my initial question, "I can't add them blindly or
> always". I just want to be reminded (in some way) to include Z and Y
> if my email is addressed to X.
>
> I don't really know if it's possible (probably, not) but I imagine it this way:
>
> OPTION A) Upon leaving the editor and coming back to Mutt, to its
> Compose section (this one: https://i.imgur.com/cjqMrl3.png), Mutt
> notices Person X in the To: field and launches an external script (I
> assume there is no internal command to echo some message to the status
> line or some text popup, right?).
>
> OR OPTION B) As soon as I press Reply to an email from Person X
> (before entering the editor), Mutt launches an external script (I
> probably can create a macro like "!my-alert-script Add Y,
> Z<Enter><mail>x<Enter>" for composing a new email, but what about
> replying?)
>
> I hope it's a bit clearer now :)
>
> And thanks for your help and interest anyway :).
>
>
> --
> Alex

Why not put that in your editor itself? If you use vim for example,
instead of putting all the vim options in mutt's 'editor' variable,
create a 'Mailer' function in your ~/.vimrc or another file that vim
uses, and then use "vim +':call Mailer()' %s" as editor. That way you
can put an alert or whatever you like at the end of the function and
use vim's 'echomsg' or perhaps have it stop and wait for input before
exiting.

--
Dave

"I know the answer!  The answer lies within the heart of all mankind!
The answer is twelve?  I think I'm in the wrong building."
    -- Charles Schulz

                                                            .--.  oo
                                                           (____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'


More information about the Mutt-users mailing list