Cameron,

thank you, this is what I was looking for. I did manually edit the headers a few times and confirmed that the flag would show up on the message in outlook. I wasnt't sure how to execute it without a lot of keystrokes though.

I am more comfortable with python than sed but I guess whatever script I write just needs to make the edit and then save (write over) the file it is provided and then close?

Certainly a way forward.

Best regards,

Bill


On Thu, Mar 02, 2017 at 08:58:53AM +1100, Cameron Simpson wrote:
On 28Feb2017 12:27, Bill Starrs <[email protected]> wrote:
Thanks, but this appears to only apply when creating a new message.

What I am looking to do is edit the headers of existing messages in my work Inbox to add the Follow-up Flag, and sync those changes back to the Exchange server with IMAP so that my flags are present in Outlook on my work machine.

The behavior I would like to achieve is when I hit 'w' or "W" when on a particular message, I can add a flag to the standard list of D\N\O\R\*\! that will apply / remove the follow-up flag.

Well, mutt does have an <edit-message> command, which pops up the message in an editor for modification. The trick is to temporarily set your editor to a script that applies your change. Then next time mutt syncs your IMAP will be updated.

So you'd write a script that accepted a filename argument (the temp file mutt offers up for editing), prompts for the custom Outlook flag, applies it, quits.

Untested example (all on one line):

  macro index ,F ':set my_old_editor=$editor<enter>:set 
editor=adjust-outlook-flag.sh<enter><edit-message>:set editor=$my_old_editor<enter>'

so that typing ',F' invokes the script adjust-outlook-flag.sh. Then that would prompt for a flag and then invoke something (eg "sed -i") to apply it to the temp file.

Does that sound like a way forward?

Cheers,
Cameron Simpson <[email protected]>

Reply via email to