David Pinto <carandr...@gmail.com> writes:

>
> I see what you mean, how changing the FCC would prevent the ability to
> manually edit the FCC.  But what about updating the FCC when the
> "From" changes?

I don't know how to efficiently detect changes to
From. (notmuch-)message-mode is essentially a text editor buffer,
including the header area, so I think one would have to reparse the
buffer after every keystroke. I think that would be annoyingly slow, but
I haven't tried it. The hook is called "post-command-hook" if you are
feeling adventurous, but see the warnings in the docstring.

> You mention updating the "From" when the "To" changes with the
> notmuch-address-post-completion-functions hook.  Could there be a hook
> for when the "From" changes which I could use to change the FCC?

My partial-solution relies on using completion to change To. If you are
OK with that (i.e. manual editing without completion would not update
Fcc), then the same scheme could work.

Another option that seems technically feasible, but would involve some
elisp programming, would be to write a command that re-applies the
calculation of Fcc from From that already exists, and run that manually
or perhaps opt-in to running it automatically on send.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to