Hi folks,

Nilesh Patra, Dec 12, 2025 at 18:33:
> Hi Robin, all,
>
> Does aerc have any equivalent option of mutt's edit draft as reported
> in the issue below?

No but that's an interesting feature. See my comments below.

> If not -- @Daniel, patches welcome.
>
> ----------------------------------------------------------------------------------------
> Package: aerc
> Version: 0.21.0-1+b1
> Severity: wishlist
> X-Debbugs-Cc: [email protected]
>
> Hi Robin, Nilesh, Aloïs,
>
> I tried to integrate aerc as an option into a new Debian bts(1)
> command-line workflow I'm working on.
>
> I could find no direct equivalent for mutt's -H ("edit draft") option which
> allows starting a mail composer with email headers and body pre-filled from
> a raw email message file.
>
> I experimented with the aerc cmdline a bit but couldn't find a simple way
> to bridge the gap without extra logic that doesn't belong in bts(1).
>
> Things I tried:
>
>  - aerc mailto:[email protected]
>     - Supports a body template, but no custom headers. Needed for 
> X-Debbugs-CC.
>
>  - aerc :compose
>
>     - Has support for custom headers with -H in theory -- didn't work when
>       I tried it.
>
>     - Passing <body> didn't work for me either.
>
>     - Templates with -T looked promising, but those seems to be the wrong
>       concept. It's expecting something in (eg) ~/.config/aerc/templates,
>       not an arbitrary tempfile.
>
> In any case looking at what the :compose command can do in principle I
> recon a simple script could cover all of what I need -- if only :compose
> worked at documented which is a separate issue :-).
>
> Would you be interested in having an "aerc-muttwrapper" script be part of
> your aerc package? I can try to develop one.

I don't think a wrapper would be a good idea. aerc isn't meant to be
a 1:1 replacement for mutt.

I would prefer extra work for :compose in order for it to support an
extra argument that does what you ask. Basically, it would be an
extension of the -T <template> flag but allowing to pass an arbitrary
filepath instead of just a template name.

We could also extend `aerc mailto:...` to accept extra arguments.

It depends on what you expect from aerc exactly. Do you want to start it
as part of a script so that it pops an editor open and then allows you
to send the message?

You can also use the IPC socket to control aerc from another terminal.
But you will loose the interactive part.

If you describe precisely what is the need, I can implement it.
I shouldn't be complicated.

Let me know what you think.

-- 
Robin

> If redness or swelling develop, consult physician promptly.

Reply via email to