#3799: mutt -H <file> should modify the draft <file>, not create a copy
---------------------+----------------------
Reporter: vinc17 | Owner: mutt-dev
Type: defect | Status: new
Priority: major | Milestone:
Component: mutt | Version: 1.5.24
Resolution: | Keywords:
---------------------+----------------------
Comment (by cameron):
{{{
On 01Jan2016 02:08, Mutt <[email protected]> wrote:
I would want a new flag, or a configuration file option to change the
behaviour. Or an easy way to test. My own opinion, at present, is that
mutt
should get a new -E option to say "this file is not a template, it is a
preprepared file to _edit_ and send".
The next question is: if mutt sends, should it _remove_ the argument to
-E.
With -H, it does not, and doing so might create surprises.
To provide a concrete example, I presently use -H in this script:
https://bitbucket.org/cameron_simpson/css/src/tip/bin/muttedit
and in fact author all my email via it; I set $editor to this script. It
spawns
a tmux (or screen) session to compose my reply by spawning:
mutt -e 'set editor=vim-flowed' -e 'unset signature' -H "$filename"
where "$filename" is the original composition file from the main mutt.
This
lets me detach from the message and resume later, should I wish to.
The script further relies on mutt's _silent_ return if the original file
is
unchanged (the master mutt needs to return cleanly to the index view). So
as
written, it relies on not changing the original.
Now, one could argue that this script should be copying "$filename" and
passing
the copy to -H. I would even agree. But then the copy needs to be tidied
up
(which is fine).
But what will my script do when run against an old mutt and against a new
mutt?
Unless I can detect this trivially I think the compatibility argument
suggests
we want a new flag.
So I would vote fo a "-E" which edited the provided file _and_ removed it
if
the email was successfully dispatched.
Thoughts?
Cheers,
Cameron Simpson <[email protected]>
}}}
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3799#comment:2>
Mutt <http://www.mutt.org/>
The Mutt mail user agent